TickHandlerClient.checkedVersion = false;
}
if (player != null && player.ridingEntity != null && player.ridingEntity instanceof EntitySpaceshipBase)
{
GalacticraftCore.packetPipeline.sendToServer(new PacketRotateRocket(player.ridingEntity));
}
if (world != null)
{
if (world.provider instanceof WorldProviderSurface)
{
if (world.provider.getSkyRenderer() == null && player.ridingEntity != null && player.ridingEntity.posY >= 200)
{
world.provider.setSkyRenderer(new SkyProviderOverworld());
}
else if (world.provider.getSkyRenderer() != null && world.provider.getSkyRenderer() instanceof SkyProviderOverworld && (player.ridingEntity == null || player.ridingEntity.posY < 200))
{
world.provider.setSkyRenderer(null);
}
}
else if (world.provider instanceof WorldProviderOrbit)
{
if (world.provider.getSkyRenderer() == null)
{
world.provider.setSkyRenderer(new SkyProviderOrbit(new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "textures/gui/celestialbodies/earth.png"), true, true));
((SkyProviderOrbit) world.provider.getSkyRenderer()).spinDeltaPerTick = ((WorldProviderOrbit) world.provider).getSpinRate();
GCPlayerStatsClient.get(player).inFreefallFirstCheck = false;
}
if (world.provider.getCloudRenderer() == null)
{
world.provider.setCloudRenderer(new CloudRenderer());
}
}
else if (world.provider instanceof WorldProviderMoon)
{
if (world.provider.getSkyRenderer() == null)
{
world.provider.setSkyRenderer(new SkyProviderMoon());
}
if (world.provider.getCloudRenderer() == null)
{
world.provider.setCloudRenderer(new CloudRenderer());
}
}
}
if (player != null && player.ridingEntity != null && player.ridingEntity instanceof EntitySpaceshipBase)
{
final EntitySpaceshipBase ship = (EntitySpaceshipBase) player.ridingEntity;
boolean hasChanged = false;
if (minecraft.gameSettings.keyBindLeft.getIsKeyPressed())
{
ship.turnYaw(-1.0F);
hasChanged = true;
}
if (minecraft.gameSettings.keyBindRight.getIsKeyPressed())
{
ship.turnYaw(1.0F);
hasChanged = true;
}
if (minecraft.gameSettings.keyBindForward.getIsKeyPressed())
{
if (ship.getLaunched())
{
ship.turnPitch(-0.7F);
hasChanged = true;
}
}
if (minecraft.gameSettings.keyBindBack.getIsKeyPressed())
{
if (ship.getLaunched())
{
ship.turnPitch(0.7F);
hasChanged = true;
}
}
if (hasChanged)
{
GalacticraftCore.packetPipeline.sendToServer(new PacketRotateRocket(ship));
}
}
if (world != null)
{