From 627d32ed6470407a231a5750a4b521f980fa79fb Mon Sep 17 00:00:00 2001 From: Me <135455255+IcarussOne@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:08:52 -0500 Subject: [PATCH] Netherrack Bricks --- .../progwml6/natura/nether/NaturaNether.java | 12 ++++++++-- .../natura/nether/NetherClientProxy.java | 2 ++ .../nether/block/BlockNetherrackBricks.java | 24 +++++++++++++++++++ .../charred_netherrack_bricks.json | 17 +++++++++++++ .../natura/blockstates/netherrack_bricks.json | 17 +++++++++++++ .../resources/assets/natura/lang/en_us.lang | 2 ++ .../recipes/nether/netherrack_bricks.json | 22 +++++++++++++++++ 7 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/progwml6/natura/nether/block/BlockNetherrackBricks.java create mode 100644 src/main/resources/assets/natura/blockstates/charred_netherrack_bricks.json create mode 100644 src/main/resources/assets/natura/blockstates/netherrack_bricks.json create mode 100644 src/main/resources/assets/natura/recipes/nether/netherrack_bricks.json diff --git a/src/main/java/com/progwml6/natura/nether/NaturaNether.java b/src/main/java/com/progwml6/natura/nether/NaturaNether.java index 2c8c4f27..0807583e 100644 --- a/src/main/java/com/progwml6/natura/nether/NaturaNether.java +++ b/src/main/java/com/progwml6/natura/nether/NaturaNether.java @@ -11,6 +11,7 @@ import com.progwml6.natura.common.item.ItemBlockLeaves; import com.progwml6.natura.common.item.ItemNaturaDoor; import com.progwml6.natura.library.Util; +import com.progwml6.natura.nether.block.BlockNetherrackBricks; import com.progwml6.natura.nether.block.BlockSmoothNetherrack; import com.progwml6.natura.nether.block.bush.BlockNetherBerryBush; import com.progwml6.natura.nether.block.button.BlockNetherButton; @@ -80,6 +81,8 @@ public class NaturaNether extends NaturaPulse public static BlockNetherGlass netherGlass; public static BlockSmoothNetherrack smoothNetherrack; + public static BlockNetherrackBricks netherrackBricks; + public static BlockNetherrackBricks netherrackBricksCharred; public static Block netherStairsGhostwood; public static Block netherStairsBloodwood; @@ -154,6 +157,8 @@ public void registerBlocks(Register event) netherGlass = registerBlock(registry, new BlockNetherGlass(), "nether_glass"); smoothNetherrack = registerBlock(registry, new BlockSmoothNetherrack(), "smooth_netherrack"); + netherrackBricks = registerBlock(registry, new BlockNetherrackBricks(), "netherrack_bricks"); + netherrackBricksCharred = registerBlock(registry, new BlockNetherrackBricks(), "charred_netherrack_bricks"); netherStairsGhostwood = registerBlockStairsFrom(registry, netherPlanks, BlockNetherPlanks.PlankType.GHOSTWOOD, "nether_stairs_ghostwood"); netherStairsBloodwood = registerBlockStairsFrom(registry, netherPlanks, BlockNetherPlanks.PlankType.BLOODWOOD, "nether_stairs_bloodwood"); @@ -223,6 +228,8 @@ public void registerItems(Register event) netherGlass = registerEnumItemBlock(registry, netherGlass, "nether_glass"); smoothNetherrack = registerItemBlock(registry, smoothNetherrack, "smooth_netherrack"); + netherrackBricks = registerItemBlock(registry, netherrackBricks, "netherrack_bricks"); + netherrackBricksCharred = registerItemBlock(registry, netherrackBricksCharred, "charred_netherrack_bricks"); netherStairsGhostwood = registerItemBlock(registry, netherStairsGhostwood, "nether_stairs_ghostwood"); netherStairsBloodwood = registerItemBlock(registry, netherStairsBloodwood, "nether_stairs_bloodwood"); @@ -310,7 +317,8 @@ private void registerSmelting() { FurnaceRecipes furnaceRecipes = FurnaceRecipes.instance(); - furnaceRecipes.addSmeltingRecipe(new ItemStack(Blocks.SOUL_SAND, 1, 0), new ItemStack(netherGlass, 1, 0), 0.3f); - furnaceRecipes.addSmeltingRecipe(new ItemStack(netherHeatSand, 1, 0), new ItemStack(netherGlass, 1, 1), 0.3f); + furnaceRecipes.addSmeltingRecipe(new ItemStack(Blocks.SOUL_SAND, 1, 0), new ItemStack(netherGlass, 1, 0), 0.3F); + furnaceRecipes.addSmeltingRecipe(new ItemStack(netherHeatSand, 1, 0), new ItemStack(netherGlass, 1, 1), 0.3F); + furnaceRecipes.addSmeltingRecipe(new ItemStack(netherrackBricks, 1, 0), new ItemStack(netherrackBricksCharred, 1, 0), 0.1F); } } diff --git a/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java b/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java index cd149821..f563b8ba 100644 --- a/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java +++ b/src/main/java/com/progwml6/natura/nether/NetherClientProxy.java @@ -107,6 +107,8 @@ protected void registerModels() registerItemBlockMeta(NaturaNether.netherGlass); registerItemModel(NaturaNether.smoothNetherrack); + registerItemModel(NaturaNether.netherrackBricks); + registerItemModel(NaturaNether.netherrackBricksCharred); registerItemBlockMeta(NaturaNether.netherSlab); diff --git a/src/main/java/com/progwml6/natura/nether/block/BlockNetherrackBricks.java b/src/main/java/com/progwml6/natura/nether/block/BlockNetherrackBricks.java new file mode 100644 index 00000000..ed031824 --- /dev/null +++ b/src/main/java/com/progwml6/natura/nether/block/BlockNetherrackBricks.java @@ -0,0 +1,24 @@ +package com.progwml6.natura.nether.block; + +import com.progwml6.natura.Natura; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockNetherrackBricks extends Block { + public BlockNetherrackBricks() { + super(Material.ROCK); + + this.setCreativeTab(Natura.TAB); + this.setHardness(1.5F); + this.setResistance(10.0F); + this.setHarvestLevel("pickaxe", 0); + } + + @Override + public boolean isFireSource(World world, BlockPos pos, EnumFacing side) { + return side == EnumFacing.UP; + } +} diff --git a/src/main/resources/assets/natura/blockstates/charred_netherrack_bricks.json b/src/main/resources/assets/natura/blockstates/charred_netherrack_bricks.json new file mode 100644 index 00000000..67f2fc9c --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/charred_netherrack_bricks.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/netherrack_bricks_charred" + } + }, + "variants": { + "normal": [ + {} + ], + "inventory": [ + {} + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/blockstates/netherrack_bricks.json b/src/main/resources/assets/natura/blockstates/netherrack_bricks.json new file mode 100644 index 00000000..316a8881 --- /dev/null +++ b/src/main/resources/assets/natura/blockstates/netherrack_bricks.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "cube_all", + "textures": { + "all": "natura:blocks/netherrack_bricks" + } + }, + "variants": { + "normal": [ + {} + ], + "inventory": [ + {} + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/natura/lang/en_us.lang b/src/main/resources/assets/natura/lang/en_us.lang index 8c1cb71b..f9fa4862 100644 --- a/src/main/resources/assets/natura/lang/en_us.lang +++ b/src/main/resources/assets/natura/lang/en_us.lang @@ -391,6 +391,8 @@ tile.natura.darkwood_trap_door.name=Darkwood Trapdoor tile.natura.darkwood_fence.name=Darkwood Fence tile.natura.darkwood_fence_gate.name=Darkwood Fence Gate +tile.natura.charred_netherrack_bricks.name=Charred Netherrack Bricks +tile.natura.netherrack_bricks.name=Netherrack Bricks tile.natura.smooth_netherrack.name=Smooth Netherrack tile.natura.nether_bookshelves.ghostwood.name=Ghostwood Bookshelf diff --git a/src/main/resources/assets/natura/recipes/nether/netherrack_bricks.json b/src/main/resources/assets/natura/recipes/nether/netherrack_bricks.json new file mode 100644 index 00000000..6b9eac60 --- /dev/null +++ b/src/main/resources/assets/natura/recipes/nether/netherrack_bricks.json @@ -0,0 +1,22 @@ +{ + "conditions": [ + { + "type": "natura:is_pulse_loaded", + "pulse_name": "NaturaNether" + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "AAA" + ], + "key": { + "A": { + "item": "natura:smooth_netherrack" + } + }, + "result": { + "item": "natura:netherrack_bricks", + "data": 0, + "count": 3 + } +} \ No newline at end of file