Class CropGrowEvent.Post

java.lang.Object
net.neoforged.bus.api.Event
Enclosing class:
CropGrowEvent

public static class CropGrowEvent.Post extends CropGrowEvent
Fired when "growing age" blocks (for example cacti, chorus plants, or crops in vanilla) have successfully grown. The block's original state is available, in addition to its new state.

This event is only fired on the logical server.

  • Field Details

    • originalState

      private final net.minecraft.world.level.block.state.BlockState originalState
  • Constructor Details

    • Post

      public Post(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState original, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • getOriginalState

      public net.minecraft.world.level.block.state.BlockState getOriginalState()
      Returns the original state of the crop before growing.
      Returns:
      the original state of the crop before growing
    • getState

      public net.minecraft.world.level.block.state.BlockState getState()
      Returns the new state of the crop after growing.
      Overrides:
      getState in class BlockEvent
      Returns:
      the new state of the crop after growing