Posted January 2, 20214 yr As mentioned in the title, I noticed that whenever I used the recommended method to initializing custom saplings/plants with the flower pot block, it never allows me to add said sapling to an empty pot but when I use the depreciated method it works perfectly. I also think this has been the case since its implementation, probably in 1.14? Now I may not fully understand or be utilizing the supplier/getters correctly either so I'll provide my code below just incase. This is my code below: public static final RegistryObject<Block> POTTED_BAMBOO_SAPLING = register("potted_bamboo_sapling", () -> new FlowerPotBlock(() -> (FlowerPotBlock) Blocks.FLOWER_POT, BAMBOO_SAPLING::get, AbstractBlock.Properties.create(Material.MISCELLANEOUS).zeroHardnessAndResistance())); Edited January 2, 20214 yr by diesieben07 fix format
January 3, 20214 yr Author Thanks for that! Figured it out, might not be the cleanest way to implement it but I added this to my FMLCommonSetupEvent setup like this and it works: event.enqueueWork(() -> { ((FlowerPotBlock)Blocks.FLOWER_POT).addPlant(ExplorerBlocks.BAMBOO_SAPLING.getId(), ExplorerBlocks.POTTED_BAMBOO_SAPLING::get); });
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.