use of ValkyrienWarfareBase.Network.PlayerShipRefrenceMessage in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class EventsClient method onClientTickEvent.
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onClientTickEvent(ClientTickEvent event) {
if (mc.theWorld != null) {
if (!mc.isGamePaused()) {
WorldPhysObjectManager manager = ValkyrienWarfareMod.physicsManager.getManagerForWorld(mc.theWorld);
if (event.phase == Phase.END) {
for (PhysicsWrapperEntity wrapper : manager.physicsEntities) {
wrapper.wrapping.onPostTickClient();
}
EntityDraggable.tickAddedVelocityForWorld(mc.theWorld);
}
}
if (event.phase == Phase.END) {
Object o = Minecraft.getMinecraft().thePlayer;
EntityDraggable draggable = (EntityDraggable) o;
if (draggable.worldBelowFeet != null) {
PlayerShipRefrenceMessage playerPosMessage = new PlayerShipRefrenceMessage(Minecraft.getMinecraft().thePlayer, draggable.worldBelowFeet);
ValkyrienWarfareMod.physWrapperNetwork.sendToServer(playerPosMessage);
}
}
}
}
Aggregations