Compare commits

..

2 commits

Author SHA1 Message Date
f504c30e77 Add minor create integration 2023-10-06 18:11:42 +03:00
a892ccf1a2 Add more missing recipes 2023-10-05 13:02:39 +03:00
15 changed files with 385 additions and 80 deletions

View file

@ -6,6 +6,8 @@
* Fix post lamp hitboxes
* Add credits in models
* Create integration - tags, recipes
=== ACHIEVEMENTS ===
Kolkhoz warrior - kill someone with a sickle
Gambler - throw dice 100 times

View file

@ -1,6 +1,5 @@
* aquamarine recipe
* whitewash recipe
* concrete recipe
* concrete with bars recipe
* parquet recipe
* linoleum recipe
@ -13,7 +12,7 @@
* light bulb recipe
* cigarette recipe
* siren recipe
* no landmine recipe - intended
* switch recipe
* checkers and chess recipe
* bars/iron fences
* post lamps recipes
* Various lamps recipes

View file

@ -0,0 +1,35 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_iron_bars": {
"conditions": {
"items": [
{
"items": [
"minecraft:iron_bars"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "minecraft:lamp_post_base_from_iron_bars_stonecutting"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_iron_bars",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"minecraft:lamp_post_base_from_iron_bars_stonecutting"
]
},
"sends_telemetry_event": false
}

View file

@ -0,0 +1,35 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"conditions": {
"recipe": "minecraft:lamp_post_base_from_vintage_iron_bars_stonecutting"
},
"trigger": "minecraft:recipe_unlocked"
},
"has_vintage_iron_bars": {
"conditions": {
"items": [
{
"items": [
"new_soviet:vintage_iron_bars"
]
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"requirements": [
[
"has_vintage_iron_bars",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"minecraft:lamp_post_base_from_vintage_iron_bars_stonecutting"
]
},
"sends_telemetry_event": false
}

View file

@ -0,0 +1,61 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_iron_nugget": {
"conditions": {
"items": [
{
"items": [
"minecraft:iron_nugget"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_stone_pressure_plate": {
"conditions": {
"items": [
{
"items": [
"minecraft:stone_pressure_plate"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:ap_landmine"
},
"trigger": "minecraft:recipe_unlocked"
},
"has_tnt": {
"conditions": {
"items": [
{
"items": [
"minecraft:tnt"
]
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"requirements": [
[
"has_stone_pressure_plate",
"has_iron_nugget",
"has_tnt",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:ap_landmine"
]
},
"sends_telemetry_event": false
}

View file

@ -0,0 +1,48 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_iron_ingot": {
"conditions": {
"items": [
{
"items": [
"minecraft:iron_ingot"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_iron_nugget": {
"conditions": {
"items": [
{
"items": [
"minecraft:iron_nugget"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:barbed_wire"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_iron_ingot",
"has_iron_nugget",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:barbed_wire"
]
},
"sends_telemetry_event": false
}

View file

@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"N": {
"item": "minecraft:iron_nugget"
},
"P": {
"item": "minecraft:stone_pressure_plate"
},
"T": {
"item": "minecraft:tnt"
}
},
"pattern": [
"NPN",
"TTT",
"NNN"
],
"result": {
"count": 6,
"item": "new_soviet:ap_landmine"
},
"show_notification": true
}

View file

@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"I": {
"item": "minecraft:iron_ingot"
},
"N": {
"item": "minecraft:iron_nugget"
}
},
"pattern": [
"INI",
"N N",
"INI"
],
"result": {
"count": 2,
"item": "new_soviet:barbed_wire"
},
"show_notification": true
}

View file

@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"count": 1,
"ingredient": {
"item": "minecraft:iron_bars"
},
"result": "new_soviet:lamp_post_base"
}

View file

@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"count": 1,
"ingredient": {
"item": "new_soviet:vintage_iron_bars"
},
"result": "new_soviet:lamp_post_base"
}

View file

@ -33,8 +33,7 @@ public class TVBlock extends HorizontalFacingBlock implements BlockEntityProvide
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext ctx) {
Direction dir = state.get(FACING);
return switch (dir) {
return switch (state.get(FACING)) {
case NORTH -> SHAPE.north();
case SOUTH -> SHAPE.south();
case EAST -> SHAPE.east();

View file

@ -16,6 +16,7 @@ import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.registration.NSE_Items;
import su.a71.new_soviet.registration.NSE_Tags;
import java.util.function.Consumer;
@ -65,10 +66,11 @@ public class Advancements implements Consumer<Consumer<Advancement>> {
false // Hidden
)
.parent(sickle)
// .criterion("holding_sickle", ItemCriterion.Conditions.)
.criterion("got_sickle", InventoryChangedCriterion.Conditions.items(NSE_Items.SICKLE))
.criterion("kill", OnKilledCriterion.Conditions.createPlayerKilledEntity(EntityPredicate.Builder.create(), DamageSourcePredicate.Builder.create().sourceEntity(EntityPredicate.Builder.create().equipment(EntityEquipmentPredicate.Builder.create().mainhand(ItemPredicate.Builder.create().items(NSE_Items.SICKLE).build()).build()))))
.build(consumer, NewSoviet.MOD_ID + "/sickle_kill");
// // Throw a die 100 times
// Advancement gambler = Advancement.Builder.create()
// .display(

View file

@ -14,6 +14,7 @@ import net.minecraft.item.ItemConvertible;
import net.minecraft.item.Items;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.book.RecipeCategory;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.util.Util;
import su.a71.new_soviet.registration.NSE_Blocks;
@ -555,6 +556,20 @@ public class RecipeGenerator extends FabricRecipeProvider {
.criterion(hasItem(Items.COBBLESTONE), conditionsFromItem(Items.COBBLESTONE))
.offerTo(exporter);
ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, NSE_Blocks.BARBED_WIRE, 2)
.input('I', Items.IRON_INGOT).input('N', Items.IRON_NUGGET)
.pattern("INI").pattern("N N").pattern("INI")
.criterion(hasItem(Items.IRON_INGOT), conditionsFromItem(Items.IRON_INGOT))
.criterion(hasItem(Items.IRON_NUGGET), conditionsFromItem(Items.IRON_NUGGET))
.offerTo(exporter);
ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, NSE_Custom.AP_LANDMINE, 6)
.input('P', Blocks.STONE_PRESSURE_PLATE).input('N', Items.IRON_NUGGET).input('T', Blocks.TNT)
.pattern("NPN").pattern("TTT").pattern("NNN")
.criterion(hasItem(Items.STONE_PRESSURE_PLATE), conditionsFromItem(Items.STONE_PRESSURE_PLATE))
.criterion(hasItem(Items.IRON_NUGGET), conditionsFromItem(Items.IRON_NUGGET))
.criterion(hasItem(Blocks.TNT), conditionsFromItem(Blocks.TNT))
.offerTo(exporter);
var path_blue_bars = convertBetween(NSE_Blocks.BLUE_IRON_BARS, Blocks.IRON_BARS);
ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, (NSE_Blocks.BLUE_IRON_BARS)).input(Blocks.IRON_BARS).input(Items.BLUE_DYE).criterion(FabricRecipeProvider.hasItem(NSE_Blocks.BLUE_IRON_BARS),
@ -689,6 +704,9 @@ public class RecipeGenerator extends FabricRecipeProvider {
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.WHITE_BOUNDARY_MARKER, Blocks.DIORITE_WALL, 1);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.WHITE_BOUNDARY_MARKER, Blocks.BONE_BLOCK, 2);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Custom.LAMP_POST_BASE, Blocks.IRON_BARS, 1);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Custom.LAMP_POST_BASE, NSE_Blocks.VINTAGE_IRON_BARS, 1);
offerDyeableRecipes(exporter,
List.of(Items.GREEN_DYE, Items.BLACK_DYE, Items.YELLOW_DYE, Items.BLUE_DYE, Items.LIGHT_BLUE_DYE, Items.RED_DYE, Items.WHITE_DYE, Items.LIGHT_GRAY_DYE, Items.GRAY_DYE, Items.CYAN_DYE, Items.ORANGE_DYE, Items.PURPLE_DYE, Items.MAGENTA_DYE, Items.PINK_DYE, Items.LIME_DYE, Items.BROWN_DYE),
List.of(NSE_Blocks.GREEN_BOUNDARY_MARKER.asItem(), NSE_Blocks.BLACK_BOUNDARY_MARKER.asItem(), NSE_Blocks.YELLOW_BOUNDARY_MARKER.asItem(), NSE_Blocks.BLUE_BOUNDARY_MARKER.asItem(),

View file

@ -3,149 +3,183 @@
"parent": "block/block",
"texture_size": [64, 64],
"textures": {
"1": "inc_lamp_on",
"particle": "inc_lamp_off"
"1": "new_soviet:block/custom/lamps/caged_lamp_on",
"particle": "new_soviet:block/custom/lamps/caged_lamp_off"
},
"elements": [
{
"from": [4, 15, 4],
"to": [12, 16, 12],
"from": [4, 0, 4],
"to": [12, 1, 12],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"up": {"uv": [2, 2, 0, 0], "texture": "#1"},
"down": {"uv": [2, 2, 0, 4], "texture": "#1"}
"up": {"uv": [2, 2, 0, 4], "texture": "#1"},
"down": {"uv": [2, 2, 0, 0], "texture": "#1"}
}
},
{
"from": [4, 14, 4],
"to": [12, 15, 12],
"from": [4, 1, 4],
"to": [12, 2, 12],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"up": {"uv": [4, 2, 2, 0], "texture": "#1"},
"down": {"uv": [4, 2, 2, 4], "texture": "#1"}
"up": {"uv": [4, 2, 2, 4], "texture": "#1"},
"down": {"uv": [4, 2, 2, 0], "texture": "#1"}
}
},
{
"from": [6, 7, 6],
"to": [10, 15, 10],
"from": [6, 1, 6],
"to": [10, 9, 10],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [3, 6, 4, 8], "texture": "#1"},
"east": {"uv": [4, 6, 5, 8], "texture": "#1"},
"south": {"uv": [6, 4, 7, 6], "texture": "#1"},
"west": {"uv": [5, 6, 6, 8], "texture": "#1"},
"down": {"uv": [7, 6, 6, 7], "texture": "#1"}
"north": {"uv": [6, 4, 7, 6], "rotation": 180, "texture": "#1"},
"east": {"uv": [4, 6, 5, 8], "rotation": 180, "texture": "#1"},
"south": {"uv": [3, 6, 4, 8], "rotation": 180, "texture": "#1"},
"west": {"uv": [5, 6, 6, 8], "rotation": 180, "texture": "#1"},
"up": {"uv": [7, 6, 6, 7], "texture": "#1"}
}
},
{
"from": [4, 14, 12],
"to": [12, 16, 12],
"from": [4, 0, 4],
"to": [12, 2, 4],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [7, 0, 9, 0.5], "texture": "#1"},
"south": {"uv": [7, 0.5, 9, 1], "texture": "#1"}
"north": {"uv": [7, 0.5, 9, 1], "rotation": 180, "texture": "#1"},
"south": {"uv": [7, 0, 9, 0.5], "rotation": 180, "texture": "#1"}
}
},
{
"from": [4, 14, 4],
"to": [12, 16, 4],
"from": [4, 0, 12],
"to": [12, 2, 12],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [7, 1, 9, 1.5], "texture": "#1"},
"south": {"uv": [7, 1.5, 9, 2], "texture": "#1"}
"north": {"uv": [7, 1.5, 9, 2], "rotation": 180, "texture": "#1"},
"south": {"uv": [7, 1, 9, 1.5], "rotation": 180, "texture": "#1"}
}
},
{
"from": [4, 14, 4],
"to": [4, 16, 12],
"from": [4, 0, 4],
"to": [4, 2, 12],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"east": {"uv": [7, 2, 9, 2.5], "texture": "#1"},
"west": {"uv": [7, 2.5, 9, 3], "texture": "#1"}
"east": {"uv": [7, 2, 9, 2.5], "rotation": 180, "texture": "#1"},
"west": {"uv": [7, 2.5, 9, 3], "rotation": 180, "texture": "#1"}
}
},
{
"from": [12, 14, 4],
"to": [12, 16, 12],
"from": [12, 0, 4],
"to": [12, 2, 12],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"east": {"uv": [7, 3, 9, 3.5], "texture": "#1"},
"west": {"uv": [7, 3.5, 9, 4], "texture": "#1"}
"east": {"uv": [7, 3, 9, 3.5], "rotation": 180, "texture": "#1"},
"west": {"uv": [7, 3.5, 9, 4], "rotation": 180, "texture": "#1"}
}
},
{
"from": [5, 6.5, 5],
"to": [11, 6.5, 11],
"from": [5, 9.5, 5],
"to": [11, 9.5, 11],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 0, 1.5, 0], "texture": "#1"},
"east": {"uv": [0, 0, 1.5, 0], "texture": "#1"},
"south": {"uv": [0, 0, 1.5, 0], "texture": "#1"},
"west": {"uv": [0, 0, 1.5, 0], "texture": "#1"},
"up": {"uv": [1.5, 7.5, 0, 6], "texture": "#1"},
"down": {"uv": [3, 6, 1.5, 7.5], "texture": "#1"}
"north": {"uv": [0, 0, 1.5, 0], "rotation": 180, "texture": "#1"},
"east": {"uv": [0, 0, 1.5, 0], "rotation": 180, "texture": "#1"},
"south": {"uv": [0, 0, 1.5, 0], "rotation": 180, "texture": "#1"},
"west": {"uv": [0, 0, 1.5, 0], "rotation": 180, "texture": "#1"},
"up": {"uv": [3, 6, 1.5, 7.5], "texture": "#1"},
"down": {"uv": [1.5, 7.5, 0, 6], "texture": "#1"}
}
},
{
"from": [5, 6.5, 5],
"to": [11, 14.5, 5],
"from": [5, 1.5, 11],
"to": [11, 9.5, 11],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 4, 1.5, 6], "texture": "#1"},
"east": {"uv": [0, 0, 0, 2], "texture": "#1"},
"south": {"uv": [4, 0, 5.5, 2], "texture": "#1"},
"west": {"uv": [0, 0, 0, 2], "texture": "#1"},
"north": {"uv": [4, 0, 5.5, 2], "rotation": 180, "texture": "#1"},
"east": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"south": {"uv": [0, 4, 1.5, 6], "rotation": 180, "texture": "#1"},
"west": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"up": {"uv": [1.5, 0, 0, 0], "texture": "#1"},
"down": {"uv": [1.5, 0, 0, 0], "texture": "#1"}
}
},
{
"from": [5, 6.5, 5],
"to": [5, 14.5, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"from": [5, 1.5, 5],
"to": [5, 9.5, 11],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#1"},
"east": {"uv": [1.5, 4, 3, 6], "texture": "#1"},
"south": {"uv": [0, 0, 0, 2], "texture": "#1"},
"west": {"uv": [4, 2, 5.5, 4], "texture": "#1"},
"up": {"uv": [0, 1.5, 0, 0], "texture": "#1"},
"down": {"uv": [0, 0, 0, 1.5], "texture": "#1"}
"north": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"east": {"uv": [1.5, 4, 3, 6], "rotation": 180, "texture": "#1"},
"south": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"west": {"uv": [4, 2, 5.5, 4], "rotation": 180, "texture": "#1"},
"up": {"uv": [0, 0, 0, 1.5], "texture": "#1"},
"down": {"uv": [0, 1.5, 0, 0], "texture": "#1"}
}
},
{
"from": [5, 6.5, 11],
"to": [11, 14.5, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"from": [5, 1.5, 5],
"to": [11, 9.5, 5],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [3, 4, 4.5, 6], "texture": "#1"},
"east": {"uv": [0, 0, 0, 2], "texture": "#1"},
"south": {"uv": [4.5, 4, 6, 6], "texture": "#1"},
"west": {"uv": [0, 0, 0, 2], "texture": "#1"},
"north": {"uv": [4.5, 4, 6, 6], "rotation": 180, "texture": "#1"},
"east": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"south": {"uv": [3, 4, 4.5, 6], "rotation": 180, "texture": "#1"},
"west": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"up": {"uv": [1.5, 0, 0, 0], "texture": "#1"},
"down": {"uv": [1.5, 0, 0, 0], "texture": "#1"}
}
},
{
"from": [11, 6.5, 5],
"to": [11, 14.5, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"from": [11, 1.5, 5],
"to": [11, 9.5, 11],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#1"},
"east": {"uv": [5.5, 0, 7, 2], "texture": "#1"},
"south": {"uv": [0, 0, 0, 2], "texture": "#1"},
"west": {"uv": [5.5, 2, 7, 4], "texture": "#1"},
"up": {"uv": [0, 1.5, 0, 0], "texture": "#1"},
"down": {"uv": [0, 0, 0, 1.5], "texture": "#1"}
"north": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"east": {"uv": [5.5, 0, 7, 2], "rotation": 180, "texture": "#1"},
"south": {"uv": [0, 0, 0, 2], "rotation": 180, "texture": "#1"},
"west": {"uv": [5.5, 2, 7, 4], "rotation": 180, "texture": "#1"},
"up": {"uv": [0, 0, 0, 1.5], "texture": "#1"},
"down": {"uv": [0, 1.5, 0, 0], "texture": "#1"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [0, 3.5, 1],
"scale": [0.55, 0.55, 0.55]
},
"thirdperson_lefthand": {
"translation": [0, 3.5, 1],
"scale": [0.55, 0.55, 0.55]
},
"firstperson_righthand": {
"rotation": [0, -90, 25],
"translation": [1, 5, -2.5],
"scale": [0.68, 0.68, 0.68]
},
"firstperson_lefthand": {
"rotation": [0, -90, 25],
"translation": [1, 5, -2.5],
"scale": [0.68, 0.68, 0.68]
},
"ground": {
"translation": [0, 2, 0],
"scale": [0.5, 0.5, 0.5]
},
"gui": {
"rotation": [30, 225, 0],
"translation": [0, 3, 0]
},
"head": {
"translation": [0, 14, 0]
},
"fixed": {
"rotation": [-90, 0, 0],
"translation": [0, 0, -14.5],
"scale": [2, 2, 2]
}
},
"groups": [
{
"name": "group",
"origin": [8, 8, 8],
"color": 0,
"nbt": "{}",
"armAnimationEnabled": false,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
}
]

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"new_soviet:blue_iron_bars",
"new_soviet:rusty_blue_iron_bars",
"new_soviet:vintage_iron_bars",
"new_soviet:handrail"
]
}