diff --git a/src/main/java/knightminer/inspirations/building/InspirationsBuilding.java b/src/main/java/knightminer/inspirations/building/InspirationsBuilding.java index e3c18ecd..e2b8671d 100644 --- a/src/main/java/knightminer/inspirations/building/InspirationsBuilding.java +++ b/src/main/java/knightminer/inspirations/building/InspirationsBuilding.java @@ -180,22 +180,18 @@ public void registerBlocks(Register event) { flower_rose = registerBlock(r, new FlowerBlock((DoublePlantBlock) Blocks.ROSE_BUSH), "rose"); Supplier emptyPot = () -> (FlowerPotBlock) Blocks.FLOWER_POT; - potted_cyan = registerBlock(r, - new FlowerPotBlock(emptyPot, () -> flower_cyan, Block.Properties.from(Blocks.FLOWER_POT)), - "potted_cyan" - ); - potted_syringa = registerBlock(r, - new FlowerPotBlock(emptyPot, () -> flower_syringa, Block.Properties.from(Blocks.FLOWER_POT)), - "potted_syringa" - ); - potted_paeonia = registerBlock(r, - new FlowerPotBlock(emptyPot, () -> flower_paeonia, Block.Properties.from(Blocks.FLOWER_POT)), - "potted_paeonia" - ); - potted_rose = registerBlock(r, - new FlowerPotBlock(emptyPot, () -> flower_rose, Block.Properties.from(Blocks.FLOWER_POT)), - "potted_rose" - ); + Block.Properties props = Block.Properties.from(Blocks.FLOWER_POT); + potted_cyan = registerBlock(r, new FlowerPotBlock(emptyPot, () -> flower_cyan, props), "potted_cyan"); + potted_syringa = registerBlock(r, new FlowerPotBlock(emptyPot, () -> flower_syringa, props), "potted_syringa"); + potted_paeonia = registerBlock(r, new FlowerPotBlock(emptyPot, () -> flower_paeonia, props), "potted_paeonia"); + potted_rose = registerBlock(r, new FlowerPotBlock(emptyPot, () -> flower_rose, props), "potted_rose"); + + // Register the flower items with the empty flower pot block. + FlowerPotBlock flowerPot = (FlowerPotBlock) Blocks.FLOWER_POT; + flowerPot.addPlant(flower_cyan.getRegistryName(), () -> potted_cyan); + flowerPot.addPlant(flower_syringa.getRegistryName(), () -> potted_syringa); + flowerPot.addPlant(flower_paeonia.getRegistryName(), () -> potted_paeonia); + flowerPot.addPlant(flower_rose.getRegistryName(), () -> potted_rose); whiteEnlightenedBush = registerBlock(r, new EnlightenedBushBlock(-1), "white_enlightened_bush"); redEnlightenedBush = registerBlock(r, new EnlightenedBushBlock(0xBF0000), "red_enlightened_bush"); @@ -246,12 +242,6 @@ public void registerItems(Register event) { registerBlockItem(r, flower_paeonia, ItemGroup.DECORATIONS); registerBlockItem(r, flower_rose, ItemGroup.DECORATIONS); - // Register the flower items with the empty flower pot block. - ((FlowerPotBlock)Blocks.FLOWER_POT).addPlant(flower_cyan.getRegistryName(), () -> potted_cyan); - ((FlowerPotBlock)Blocks.FLOWER_POT).addPlant(flower_syringa.getRegistryName(), () -> potted_syringa); - ((FlowerPotBlock)Blocks.FLOWER_POT).addPlant(flower_paeonia.getRegistryName(), () -> potted_paeonia); - ((FlowerPotBlock)Blocks.FLOWER_POT).addPlant(flower_rose.getRegistryName(), () -> potted_rose); - Item.Properties deco_props = new Item.Properties().group(ItemGroup.DECORATIONS); registerBlockItem(r, new TextureBlockItem(whiteEnlightenedBush, deco_props, ItemTags.LEAVES)); registerBlockItem(r, new TextureBlockItem(redEnlightenedBush, deco_props, ItemTags.LEAVES)); diff --git a/src/main/resources/data/minecraft/tags/blocks/flowerpots.json b/src/main/resources/data/minecraft/tags/blocks/flower_pots.json similarity index 100% rename from src/main/resources/data/minecraft/tags/blocks/flowerpots.json rename to src/main/resources/data/minecraft/tags/blocks/flower_pots.json