Jump to content

Rizen

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Rizen

  1. I see, sorry for having you tell me that again
  2. Well I'm not sure if I excactly have the right thing, but for me when it comes to tree generation, I use the BaseTreeFeatureConfig and this only allowes 5 arguments. Thuse hindering me of adding a third block. I'm not sure if I have to edit the TreeFeature class.
  3. Mh, I see, I'll try to look into it. Anyways thank you for your help
  4. Thank you for the fast respond Well the reason to why I want to use this event, is that I want to replace a block in the trunk, because I don't know if there is a way to already implement that into the growing of the tree, for the seconed one, it's just there because of my previouse test and I would have probably removed that.
  5. Good day Gentlemen, I'm programming a Mod for 1.16. and I've created a custom tree, futhermore I wanted to use a event (SaplingGrowTreeEvent) to change a block in the trunk. Sadly I haven't found a solution to actually get it to work, the problem I'm facing, which I pressume is that the event is executed before the tree is grown, thuse hindering the tree to actually grow. If anyone know a way to fix it I would be very gratefull. Here the code: @Mod.EventBusSubscriber(modid = AdvancedIndustries.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class ModClientEvents { @SubscribeEvent public static void onRubberTreeGrown(SaplingGrowTreeEvent event) { BlockPos blockPos = event.getPos(); IWorld world = event.getWorld(); if (!(event.getWorld().getBlockState(event.getPos()).getBlock() instanceof RubberTreeSapling)) return; if (event.hasResult()) { if (world.getBlockState(blockPos).getBlock() == RegistryHandler.RUBBER_TREE_SAPLING.get()) { AdvancedIndustries.LOGGER.info("Generator running"); world.setBlockState(blockPos.add(0,2,0), Blocks.DIAMOND_BLOCK.getDefaultState(), 1); } } } } If you required more inedepth view to my code, notfiy me please. Yours truthfully Rizen
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.