Class FarmlandTrampledKubeEvent

java.lang.Object
dev.latvian.mods.kubejs.block.FarmlandTrampledKubeEvent
All Implemented Interfaces:
KubeEntityEvent, KubeEvent, KubeLevelEvent

@Info("Invoked when an entity attempts to trample farmland.\n") public class FarmlandTrampledKubeEvent extends Object implements KubeEntityEvent
  • Constructor Details

    • FarmlandTrampledKubeEvent

      public FarmlandTrampledKubeEvent(net.neoforged.neoforge.event.level.BlockEvent.FarmlandTrampleEvent event)
  • Method Details

    • getDistance

      @Info("The distance of the entity from the block.") public float getDistance()
    • getEntity

      @Info("The entity that is attempting to trample the farmland.") public net.minecraft.world.entity.Entity getEntity()
      Specified by:
      getEntity in interface KubeEntityEvent
    • getLevel

      @Info("The level that the farmland and the entity are in.") public net.minecraft.world.level.Level getLevel()
      Specified by:
      getLevel in interface KubeEntityEvent
      Specified by:
      getLevel in interface KubeLevelEvent
    • getBlock

      @Info("The farmland block.") public LevelBlock getBlock()