Class SaplingGrowTreeEvent


  • public class SaplingGrowTreeEvent
    extends WorldEvent
    SaplingGrowTreeEvent is fired when a sapling grows into a tree.
    This event is fired during sapling growth in BlockSapling#generateTree(World, BlockPos, IBlockState, Random).

    pos contains the coordinates of the growing sapling.
    rand contains an instance of Random for use.

    This event is not Cancelable.

    This event has a result. Event.HasResult
    This result determines if the sapling is allowed to grow.

    This event is fired on the MinecraftForge#TERRAIN_GEN_BUS.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private BlockPos pos  
      private java.util.Random rand  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BlockPos getPos()  
      java.util.Random getRand()  
      • Methods inherited from class net.minecraftforge.eventbus.api.Event

        getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rand

        private final java.util.Random rand
    • Constructor Detail

      • SaplingGrowTreeEvent

        public SaplingGrowTreeEvent​(IWorld world,
                                    java.util.Random rand,
                                    BlockPos pos)
    • Method Detail

      • getRand

        public java.util.Random getRand()