Interface NMSOutEntityStatus

All Superinterfaces:
NMSObject, NMSPacket

public interface NMSOutEntityStatus extends NMSPacket
NMS wrapper for outbound entity status packets.

This interface provides access to Minecraft's entity status packet, which is sent from the server to clients to notify them of state changes or events related to specific entities. Entity status packets are used to trigger visual or audio effects on the client side without requiring full entity updates.

The status packet contains an entity ID and a status byte that represents various entity states or events. Common status values include death animations, damage effects, potion effects, or other entity-specific events that need to be synchronized with the client.

Status values vary by entity type and Minecraft version, but some common examples include:

  • Status 2: Entity hurt/damage animation
  • Status 3: Entity death animation
  • Status 6-9: Wolf states (angry, sitting, etc.)
  • Status 10: Sheep eating grass
  • Status 18: Rabbit jumping

Example usage:


 // Read entity status from a packet
 int entityId = statusPacket.getEntityID();
 byte status = statusPacket.getStatus();
 
 // Handle specific status events
 if (status == 3) {
     // Entity death animation
     handleEntityDeath(entityId);
 }
 

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the ID of the entity this status update applies to.
    byte
    Retrieves the status byte indicating the type of entity event or state.

    Methods inherited from interface com.kamikazejam.kamicommon.nms.wrappers.NMSObject

    getHandle
  • Method Details

    • getEntityID

      int getEntityID()
      Retrieves the ID of the entity this status update applies to.

      This method returns the unique identifier of the entity that is experiencing the status change. The entity ID corresponds to the same identifier used when the entity was spawned and is tracked by the client for entity management.

      Returns:
      the entity ID for this status update
    • getStatus

      byte getStatus()
      Retrieves the status byte indicating the type of entity event or state.

      This method returns a byte value that represents the specific status or event that occurred for the entity. The meaning of status values varies by entity type and Minecraft version, but they typically correspond to visual effects, animations, or state changes.

      Common status values include damage effects, death animations, entity-specific behaviors, and other events that need to be synchronized between server and client.

      Returns:
      the status byte representing the entity event or state