Class EntityAddEvent

java.lang.Object
me.hackware.api.event.Event
me.hackware.api.event.impl.EntityAddEvent

public class EntityAddEvent extends Event
Fired on the main thread from the TAIL of ClientPacketListener#handleAddEntity, after vanilla has applied the spawn. Unlike PacketEvent (which fires from the Netty thread inside Connection#channelRead0), handlers of this event run on the client tick thread and may safely call into the world / game-mode / connection without scheduling.

Used by features that need to act the instant an entity spawns — e.g. AutoCrystal's "Sequential FULL" break-on-spawn path.

  • Constructor Details

    • EntityAddEvent

      public EntityAddEvent(net.minecraft.network.protocol.game.ClientboundAddEntityPacket packet)
  • Method Details

    • getPacket

      public net.minecraft.network.protocol.game.ClientboundAddEntityPacket getPacket()
      The raw spawn packet.