Class ServerEntity
java.lang.Object
net.minecraft.server.level.ServerEntity
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Entitystatic final intprivate static final intprivate Vec3private byteprivate byteprivate byteprivate final ServerLevelprivate static final org.slf4j.Loggerprivate final VecDeltaCodecprivate final ServerEntity.Synchronizerprivate intprivate intprivate static final doubleprivate static final intprivate final booleanprivate @Nullable List<SynchedEntityData.DataValue<?>> private final intprivate booleanprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionServerEntity(ServerLevel level, Entity entity, int updateInterval, boolean trackDelta, ServerEntity.Synchronizer synchronizer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPairing(ServerPlayer player) floatfloatfloatprivate voidhandleMinecartPosRot(NewMinecartBehavior newMinecartBehavior, byte yRotn, byte xRotn, boolean shouldSendRotation) voidremovePairing(ServerPlayer player) voidprivate voidvoidsendPairingData(ServerPlayer player, Consumer<Packet<? super ClientGamePacketListener>> broadcast)
-
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 -
synchronizer
-
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 level, Entity entity, int updateInterval, boolean trackDelta, ServerEntity.Synchronizer synchronizer)
-
-
Method Details
-
sendChanges
public void sendChanges() -
handleMinecartPosRot
private void handleMinecartPosRot(NewMinecartBehavior newMinecartBehavior, byte yRotn, byte xRotn, boolean shouldSendRotation) -
removePairing
-
addPairing
-
sendPairingData
public void sendPairingData(ServerPlayer player, Consumer<Packet<? super ClientGamePacketListener>> broadcast) -
getPositionBase
-
getLastSentMovement
-
getLastSentXRot
public float getLastSentXRot() -
getLastSentYRot
public float getLastSentYRot() -
getLastSentYHeadRot
public float getLastSentYHeadRot() -
sendDirtyEntityData
private void sendDirtyEntityData()
-