diff --git a/recipeTODO.txt b/recipeTODO.txt index 824c42d..d9e45bd 100644 --- a/recipeTODO.txt +++ b/recipeTODO.txt @@ -9,7 +9,6 @@ * no wallpaper recipes (intended?) * no nutrient block recipe (intended? compressed bread?) * cigarette recipe -* siren recipe * switch recipe * checkers and chess recipe * post lamps recipes diff --git a/src/main/generated/assets/new_soviet/blockstates/dirt_road.json b/src/main/generated/assets/new_soviet/blockstates/dirt_road.json new file mode 100644 index 0000000..f382342 --- /dev/null +++ b/src/main/generated/assets/new_soviet/blockstates/dirt_road.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "new_soviet:block/dirt_road" + } + } +} \ No newline at end of file diff --git a/src/main/generated/assets/new_soviet/models/block/dirt_road.json b/src/main/generated/assets/new_soviet/models/block/dirt_road.json new file mode 100644 index 0000000..667dd02 --- /dev/null +++ b/src/main/generated/assets/new_soviet/models/block/dirt_road.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "new_soviet:block/floor/dirt_road" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/new_soviet/models/item/dirt_road.json b/src/main/generated/assets/new_soviet/models/item/dirt_road.json new file mode 100644 index 0000000..89e0746 --- /dev/null +++ b/src/main/generated/assets/new_soviet/models/item/dirt_road.json @@ -0,0 +1,3 @@ +{ + "parent": "new_soviet:block/dirt_road" +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/advancements/recipes/decorations/golden_table_lamp.json b/src/main/generated/data/new_soviet/advancements/recipes/decorations/golden_table_lamp.json new file mode 100644 index 0000000..85242e8 --- /dev/null +++ b/src/main/generated/data/new_soviet/advancements/recipes/decorations/golden_table_lamp.json @@ -0,0 +1,74 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_gold_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:gold_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_gold_nugget": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:gold_nugget" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_green_wool": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:green_wool" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_light_bulb_item": { + "conditions": { + "items": [ + { + "items": [ + "new_soviet:light_bulb_item" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "new_soviet:golden_table_lamp" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_light_bulb_item", + "has_gold_nugget", + "has_gold_ingot", + "has_green_wool", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "new_soviet:golden_table_lamp" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/loot_tables/blocks/dirt_road.json b/src/main/generated/data/new_soviet/loot_tables/blocks/dirt_road.json new file mode 100644 index 0000000..7b4acd3 --- /dev/null +++ b/src/main/generated/data/new_soviet/loot_tables/blocks/dirt_road.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:dirt" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/new_soviet/recipes/golden_table_lamp.json b/src/main/generated/data/new_soviet/recipes/golden_table_lamp.json new file mode 100644 index 0000000..eed4186 --- /dev/null +++ b/src/main/generated/data/new_soviet/recipes/golden_table_lamp.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "G": { + "item": "minecraft:gold_ingot" + }, + "N": { + "item": "minecraft:gold_nugget" + }, + "W": { + "item": "minecraft:green_wool" + }, + "Z": { + "item": "new_soviet:light_bulb_item" + } + }, + "pattern": [ + "WZW", + " N ", + "GGG" + ], + "result": { + "item": "new_soviet:golden_table_lamp" + }, + "show_notification": true +} \ No newline at end of file diff --git a/src/main/java/su/a71/new_soviet/datagen/BlockLootTables.java b/src/main/java/su/a71/new_soviet/datagen/BlockLootTables.java index 59936e6..4717c23 100644 --- a/src/main/java/su/a71/new_soviet/datagen/BlockLootTables.java +++ b/src/main/java/su/a71/new_soviet/datagen/BlockLootTables.java @@ -3,6 +3,7 @@ package su.a71.new_soviet.datagen; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; +import net.minecraft.block.Blocks; import net.minecraft.item.Items; import su.a71.new_soviet.registration.NSE_Blocks; import su.a71.new_soviet.registration.NSE_Custom; @@ -430,6 +431,7 @@ public class BlockLootTables extends FabricBlockLootTableProvider { addDrop(NSE_Blocks.METAL_PLATING_SLAB); addDrop(NSE_Blocks.METAL_PLATING_STAIRS); addDrop(NSE_Blocks.BARBED_WIRE, Items.IRON_NUGGET); + addDrop(NSE_Blocks.DIRT_ROAD, Blocks.DIRT); addDropWithSilkTouch(NSE_Custom.LIGHT_BULB_LAMP); addDropWithSilkTouch(NSE_Blocks.BARBED_WIRE); diff --git a/src/main/java/su/a71/new_soviet/datagen/ModelGenerator.java b/src/main/java/su/a71/new_soviet/datagen/ModelGenerator.java index 8e0a733..8973ed4 100644 --- a/src/main/java/su/a71/new_soviet/datagen/ModelGenerator.java +++ b/src/main/java/su/a71/new_soviet/datagen/ModelGenerator.java @@ -199,6 +199,7 @@ public class ModelGenerator extends FabricModelProvider { registerCubeWithSlabStairs(blockStateModelGenerator, NSE_Blocks.GREEN_CONCRETE, NSE_Blocks.GREEN_CONCRETE_STAIRS, NSE_Blocks.GREEN_CONCRETE_SLAB, "concrete"); registerCubeWithSlabStairs(blockStateModelGenerator, NSE_Blocks.CRACKED_GREEN_CONCRETE, NSE_Blocks.CRACKED_GREEN_CONCRETE_STAIRS, NSE_Blocks.CRACKED_GREEN_CONCRETE_SLAB, "concrete"); registerCubeWithSlabStairs(blockStateModelGenerator, NSE_Blocks.NII_FLOOR, NSE_Blocks.NII_FLOOR_STAIRS, NSE_Blocks.NII_FLOOR_SLAB, "research_institute"); + registerCube(blockStateModelGenerator, NSE_Blocks.DIRT_ROAD, "floor"); registerCubeWithSlabStairs(blockStateModelGenerator, NSE_Blocks.HERRINGBONE_ACACIA_PLANKS, NSE_Blocks.HERRINGBONE_ACACIA_PLANKS_STAIRS, NSE_Blocks.HERRINGBONE_ACACIA_PLANKS_SLAB, "floor/planks"); registerCubeWithSlabStairs(blockStateModelGenerator, NSE_Blocks.CROSS_ACACIA_PLANKS, NSE_Blocks.CROSS_ACACIA_PLANKS_STAIRS, NSE_Blocks.CROSS_ACACIA_PLANKS_SLAB, "floor/planks"); registerCubeWithSlabStairs(blockStateModelGenerator, NSE_Blocks.HERRINGBONE_OAK_PLANKS, NSE_Blocks.HERRINGBONE_OAK_PLANKS_STAIRS, NSE_Blocks.HERRINGBONE_OAK_PLANKS_SLAB, "floor/planks"); diff --git a/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java b/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java index 3a85370..a3f60d1 100644 --- a/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java +++ b/src/main/java/su/a71/new_soviet/datagen/RecipeGenerator.java @@ -559,6 +559,15 @@ public class RecipeGenerator extends FabricRecipeProvider { .criterion(hasItem(Items.IRON_NUGGET), conditionsFromItem(Items.IRON_NUGGET)) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.GOLDEN_LAMP, 1) + .input('G', Items.GOLD_INGOT).input('N', Items.GOLD_NUGGET).input('Z', NSE_Items.LIGHT_BULB).input('W', Blocks.GREEN_WOOL) + .pattern("WZW").pattern(" N ").pattern("GGG") + .criterion(hasItem(NSE_Items.LIGHT_BULB), conditionsFromItem(NSE_Items.LIGHT_BULB)) + .criterion(hasItem(Items.GOLD_NUGGET), conditionsFromItem(Items.GOLD_NUGGET)) + .criterion(hasItem(Items.GOLD_INGOT), conditionsFromItem(Items.GOLD_INGOT)) + .criterion(hasItem(Blocks.GREEN_WOOL), conditionsFromItem(Blocks.GREEN_WOOL)) + .offerTo(exporter); + ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.BIG_POST_LAMP, 1) .input('P', NSE_Custom.LAMP_POST_BASE).input('S', Blocks.SHROOMLIGHT) .pattern(" S ").pattern(" P ").pattern(" ") diff --git a/src/main/java/su/a71/new_soviet/items/RakeItem.java b/src/main/java/su/a71/new_soviet/items/RakeItem.java index 6b9db54..157a070 100644 --- a/src/main/java/su/a71/new_soviet/items/RakeItem.java +++ b/src/main/java/su/a71/new_soviet/items/RakeItem.java @@ -14,6 +14,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import net.minecraft.world.event.GameEvent; +import su.a71.new_soviet.registration.NSE_Blocks; import su.a71.new_soviet.registration.NSE_Sounds; import su.a71.new_soviet.registration.NSE_Tags; @@ -23,7 +24,7 @@ import java.util.function.Predicate; public class RakeItem extends MiningToolItem { - protected static final Map, Consumer>> TILLING_ACTIONS = Maps.newHashMap(ImmutableMap.of(Blocks.GRASS_BLOCK, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.DIRT_PATH, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.DIRT, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.COARSE_DIRT, Pair.of(RakeItem::canTillFarmland, RakeItem.createTillAction(Blocks.DIRT.getDefaultState())), Blocks.ROOTED_DIRT, Pair.of(itemUsageContext -> true, RakeItem.createTillAndDropAction(Blocks.DIRT.getDefaultState(), Items.HANGING_ROOTS)))); + protected static final Map, Consumer>> TILLING_ACTIONS = Maps.newHashMap(ImmutableMap.of(Blocks.GRASS_BLOCK, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.DIRT_PATH, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.DIRT, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.COARSE_DIRT, Pair.of(RakeItem::canTillFarmland, RakeItem.createTillAndDropAction(NSE_Blocks.DIRT_ROAD.getDefaultState(), Items.FLINT)), Blocks.ROOTED_DIRT, Pair.of(itemUsageContext -> true, RakeItem.createTillAndDropAction(Blocks.DIRT.getDefaultState(), Items.HANGING_ROOTS)))); public RakeItem(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) { super(attackDamage, attackSpeed, material, NSE_Tags.Blocks.RAKE_MINEABLE, settings); } diff --git a/src/main/java/su/a71/new_soviet/registration/NSE_Blocks.java b/src/main/java/su/a71/new_soviet/registration/NSE_Blocks.java index 1561b5a..570f5a1 100644 --- a/src/main/java/su/a71/new_soviet/registration/NSE_Blocks.java +++ b/src/main/java/su/a71/new_soviet/registration/NSE_Blocks.java @@ -312,6 +312,8 @@ public class NSE_Blocks extends NSE_BaseRegistration { public static final SlabBlock CRACKED_GREEN_CONCRETE_SLAB = new SlabBlock(FabricBlockSettings.copy(CRACKED_GREEN_CONCRETE)); public static final ConcreteWithBarsBlock GREEN_CONCRETE_WITH_BARS = new ConcreteWithBarsBlock(FabricBlockSettings.copy(GREEN_CONCRETE)); + public static final GravelBlock DIRT_ROAD = new GravelBlock(FabricBlockSettings.copy(Blocks.GRAVEL)); + // WOOD/FLOOR ========== public static final Block HERRINGBONE_ACACIA_PLANKS = new Block(FabricBlockSettings.copy(Blocks.ACACIA_PLANKS)); public static final StairsBlock HERRINGBONE_ACACIA_PLANKS_STAIRS = new StairsBlock(HERRINGBONE_ACACIA_PLANKS.getDefaultState(), FabricBlockSettings.copy(HERRINGBONE_ACACIA_PLANKS)); @@ -763,6 +765,8 @@ public class NSE_Blocks extends NSE_BaseRegistration { registerBlock("nii_floor_stairs", () -> NII_FLOOR_STAIRS, NSE_BUILDING_TAB); registerBlock("nii_floor_slab", () -> NII_FLOOR_SLAB, NSE_BUILDING_TAB); + registerBlock("dirt_road", () -> DIRT_ROAD, NSE_BUILDING_TAB); + registerBlock("herringbone_acacia_planks", () -> HERRINGBONE_ACACIA_PLANKS, NSE_BUILDING_TAB); registerBlock("herringbone_acacia_planks_stairs", () -> HERRINGBONE_ACACIA_PLANKS_STAIRS, NSE_BUILDING_TAB); registerBlock("herringbone_acacia_planks_slab", () -> HERRINGBONE_ACACIA_PLANKS_SLAB, NSE_BUILDING_TAB); diff --git a/src/main/resources/assets/new_soviet/lang/en_us.json b/src/main/resources/assets/new_soviet/lang/en_us.json index 0966c37..f8edae0 100644 --- a/src/main/resources/assets/new_soviet/lang/en_us.json +++ b/src/main/resources/assets/new_soviet/lang/en_us.json @@ -467,6 +467,7 @@ "block.new_soviet.orange_boundary_marker": "Orange Boundary Marker", "block.new_soviet.cyan_boundary_marker": "Cyan Boundary Marker", "block.new_soviet.barbed_wire": "Barbed Wire", + "block.new_soviet.dirt_road": "Dirt Road", "advancement.new_soviet.root.name": "A New Era", "advancement.new_soviet.root.desc": "Time to create something great", diff --git a/src/main/resources/assets/new_soviet/textures/block/floor/dirt_road.png b/src/main/resources/assets/new_soviet/textures/block/floor/dirt_road.png new file mode 100644 index 0000000..ec151a8 Binary files /dev/null and b/src/main/resources/assets/new_soviet/textures/block/floor/dirt_road.png differ