Jump to content

Strontium

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Strontium

  1. Thank you! I didn't realize the event fired before the tree was actually placed... so thats why the sapling is there, I guess.

     

    If anyone in the future ends up here looking for a solution:

    I just added

            if (!(event.getWorld().getBlockState(event.getPos()).getBlock() instanceof BlockSapling))
                return;

    to the beginning of my function so that the rest of the code only runs if there is a sapling.

  2. Hi. I am trying to use an event to run some code whenever a Sapling grows into a Tree (using SaplingGrowTreeEvent). The event DOES work, however, I noticed it fires every time a tree generates in the world, not just growing from a sapling. Is there any way to check if the tree is from a sapling, and not worldgen?

×
×
  • Create New...

Important Information

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