Package me.hackware.api.event.impl
Class EntityAddEvent
java.lang.Object
me.hackware.api.event.Event
me.hackware.api.event.impl.EntityAddEvent
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 Summary
ConstructorsConstructorDescriptionEntityAddEvent(net.minecraft.network.protocol.game.ClientboundAddEntityPacket packet) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.protocol.game.ClientboundAddEntityPacketThe raw spawn packet.Methods inherited from class me.hackware.api.event.Event
cancel, isCancelled
-
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.
-