Class EntityReplacedEvent

java.lang.Object
my.celium.org.event.EntityReplacedEvent

public final class EntityReplacedEvent extends Object
Fired after EntityReplacer swapped one entity for another.

The old entity has already been discarded when this fires; its type and last known position are captured so handlers can react (particles, sounds) without touching a dead entity.

  • Constructor Details

    • EntityReplacedEvent

      public EntityReplacedEvent(String oldType, double x, double y, double z, net.minecraft.world.entity.Entity replacement)
  • Method Details

    • oldType

      public String oldType()
      Registry id of the removed entity type.
    • x

      public double x()
    • y

      public double y()
    • z

      public double z()
    • replacement

      public net.minecraft.world.entity.Entity replacement()
      The live replacement entity.