Package net.minecraft.server.level
Class ServerEntity
java.lang.Object
net.minecraft.server.level.ServerEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiConsumer
<Packet<?>, List<UUID>> private final Entity
static final int
private static final int
private Vec3
private byte
private byte
private byte
private final ServerLevel
private static final org.slf4j.Logger
private final VecDeltaCodec
private int
private int
private static final double
private static final int
private final boolean
private List
<SynchedEntityData.DataValue<?>> private final int
private boolean
private boolean
-
Constructor Summary
ConstructorsConstructorDescriptionServerEntity
(ServerLevel pLevel, Entity pEntity, int pUpdateInterval, boolean pTrackDelta, Consumer<Packet<?>> pBroadcast, BiConsumer<Packet<?>, List<UUID>> pBroadcastWithIgnore) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPairing
(ServerPlayer pPlayer) private void
broadcastAndSend
(Packet<?> pPacket) float
float
float
private void
handleMinecartPosRot
(NewMinecartBehavior pBehavior, byte pYRot, byte pXRot, boolean pDirty) mountedOrDismounted
(List<Entity> pEntities) void
removePairing
(ServerPlayer pPlayer) void
private void
void
sendPairingData
(ServerPlayer pPlayer, Consumer<Packet<? super ClientGamePacketListener>> pConsumer)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TOLERANCE_LEVEL_ROTATION
private static final int TOLERANCE_LEVEL_ROTATION- See Also:
-
TOLERANCE_LEVEL_POSITION
private static final double TOLERANCE_LEVEL_POSITION- See Also:
-
FORCED_POS_UPDATE_PERIOD
public static final int FORCED_POS_UPDATE_PERIOD- See Also:
-
FORCED_TELEPORT_PERIOD
private static final int FORCED_TELEPORT_PERIOD- See Also:
-
level
-
entity
-
updateInterval
private final int updateInterval -
trackDelta
private final boolean trackDelta -
broadcast
-
broadcastWithIgnore
-
positionCodec
-
lastSentYRot
private byte lastSentYRot -
lastSentXRot
private byte lastSentXRot -
lastSentYHeadRot
private byte lastSentYHeadRot -
lastSentMovement
-
tickCount
private int tickCount -
teleportDelay
private int teleportDelay -
lastPassengers
-
wasRiding
private boolean wasRiding -
wasOnGround
private boolean wasOnGround -
trackedDataValues
-
-
Constructor Details
-
ServerEntity
public ServerEntity(ServerLevel pLevel, Entity pEntity, int pUpdateInterval, boolean pTrackDelta, Consumer<Packet<?>> pBroadcast, BiConsumer<Packet<?>, List<UUID>> pBroadcastWithIgnore)
-
-
Method Details
-
sendChanges
public void sendChanges() -
mountedOrDismounted
-
handleMinecartPosRot
private void handleMinecartPosRot(NewMinecartBehavior pBehavior, byte pYRot, byte pXRot, boolean pDirty) -
removePairing
-
addPairing
-
sendPairingData
public void sendPairingData(ServerPlayer pPlayer, Consumer<Packet<? super ClientGamePacketListener>> pConsumer) -
getPositionBase
-
getLastSentMovement
-
getLastSentXRot
public float getLastSentXRot() -
getLastSentYRot
public float getLastSentYRot() -
getLastSentYHeadRot
public float getLastSentYHeadRot() -
sendDirtyEntityData
private void sendDirtyEntityData() -
broadcastAndSend
-