Package devs.beer.nativepackets.api
Interface MoveEntityPacketView
- All Superinterfaces:
PacketView
Copy-on-write view shared by the three clientbound relative-movement packet shapes.
-
Method Summary
Methods inherited from interface devs.beer.nativepackets.api.PacketView
isModified, nativeHandle, type
-
Method Details
-
entityId
int entityId()- Returns:
- native entity ID
-
hasPosition
boolean hasPosition()- Returns:
- whether this packet carries relative position
-
hasRotation
boolean hasRotation()- Returns:
- whether this packet carries rotation
-
deltaX
double deltaX()- Returns:
- relative X movement in blocks
-
deltaY
double deltaY()- Returns:
- relative Y movement in blocks
-
deltaZ
double deltaZ()- Returns:
- relative Z movement in blocks
-
yaw
float yaw()- Returns:
- yaw in degrees
-
pitch
float pitch()- Returns:
- pitch in degrees
-
onGround
boolean onGround()- Returns:
- whether the entity is on the ground
-
position
void position(double x, double y, double z) - Parameters:
x- relative X movement in blocksy- relative Y movement in blocksz- relative Z movement in blocks
-
rotation
void rotation(float yaw, float pitch) - Parameters:
yaw- yaw in degreespitch- pitch in degrees
-
onGround
void onGround(boolean onGround) - Parameters:
onGround- replacement on-ground flag
-