Search in sources :

Example 1 with SkyProviderAsteroids

use of micdoodle8.mods.galacticraft.planets.asteroids.client.SkyProviderAsteroids in project Galacticraft by micdoodle8.

the class AsteroidsEventHandlerClient method onClientTick.

@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    Minecraft minecraft = Minecraft.getMinecraft();
    WorldClient world = minecraft.theWorld;
    if (world != null) {
        if (world.provider instanceof WorldProviderAsteroids) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderAsteroids((IGalacticraftWorldProvider) world.provider));
            }
            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
Also used : IGalacticraftWorldProvider(micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider) CloudRenderer(micdoodle8.mods.galacticraft.core.client.CloudRenderer) SkyProviderAsteroids(micdoodle8.mods.galacticraft.planets.asteroids.client.SkyProviderAsteroids) Minecraft(net.minecraft.client.Minecraft) WorldClient(net.minecraft.client.multiplayer.WorldClient) WorldProviderAsteroids(micdoodle8.mods.galacticraft.planets.asteroids.dimension.WorldProviderAsteroids) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

IGalacticraftWorldProvider (micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider)1 CloudRenderer (micdoodle8.mods.galacticraft.core.client.CloudRenderer)1 SkyProviderAsteroids (micdoodle8.mods.galacticraft.planets.asteroids.client.SkyProviderAsteroids)1 WorldProviderAsteroids (micdoodle8.mods.galacticraft.planets.asteroids.dimension.WorldProviderAsteroids)1 Minecraft (net.minecraft.client.Minecraft)1 WorldClient (net.minecraft.client.multiplayer.WorldClient)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1