Fixed temporary player entity data transfer
This commit is contained in:
parent
c8138faabe
commit
a06d8ee056
@ -131,7 +131,13 @@ public class MovementControls {
|
|||||||
EntityData serverEntity = ServerState.getInstance().getWorld().getData()
|
EntityData serverEntity = ServerState.getInstance().getWorld().getData()
|
||||||
.getEntity(TestContent.PLAYER_ENTITY_ID);
|
.getEntity(TestContent.PLAYER_ENTITY_ID);
|
||||||
if (serverEntity != null) {
|
if (serverEntity != null) {
|
||||||
ClientState.getInstance().getLocalPlayer().getEntity().copy(serverEntity);
|
EntityData clientEntity = ClientState.getInstance().getLocalPlayer().getEntity();
|
||||||
|
|
||||||
|
clientEntity.copy(serverEntity);
|
||||||
|
serverEntity.setLookingAt(clientEntity.getLookingAt());
|
||||||
|
serverEntity.setUpVector(clientEntity.getUpVector());
|
||||||
|
serverEntity.setPosition(clientEntity.getPosition());
|
||||||
|
serverEntity.setVelocity(clientEntity.getVelocity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user