Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Custom sky texture for dimension[FIXED]


TurtyWurty
 Share

Recommended Posts

Hello people of the forge forums. Recently I came up with the idea of having the sky in my dimension be a custom texture instead of a solid color. Sadly it appears that this sounds much easier than it is. I have got to the point of having everything reconstructed, however I cannot for the life of me figure out how to draw a texture in place of where the solid color would be. Here is what I have so far:
 

package com.turtywurty.examplemod.client;
 
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.turtywurty.examplemod.ExampleMod;
 
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.FogRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldVertexBufferUploader;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.vertex.VertexBuffer;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.client.world.DimensionRenderInfo;
import net.minecraft.client.world.DimensionRenderInfo.FogType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Matrix4f;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector3f;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.ISkyRenderHandler;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
 
@Mod.EventBusSubscriber(modid = ExampleMod.MOD_ID, bus = Bus.MOD, value = Dist.CLIENT)
public class ClientEventBus {
 
    private static final ResourceLocation DIM_RENDER_INFO = new ResourceLocation(ExampleMod.MOD_ID, "example_dim");
    private static final ResourceLocation SUN_TEXTURES = new ResourceLocation("textures/environment/sun.png");
    private static final ResourceLocation MOON_PHASES_TEXTURES = new ResourceLocation(
            "textures/environment/moon_phases.png");
    private static final ResourceLocation SKY_TEXTURE = new ResourceLocation(ExampleMod.MOD_ID,
            "textures/environment/sky.png");
 
    @SubscribeEvent(priority = EventPriority.HIGHEST)
    public static void clientSetup(FMLClientSetupEvent event) {
        // public net.minecraft.client.world.DimensionRenderInfo field_239208_a_ #
        // field_239208_a_
        // public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
        // field_175012_t # skyVBO
        // public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
        // field_175014_r # skyVertexFormat
        // public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
        // field_175013_s # starVBO
        // public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
        // field_175011_u # sky2VBO
 
        DimensionRenderInfo.field_239208_a_.put(DIM_RENDER_INFO,
                // cloudHeight, alternate sky color, fog type, render sky, diffuse lighting
                new DimensionRenderInfo(128, true, FogType.NORMAL, true, false) {
 
                    @Override
                    // adjustSkyColor
                    public Vector3d func_230494_a_(Vector3d fogColor, float partialTicks) {
                        return fogColor;
                    }
 
                    @Override
                    // useThickFog
                    public boolean func_230493_a_(int posX, int posY) {
                        return false;
                    }
 
                    @Override
                    public ISkyRenderHandler getSkyRenderHandler() {
                        return new ISkyRenderHandler() {
                            
                            @SuppressWarnings({ "resource", "deprecation" })
                            @Override
                            public void render(int ticks, float partialTicks, MatrixStack matrixStack,
                                    ClientWorld world, Minecraft mc) {
                                RenderSystem.disableTexture();
                                Vector3d vector3d = world.getSkyColor(
                                        Minecraft.getInstance().gameRenderer.getActiveRenderInfo().getBlockPos(),
                                        partialTicks);
                                float f = (float) vector3d.x;
                                float f1 = (float) vector3d.y;
                                float f2 = (float) vector3d.z;
                                FogRenderer.applyFog();
                                BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer();
                                RenderSystem.depthMask(false);
                                RenderSystem.enableFog();
                                RenderSystem.color3f(f, f1, f2);
 
                                RenderSystem.enableTexture();
                                RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
                                        GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE,
                                        GlStateManager.DestFactor.ZERO);
                                RenderSystem.color4f(0.8F, 0.8F, 0.8F, 0.2F);
                                Minecraft.getInstance().getTextureManager().bindTexture(SKY_TEXTURE);
                                bufferbuilder.begin(7, DefaultVertexFormats.POSITION);
 
                                for (int k = -384; k <= 384; k += 64) {
                                    for (int l = -384; l <= 384; l += 64) {
                                        float h = (float) k;
                                        float h1 = (float) (k + 64);
 
                                        bufferbuilder.pos((double) h, (double) 16, (double) l).tex(0.0F, 0.0F).endVertex();
                                        bufferbuilder.pos((double) h1, (double) 16, (double) l).tex(1.0F, 0.0F).endVertex();
                                        bufferbuilder.pos((double) h1, (double) 16, (double) (l + 64)).tex(1.0F, 1.0F).endVertex();
                                        bufferbuilder.pos((double) h, (double) 16, (double) (l + 64)).tex(0.0F, 1.0F).endVertex();
                                    }
                                }
                                bufferbuilder.finishDrawing();
                                WorldVertexBufferUploader.draw(bufferbuilder);
                                RenderSystem.disableTexture();
 
                                Minecraft.getInstance().worldRenderer.skyVBO.bindBuffer();
                                Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
                                Minecraft.getInstance().worldRenderer.skyVBO.draw(matrixStack.getLast().getMatrix(), 7);
                                VertexBuffer.unbindBuffer();
                                Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
                                RenderSystem.disableFog();
                                RenderSystem.disableAlphaTest();
                                RenderSystem.enableBlend();
                                RenderSystem.defaultBlendFunc();
                                float[] afloat = world.func_239132_a_()
                                        .func_230492_a_(world.func_242415_f(partialTicks), partialTicks);
                                if (afloat != null) {
                                    RenderSystem.disableTexture();
                                    RenderSystem.shadeModel(7425);
                                    matrixStack.push();
                                    matrixStack.rotate(Vector3f.XP.rotationDegrees(90.0F));
                                    float f3 = MathHelper.sin(world.getCelestialAngleRadians(partialTicks)) < 0.0F
                                            ? 180.0F
                                            : 0.0F;
                                    matrixStack.rotate(Vector3f.ZP.rotationDegrees(f3));
                                    matrixStack.rotate(Vector3f.ZP.rotationDegrees(90.0F));
                                    float f4 = afloat[0];
                                    float f5 = afloat[1];
                                    float f6 = afloat[2];
                                    Matrix4f matrix4f = matrixStack.getLast().getMatrix();
                                    bufferbuilder.begin(6, DefaultVertexFormats.POSITION_COLOR);
                                    bufferbuilder.pos(matrix4f, 0.0F, 100.0F, 0.0F).color(f4, f5, f6, afloat[3])
                                            .endVertex();
 
                                    for (int j = 0; j <= 16; ++j) {
                                        float f7 = (float) j * ((float) Math.PI * 2F) / 16.0F;
                                        float f8 = MathHelper.sin(f7);
                                        float f9 = MathHelper.cos(f7);
                                        bufferbuilder.pos(matrix4f, f8 * 120.0F, f9 * 120.0F, -f9 * 40.0F * afloat[3])
                                                .color(afloat[0], afloat[1], afloat[2], 0.0F).endVertex();
                                    }
 
                                    bufferbuilder.finishDrawing();
                                    WorldVertexBufferUploader.draw(bufferbuilder);
                                    matrixStack.pop();
                                    RenderSystem.shadeModel(7424);
                                }
 
                                RenderSystem.enableTexture();
                                RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
                                        GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE,
                                        GlStateManager.DestFactor.ZERO);
                                matrixStack.push();
                                float f11 = 1.0F - world.getRainStrength(partialTicks);
                                RenderSystem.color4f(1.0F, 1.0F, 1.0F, f11);
                                matrixStack.rotate(Vector3f.YP.rotationDegrees(-90.0F));
                                matrixStack.rotate(
                                        Vector3f.XP.rotationDegrees(world.func_242415_f(partialTicks) * 360.0F));
                                Matrix4f matrix4f1 = matrixStack.getLast().getMatrix();
                                float f12 = 30.0F;
                                Minecraft.getInstance().getTextureManager().bindTexture(SUN_TEXTURES);
                                bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
                                bufferbuilder.pos(matrix4f1, -f12, 100.0F, -f12).tex(0.0F, 0.0F).endVertex();
                                bufferbuilder.pos(matrix4f1, f12, 100.0F, -f12).tex(1.0F, 0.0F).endVertex();
                                bufferbuilder.pos(matrix4f1, f12, 100.0F, f12).tex(1.0F, 1.0F).endVertex();
                                bufferbuilder.pos(matrix4f1, -f12, 100.0F, f12).tex(0.0F, 1.0F).endVertex();
                                bufferbuilder.finishDrawing();
                                WorldVertexBufferUploader.draw(bufferbuilder);
                                f12 = 20.0F;
                                Minecraft.getInstance().getTextureManager().bindTexture(MOON_PHASES_TEXTURES);
                                int k = world.getMoonPhase();
                                int l = k % 4;
                                int i1 = k / 4 % 2;
                                float f13 = (float) (l + 0) / 4.0F;
                                float f14 = (float) (i1 + 0) / 2.0F;
                                float f15 = (float) (l + 1) / 4.0F;
                                float f16 = (float) (i1 + 1) / 2.0F;
                                bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
                                bufferbuilder.pos(matrix4f1, -f12, -100.0F, f12).tex(f15, f16).endVertex();
                                bufferbuilder.pos(matrix4f1, f12, -100.0F, f12).tex(f13, f16).endVertex();
                                bufferbuilder.pos(matrix4f1, f12, -100.0F, -f12).tex(f13, f14).endVertex();
                                bufferbuilder.pos(matrix4f1, -f12, -100.0F, -f12).tex(f15, f14).endVertex();
                                bufferbuilder.finishDrawing();
                                WorldVertexBufferUploader.draw(bufferbuilder);
                                RenderSystem.disableTexture();
                                float f10 = world.getStarBrightness(partialTicks) * f11;
                                if (f10 > 0.0F) {
                                    RenderSystem.color4f(f10, f10, f10, f10);
                                    Minecraft.getInstance().worldRenderer.starVBO.bindBuffer();
                                    Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
                                    Minecraft.getInstance().worldRenderer.starVBO
                                            .draw(matrixStack.getLast().getMatrix(), 7);
                                    VertexBuffer.unbindBuffer();
                                    Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
                                }
 
                                RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
                                RenderSystem.disableBlend();
                                RenderSystem.enableAlphaTest();
                                RenderSystem.enableFog();
                                matrixStack.pop();
                                RenderSystem.disableTexture();
                                RenderSystem.color3f(0.0F, 0.0F, 0.0F);
                                double d0 = Minecraft.getInstance().player.getEyePosition(partialTicks).y
                                        - world.getWorldInfo().getVoidFogHeight();
                                if (d0 < 0.0D) {
                                    matrixStack.push();
                                    matrixStack.translate(0.0D, 12.0D, 0.0D);
                                    Minecraft.getInstance().worldRenderer.sky2VBO.bindBuffer();
                                    Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
                                    Minecraft.getInstance().worldRenderer.sky2VBO
                                            .draw(matrixStack.getLast().getMatrix(), 7);
                                    VertexBuffer.unbindBuffer();
                                    Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
                                    matrixStack.pop();
                                }
 
                                if (world.func_239132_a_().func_239216_b_()) {
                                    RenderSystem.color3f(f * 0.2F + 0.04F, f1 * 0.2F + 0.04F, f2 * 0.6F + 0.1F);
                                } else {
                                    RenderSystem.color3f(f, f1, f2);
                                }
 
                                RenderSystem.enableTexture();
                                RenderSystem.depthMask(true);
                                RenderSystem.disableFog();
                            }
                        };
                    }
                });
    }
}

Any help with this would be highly appreciated, I have been trying this for days now. Thanks in advance!

Edited by TurtyWurty
Link to comment
Share on other sites

Ok I have a small update regarding this question, but now actually with more questions. So I have managed to draw the texture. The issue was that I used 

bufferbuilder.begin(7, DefaultVertexFormats.POSITION);

instead of 

bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);

So it was basically ignoring the texture positions. It now looks like the attached image. The issue is that the texture is following the player. So basically I can only ever see that portion of the texture unless it goes behind some terrain or something. Here is my updated code:
 

package com.turtywurty.examplemod.client;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.turtywurty.examplemod.ExampleMod;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.FogRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldVertexBufferUploader;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.vertex.VertexBuffer;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.client.world.DimensionRenderInfo;
import net.minecraft.client.world.DimensionRenderInfo.FogType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Matrix4f;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector3f;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.ISkyRenderHandler;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;

@Mod.EventBusSubscriber(modid = ExampleMod.MOD_ID, bus = Bus.MOD, value = Dist.CLIENT)
public class ClientEventBus {

	private static final ResourceLocation DIM_RENDER_INFO = new ResourceLocation(ExampleMod.MOD_ID, "example_dim");
	private static final ResourceLocation SUN_TEXTURES = new ResourceLocation("textures/environment/sun.png");
	private static final ResourceLocation MOON_PHASES_TEXTURES = new ResourceLocation(
			"textures/environment/moon_phases.png");
	private static final ResourceLocation SKY_TEXTURE = new ResourceLocation(ExampleMod.MOD_ID,
			"textures/environment/sky.png");

	@SubscribeEvent(priority = EventPriority.HIGHEST)
	public static void clientSetup(FMLClientSetupEvent event) {
		// public net.minecraft.client.world.DimensionRenderInfo field_239208_a_ #
		// field_239208_a_
		// public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
		// field_175012_t # skyVBO
		// public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
		// field_175014_r # skyVertexFormat
		// public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
		// field_175013_s # starVBO
		// public net.minecraft.client.renderer.Minecraft.getInstance().worldRenderer
		// field_175011_u # sky2VBO

		DimensionRenderInfo.field_239208_a_.put(DIM_RENDER_INFO,
				// cloudHeight, alternate sky color, fog type, render sky, diffuse lighting
				new DimensionRenderInfo(128, true, FogType.NORMAL, true, false) {

					@Override
					// adjustSkyColor
					public Vector3d func_230494_a_(Vector3d fogColor, float partialTicks) {
						return fogColor;
					}

					@Override
					// useThickFog
					public boolean func_230493_a_(int posX, int posY) {
						return false;
					}

					@Override
					public ISkyRenderHandler getSkyRenderHandler() {
						return new ISkyRenderHandler() {

							@SuppressWarnings({ "resource", "deprecation" })
							@Override
							public void render(int ticks, float partialTicks, MatrixStack matrixStack,
									ClientWorld world, Minecraft mc) {
								RenderSystem.disableTexture();
								Vector3d vector3d = world.getSkyColor(
										Minecraft.getInstance().gameRenderer.getActiveRenderInfo().getBlockPos(),
										partialTicks);
								float f = (float) vector3d.x;
								float f1 = (float) vector3d.y;
								float f2 = (float) vector3d.z;
								FogRenderer.applyFog();
								BufferBuilder bufferbuilder = Tessellator.getInstance().getBuffer();
								RenderSystem.depthMask(false);
								RenderSystem.enableFog();
								RenderSystem.color3f(f, f1, f2);

								Minecraft.getInstance().worldRenderer.skyVBO.bindBuffer();
								Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
								Minecraft.getInstance().worldRenderer.skyVBO.draw(matrixStack.getLast().getMatrix(), 7);
								VertexBuffer.unbindBuffer();
								Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
								RenderSystem.disableFog();
								RenderSystem.disableAlphaTest();
								RenderSystem.enableBlend();
								RenderSystem.defaultBlendFunc();
								float[] afloat = world.func_239132_a_()
										.func_230492_a_(world.func_242415_f(partialTicks), partialTicks);
								if (afloat != null) {
									RenderSystem.disableTexture();
									RenderSystem.shadeModel(7425);
									matrixStack.push();
									matrixStack.rotate(Vector3f.XP.rotationDegrees(90.0F));
									float f3 = MathHelper.sin(world.getCelestialAngleRadians(partialTicks)) < 0.0F
											? 180.0F
											: 0.0F;
									matrixStack.rotate(Vector3f.ZP.rotationDegrees(f3));
									matrixStack.rotate(Vector3f.ZP.rotationDegrees(90.0F));
									float f4 = afloat[0];
									float f5 = afloat[1];
									float f6 = afloat[2];
									Matrix4f matrix4f = matrixStack.getLast().getMatrix();
									bufferbuilder.begin(6, DefaultVertexFormats.POSITION_COLOR);
									bufferbuilder.pos(matrix4f, 0.0F, 100.0F, 0.0F).color(f4, f5, f6, afloat[3])
											.endVertex();

									for (int j = 0; j <= 16; ++j) {
										float f7 = (float) j * ((float) Math.PI * 2F) / 16.0F;
										float f8 = MathHelper.sin(f7);
										float f9 = MathHelper.cos(f7);
										bufferbuilder.pos(matrix4f, f8 * 120.0F, f9 * 120.0F, -f9 * 40.0F * afloat[3])
												.color(afloat[0], afloat[1], afloat[2], 0.0F).endVertex();
									}

									bufferbuilder.finishDrawing();
									WorldVertexBufferUploader.draw(bufferbuilder);
									matrixStack.pop();
									RenderSystem.shadeModel(7424);
								}

								RenderSystem.enableTexture();
								RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
										GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE,
										GlStateManager.DestFactor.ZERO);
								matrixStack.push();
								float f11 = 1.0F - world.getRainStrength(partialTicks);
								RenderSystem.color4f(1.0F, 1.0F, 1.0F, f11);
								matrixStack.rotate(Vector3f.YP.rotationDegrees(-90.0F));
								matrixStack.rotate(
										Vector3f.XP.rotationDegrees(world.func_242415_f(partialTicks) * 360.0F));
								Matrix4f matrix4f1 = matrixStack.getLast().getMatrix();
								float f12 = 30.0F;
								Minecraft.getInstance().getTextureManager().bindTexture(SUN_TEXTURES);
								bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
								bufferbuilder.pos(matrix4f1, -f12, 100.0F, -f12).tex(0.0F, 0.0F).endVertex();
								bufferbuilder.pos(matrix4f1, f12, 100.0F, -f12).tex(1.0F, 0.0F).endVertex();
								bufferbuilder.pos(matrix4f1, f12, 100.0F, f12).tex(1.0F, 1.0F).endVertex();
								bufferbuilder.pos(matrix4f1, -f12, 100.0F, f12).tex(0.0F, 1.0F).endVertex();
								bufferbuilder.finishDrawing();
								WorldVertexBufferUploader.draw(bufferbuilder);
								f12 = 20.0F;
								Minecraft.getInstance().getTextureManager().bindTexture(MOON_PHASES_TEXTURES);
								int k = world.getMoonPhase();
								int l = k % 4;
								int i1 = k / 4 % 2;
								float f13 = (float) (l + 0) / 4.0F;
								float f14 = (float) (i1 + 0) / 2.0F;
								float f15 = (float) (l + 1) / 4.0F;
								float f16 = (float) (i1 + 1) / 2.0F;
								bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
								bufferbuilder.pos(matrix4f1, -f12, -100.0F, f12).tex(f15, f16).endVertex();
								bufferbuilder.pos(matrix4f1, f12, -100.0F, f12).tex(f13, f16).endVertex();
								bufferbuilder.pos(matrix4f1, f12, -100.0F, -f12).tex(f13, f14).endVertex();
								bufferbuilder.pos(matrix4f1, -f12, -100.0F, -f12).tex(f15, f14).endVertex();
								bufferbuilder.finishDrawing();
								WorldVertexBufferUploader.draw(bufferbuilder);
								RenderSystem.disableTexture();
								float f10 = world.getStarBrightness(partialTicks) * f11;
								if (f10 > 0.0F) {
									RenderSystem.color4f(f10, f10, f10, f10);
									Minecraft.getInstance().worldRenderer.starVBO.bindBuffer();
									Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
									Minecraft.getInstance().worldRenderer.starVBO
											.draw(matrixStack.getLast().getMatrix(), 7);
									VertexBuffer.unbindBuffer();
									Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
								}

								RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
								RenderSystem.disableBlend();
								RenderSystem.enableAlphaTest();
								RenderSystem.enableFog();
  							    matrixStack.pop();
								RenderSystem.disableTexture();
								RenderSystem.color3f(0.0F, 0.0F, 0.0F);
								double d0 = Minecraft.getInstance().player.getEyePosition(partialTicks).y
										- world.getWorldInfo().getVoidFogHeight();
								if (d0 < 0.0D) {
									matrixStack.push();
									matrixStack.translate(0.0D, 12.0D, 0.0D);
									Minecraft.getInstance().worldRenderer.sky2VBO.bindBuffer();
									Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
									Minecraft.getInstance().worldRenderer.sky2VBO
											.draw(matrixStack.getLast().getMatrix(), 7);
									VertexBuffer.unbindBuffer();
									Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
									matrixStack.pop();
								}

								if (world.func_239132_a_().func_239216_b_()) {
									RenderSystem.color3f(f * 0.2F + 0.04F, f1 * 0.2F + 0.04F, f2 * 0.6F + 0.1F);
								} else {
									RenderSystem.color3f(f, f1, f2);
								}
								
								Minecraft.getInstance().worldRenderer.skyVBO.bindBuffer();
								Minecraft.getInstance().worldRenderer.skyVertexFormat.setupBufferState(0L);
								Minecraft.getInstance().worldRenderer.skyVBO.draw(matrixStack.getLast().getMatrix(), 7);
								VertexBuffer.unbindBuffer();
								Minecraft.getInstance().worldRenderer.skyVertexFormat.clearBufferState();
								
								RenderSystem.enableTexture();
								RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
										GlStateManager.DestFactor.ONE, GlStateManager.SourceFactor.ONE,
										GlStateManager.DestFactor.ZERO);
								RenderSystem.color4f(0.8F, 0.8F, 0.8F, 0.2F);
								Minecraft.getInstance().getTextureManager().bindTexture(SKY_TEXTURE);
								bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
								bufferbuilder.pos(64, 16, 64).tex(0.0F, 0.0F).endVertex();
								bufferbuilder.pos(-64, 16, 64).tex(1.0F, 0.0F).endVertex();
								bufferbuilder.pos(-64, 16, -64).tex(1.0F, 1.0F).endVertex();
								bufferbuilder.pos(64, 16, -64).tex(0.0F, 1.0F).endVertex();
								bufferbuilder.finishDrawing();
								WorldVertexBufferUploader.draw(bufferbuilder);
								RenderSystem.disableTexture();

								RenderSystem.enableTexture();
								RenderSystem.depthMask(true);
								RenderSystem.disableFog();
							}
						};
					}
				});
	}
}

 Any help with this would be highly appreciated. Because I cannot for the life of me figure this one out.

2021-01-02_15.02.51.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Delete .gradle/caches/forge_gradle in your user home directory. In the future try not to interrupt the ForgeGradle tasks.
    • C:\Users\Дмитрий Пунченко\Desktop\Minecraft Mods\TestMod\1_18>gradlew genIntelliJRuns --stacktrace To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3/userguide/gradle_daemon.html#sec:disabling_the_daemon. Daemon will be stopped at the end of the build > Configure project : Java: 17.0.1 JVM: 17.0.1+12-LTS-39(Oracle Corporation) Arch: amd64 WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project '1_18'. > Invalid patcher dependency: de.oceanlabs.mcp:mcp_config:1.18-20211130.085255@zip * Try: > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Exception is: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project '1_18'. at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75) at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:68) at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:51) at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:105) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:366) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:426) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:426) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:407) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:365) at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63) at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:751) at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:151) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.ensureConfigured(DefaultProjectStateRegistry.java:339) at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:41) at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:55) at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:48) at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:64) at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40) at org.gradle.initialization.VintageBuildModelController.lambda$prepareProjects$1(VintageBuildModelController.java:93) at org.gradle.internal.build.StateTransitionController.lambda$doTransition$1(StateTransitionController.java:222) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:221) at org.gradle.internal.build.StateTransitionController.transitionIfNotPreviously(StateTransitionController.java:190) at org.gradle.initialization.VintageBuildModelController.prepareProjects(VintageBuildModelController.java:93) at org.gradle.initialization.VintageBuildModelController.doBuildStages(VintageBuildModelController.java:77) at org.gradle.initialization.VintageBuildModelController.prepareToScheduleTasks(VintageBuildModelController.java:64) at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$prepareToScheduleTasks$0(DefaultBuildLifecycleController.java:105) at org.gradle.internal.build.StateTransitionController.lambda$doTransition$1(StateTransitionController.java:222) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:221) at org.gradle.internal.build.StateTransitionController.maybeTransition(StateTransitionController.java:174) at org.gradle.internal.build.DefaultBuildLifecycleController.prepareToScheduleTasks(DefaultBuildLifecycleController.java:103) at org.gradle.internal.buildtree.DefaultBuildTreeWorkPreparer.scheduleRequestedTasks(DefaultBuildTreeWorkPreparer.java:33) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$doScheduleAndRunTasks$2(DefaultBuildTreeLifecycleController.java:86) at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewTaskGraph(DefaultIncludedBuildTaskGraph.java:94) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.doScheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:85) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:103) at org.gradle.internal.build.StateTransitionController.lambda$transition$0(StateTransitionController.java:145) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243) at org.gradle.internal.build.StateTransitionController.transition(StateTransitionController.java:145) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:100) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:66) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49) at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:69) at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:114) at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:155) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65) at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:38) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211) at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:38) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:103) at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64) at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88) at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75) at org.gradle.util.internal.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:50) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) Caused by: java.lang.RuntimeException: Invalid patcher dependency: de.oceanlabs.mcp:mcp_config:1.18-20211130.085255@zip at net.minecraftforge.gradle.userdev.MinecraftUserRepo$MCP.<init>(MinecraftUserRepo.java:1592) at net.minecraftforge.gradle.userdev.MinecraftUserRepo$MCP.<init>(MinecraftUserRepo.java:1540) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.getParents(MinecraftUserRepo.java:404) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.validate(MinecraftUserRepo.java:195) at net.minecraftforge.gradle.userdev.UserDevPlugin.lambda$apply$26(UserDevPlugin.java:262) at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:123) at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:152) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction.execute(DefaultListenerBuildOperationDecorator.java:149) at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:95) at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:83) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:43) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:245) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:157) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:61) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:346) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:249) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:141) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at jdk.proxy1/jdk.proxy1.$Proxy42.afterEvaluate(Unknown Source) at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:187) at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:184) at org.gradle.api.internal.project.DefaultProject.stepEvaluationListener(DefaultProject.java:1429) at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:193) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:105) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:366) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:426) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:426) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:407) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:365) at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63) at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:751) at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:151) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.ensureConfigured(DefaultProjectStateRegistry.java:339) at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:41) at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:55) at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:48) at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:64) at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40) at org.gradle.initialization.VintageBuildModelController.lambda$prepareProjects$1(VintageBuildModelController.java:93) at org.gradle.internal.build.StateTransitionController.lambda$doTransition$1(StateTransitionController.java:222) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:221) at org.gradle.internal.build.StateTransitionController.transitionIfNotPreviously(StateTransitionController.java:190) at org.gradle.initialization.VintageBuildModelController.prepareProjects(VintageBuildModelController.java:93) at org.gradle.initialization.VintageBuildModelController.doBuildStages(VintageBuildModelController.java:77) at org.gradle.initialization.VintageBuildModelController.prepareToScheduleTasks(VintageBuildModelController.java:64) at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$prepareToScheduleTasks$0(DefaultBuildLifecycleController.java:105) at org.gradle.internal.build.StateTransitionController.lambda$doTransition$1(StateTransitionController.java:222) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:221) at org.gradle.internal.build.StateTransitionController.maybeTransition(StateTransitionController.java:174) at org.gradle.internal.build.DefaultBuildLifecycleController.prepareToScheduleTasks(DefaultBuildLifecycleController.java:103) at org.gradle.internal.buildtree.DefaultBuildTreeWorkPreparer.scheduleRequestedTasks(DefaultBuildTreeWorkPreparer.java:33) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$doScheduleAndRunTasks$2(DefaultBuildTreeLifecycleController.java:86) at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewTaskGraph(DefaultIncludedBuildTaskGraph.java:94) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.doScheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:85) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:103) at org.gradle.internal.build.StateTransitionController.lambda$transition$0(StateTransitionController.java:145) at org.gradle.internal.build.StateTransitionController.doTransition(StateTransitionController.java:243) at org.gradle.internal.build.StateTransitionController.transition(StateTransitionController.java:145) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:100) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:66) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49) at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:69) at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:114) at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:155) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65) at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:38) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211) at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:38) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:103) at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64) at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88) at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75) at org.gradle.util.internal.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:50) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) Caused by: java.util.zip.ZipException: zip END header not found at net.minecraftforge.gradle.common.config.MCPConfigV2.getFromArchive(MCPConfigV2.java:45) at net.minecraftforge.gradle.mcp.util.MCPWrapper.<init>(MCPWrapper.java:53) at net.minecraftforge.gradle.mcp.util.MCPWrapper.<init>(MCPWrapper.java:46) at net.minecraftforge.gradle.userdev.MinecraftUserRepo$MCP$1.<init>(MinecraftUserRepo.java:1548) at net.minecraftforge.gradle.userdev.MinecraftUserRepo$MCP.<init>(MinecraftUserRepo.java:1548) ... 167 more * Get more help at https://help.gradle.org BUILD FAILED in 5s  
    • I Solved. ModEntityRenderer public static void registerLayerDefinition(EntityRenderersEvent.RegisterLayerDefinitions event) { LayerDefinition ModlayerTutorialHorse = LayerDefinition.create(TutorialHorseModel.createBodyMesh(CubeDeformation.NONE), 64, 64); ImmutableMap.Builder<ModelLayerLocation, LayerDefinition> builder = ImmutableMap.builder(); /* event.registerLayerDefinition(TUTORIAL_PIG_LAYER, TutorialPigModel::createBodyLayer); // event.registerLayerDefinition(TUTORIAL_HORSE_LAYER, TutorialHorseModel::createMesh); builder.put(HORSEE, ModlayerTutorialHorse); */ event.registerLayerDefinition(TUTORIAL_PIG_LAYER, TutorialPigModel::createBodyLayer); // event.registerLayerDefinition(TUTORIAL_HORSE_LAYER, TutorialHorseModel::createMesh); event.registerLayerDefinition(TUTORIAL_HORSE_LAYER, TutorialHorseModel::createBodyLayer); } TutorialHorseModel public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = createBodyMesh( CubeDeformation.NONE); PartDefinition partdefinition = meshdefinition.getRoot(); partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(0, 13).addBox(-3.0F, -11.0F, -2.0F, 6.0F, 5.0F, 7.0F, CubeDeformation.NONE), PartPose.ZERO); return LayerDefinition.create(meshdefinition, 64, 64); } public static MeshDefinition createBodyMesh(CubeDeformation p_170670_) { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); Create  "createBodyLayer" for HorseModel and change ModEntityRenderer Code.
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • No. Refer to the documentation on registries: https://mcforge.readthedocs.io/en/1.18.x/concepts/registries/. You can also just use IForgeMenuType.create.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.