Search in sources :

Example 1 with IRenderHandler

use of net.minecraftforge.client.IRenderHandler in project RFToolsDimensions by McJty.

the class SkyRenderer method registerSkybox.

public static void registerSkybox(GenericWorldProvider provider, final SkyType skyType) {
    provider.setSkyRenderer(new IRenderHandler() {

        @Override
        public void render(float partialTicks, WorldClient world, Minecraft mc) {
            ResourceLocation sky;
            ResourceLocation sky2 = null;
            int type = SKYTYPE_DARKTOP;
            switch(skyType) {
                case SKY_INFERNO:
                    sky = locationPlasmaSkyPng;
                    type = SKYTYPE_DARKTOP;
                    break;
                case SKY_STARS1:
                    sky = locationStars1;
                    sky2 = locationStars1a;
                    type = SKYTYPE_ALTERNATING;
                    break;
                case SKY_STARS2:
                    sky = locationStars2;
                    type = SKYTYPE_ALL;
                    break;
                case SKY_STARS3:
                    sky = locationStars3;
                    sky2 = locationStars3a;
                    type = SKYTYPE_ALLHORIZONTAL;
                    break;
                default:
                    return;
            }
            SkyRenderer.renderSkyTexture(sky, sky2, type);
        }
    });
    provider.setCloudRenderer(new IRenderHandler() {

        @Override
        public void render(float partialTicks, WorldClient world, Minecraft mc) {
        }
    });
}
Also used : IRenderHandler(net.minecraftforge.client.IRenderHandler) ResourceLocation(net.minecraft.util.ResourceLocation) WorldClient(net.minecraft.client.multiplayer.WorldClient) Minecraft(net.minecraft.client.Minecraft)

Example 2 with IRenderHandler

use of net.minecraftforge.client.IRenderHandler in project RFToolsDimensions by McJty.

the class SkyRenderer method registerNoSky.

public static void registerNoSky(GenericWorldProvider provider) {
    provider.setSkyRenderer(new IRenderHandler() {

        @Override
        public void render(float partialTicks, WorldClient world, Minecraft mc) {
        }
    });
    provider.setCloudRenderer(new IRenderHandler() {

        @Override
        public void render(float partialTicks, WorldClient world, Minecraft mc) {
        }
    });
}
Also used : IRenderHandler(net.minecraftforge.client.IRenderHandler) WorldClient(net.minecraft.client.multiplayer.WorldClient) Minecraft(net.minecraft.client.Minecraft)

Example 3 with IRenderHandler

use of net.minecraftforge.client.IRenderHandler in project RFToolsDimensions by McJty.

the class SkyRenderer method registerEnderSky.

public static void registerEnderSky(GenericWorldProvider provider) {
    provider.setSkyRenderer(new IRenderHandler() {

        @Override
        public void render(float partialTicks, WorldClient world, Minecraft mc) {
            SkyRenderer.renderEnderSky();
        }
    });
    provider.setCloudRenderer(new IRenderHandler() {

        @Override
        public void render(float partialTicks, WorldClient world, Minecraft mc) {
        }
    });
}
Also used : IRenderHandler(net.minecraftforge.client.IRenderHandler) WorldClient(net.minecraft.client.multiplayer.WorldClient) Minecraft(net.minecraft.client.Minecraft)

Aggregations

Minecraft (net.minecraft.client.Minecraft)3 WorldClient (net.minecraft.client.multiplayer.WorldClient)3 IRenderHandler (net.minecraftforge.client.IRenderHandler)3 ResourceLocation (net.minecraft.util.ResourceLocation)1