From 083548facb00f28c52793db92db0492e3ce596cc Mon Sep 17 00:00:00 2001 From: PeytonPlayz595 <106421860+PeytonPlayz595@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:46:28 -0400 Subject: [PATCH] Various bug fixes --- .../net/PeytonPlayz585/shadow/Config.java | 59 ++++++++++++++++--- .../net/PeytonPlayz585/shadow/CustomSky.java | 6 +- .../PeytonPlayz585/shadow/json/JSONUtils.java | 2 +- .../v1_8/sp/server/EaglerMinecraftServer.java | 11 +--- .../java/net/minecraft/client/Minecraft.java | 1 + .../multiplayer/ChunkProviderClient.java | 2 + .../client/renderer/EntityRenderer.java | 36 +++++++++-- .../client/renderer/RenderGlobal.java | 56 ++++++++++-------- .../client/resources/SimpleResource.java | 19 +++++- .../net/minecraft/server/MinecraftServer.java | 18 +++--- .../net/minecraft/world/WorldProviderEnd.java | 2 + .../minecraft/world/WorldProviderHell.java | 2 + .../minecraft/world/WorldProviderSurface.java | 9 +++ 13 files changed, 157 insertions(+), 66 deletions(-) diff --git a/src/main/java/net/PeytonPlayz585/shadow/Config.java b/src/main/java/net/PeytonPlayz585/shadow/Config.java index 73c6027..d88d559 100644 --- a/src/main/java/net/PeytonPlayz585/shadow/Config.java +++ b/src/main/java/net/PeytonPlayz585/shadow/Config.java @@ -14,6 +14,7 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig; import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.resources.DefaultResourcePack; import net.minecraft.client.resources.IResource; @@ -34,6 +35,14 @@ public class Config { private static int antialiasingLevel = 0; public static boolean waterOpacityChanged = false; + /* Ancient chunk loading fix from Shadow 1.0 I copied and pasted + * That NEEDS to be rewritten but I'm too lazy to do it... + */ + public static boolean chunkFix = true; + public static boolean chunkFixNether = false; + public static boolean chunkFixEnd = false; + public static WorldClient worldClient = null; + public static void initGameSettings(GameSettings p_initGameSettings_0_) { if (gameSettings == null) { gameSettings = p_initGameSettings_0_; @@ -336,15 +345,17 @@ public class Config { } public static void updateThreadPriorities() { - if (isSingleProcessor()) { - if (isSmoothWorld()) { - minecraftThread.setPriority(10); - } else { - minecraftThread.setPriority(5); - } - } else { - minecraftThread.setPriority(10); - } + //womp womp + +// if (isSingleProcessor()) { +// if (isSmoothWorld()) { +// minecraftThread.setPriority(10); +// } else { +// minecraftThread.setPriority(5); +// } +// } else { +// minecraftThread.setPriority(10); +// } } public static boolean isMinecraftThread() { @@ -649,4 +660,34 @@ public class Config { p_intHash_0_ = p_intHash_0_ ^ p_intHash_0_ >> 15; return p_intHash_0_; } + + //So gay + public static void fixChunkLoading() { + if (chunkFix) { + if (worldClient != null) { + Minecraft.getMinecraft().renderGlobal.loadRenderers(); + Minecraft.getMinecraft().renderGlobal.setWorldAndLoadRenderers(worldClient); + worldClient.updateBlocks(); + chunkFix = false; + } + } + + if (chunkFixNether) { + if (worldClient != null) { + Minecraft.getMinecraft().renderGlobal.loadRenderers(); + Minecraft.getMinecraft().renderGlobal.setWorldAndLoadRenderers(worldClient); + worldClient.updateBlocks(); + chunkFixNether = false; + } + } + + if (chunkFixEnd) { + if (worldClient != null) { + Minecraft.getMinecraft().renderGlobal.loadRenderers(); + Minecraft.getMinecraft().renderGlobal.setWorldAndLoadRenderers(worldClient); + worldClient.updateBlocks(); + chunkFixEnd = false; + } + } + } } diff --git a/src/main/java/net/PeytonPlayz585/shadow/CustomSky.java b/src/main/java/net/PeytonPlayz585/shadow/CustomSky.java index 40fddaf..d914fad 100644 --- a/src/main/java/net/PeytonPlayz585/shadow/CustomSky.java +++ b/src/main/java/net/PeytonPlayz585/shadow/CustomSky.java @@ -97,7 +97,7 @@ public class CustomSky { public static void renderSky(World p_renderSky_0_, TextureManager p_renderSky_1_, float p_renderSky_2_, float p_renderSky_3_) { if (worldSkyLayers != null) { - //if (Config.getGameSettings().renderDistanceChunks >= 2) { + if (Config.getGameSettings().renderDistanceChunks >= 2) { int i = p_renderSky_0_.provider.getDimensionId(); if (i >= 0 && i < worldSkyLayers.length) { @@ -118,13 +118,15 @@ public class CustomSky { Blender.clearBlend(p_renderSky_3_); } } - //} + } } } public static boolean hasSkyLayers(World p_hasSkyLayers_0_) { if (worldSkyLayers == null) { return false; + } else if(!(Config.getGameSettings().renderDistanceChunks >= 2)) { + return false; //No sky layers at 1 chunk render distance... } else { int i = p_hasSkyLayers_0_.provider.getDimensionId(); diff --git a/src/main/java/net/PeytonPlayz585/shadow/json/JSONUtils.java b/src/main/java/net/PeytonPlayz585/shadow/json/JSONUtils.java index fc4c23b..6a2cd63 100644 --- a/src/main/java/net/PeytonPlayz585/shadow/json/JSONUtils.java +++ b/src/main/java/net/PeytonPlayz585/shadow/json/JSONUtils.java @@ -12,7 +12,7 @@ import net.minecraft.client.resources.data.IMetadataSection; public class JSONUtils { - public static T fixJson(String string) { + public static T parseCustomItemAnimation(String string) { JSONObject jsonObject = new JSONObject(string); JSONObject animationObject = jsonObject.getJSONObject("animation"); int frametime = animationObject.getInt("frametime"); diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java index f5ac735..9f8aad9 100644 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java @@ -133,18 +133,9 @@ public class EaglerMinecraftServer extends MinecraftServer { this.tick(); ++counterTicksPerSecond; } else { - boolean mustYield = false; - if (j >= 50L) { - if(mustYield) { - try { - Thread.sleep(1l); // allow some async - }catch(InterruptedException e) { - System.err.println("you eagler"); - } - } + if (j > 50L) { this.currentTime += 50l; this.tick(); - mustYield = true; ++counterTicksPerSecond; } } diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java index 91deaa0..8c8c2b1 100644 --- a/src/main/java/net/minecraft/client/Minecraft.java +++ b/src/main/java/net/minecraft/client/Minecraft.java @@ -1825,6 +1825,7 @@ public class Minecraft implements IThreadListener { this.theWorld = worldClientIn; if (worldClientIn != null) { if (this.renderGlobal != null) { + Config.worldClient = worldClientIn; this.renderGlobal.setWorldAndLoadRenderers(worldClientIn); } diff --git a/src/main/java/net/minecraft/client/multiplayer/ChunkProviderClient.java b/src/main/java/net/minecraft/client/multiplayer/ChunkProviderClient.java index a5df971..72aac7e 100644 --- a/src/main/java/net/minecraft/client/multiplayer/ChunkProviderClient.java +++ b/src/main/java/net/minecraft/client/multiplayer/ChunkProviderClient.java @@ -4,6 +4,7 @@ import java.util.List; import com.google.common.collect.Lists; +import net.PeytonPlayz585.shadow.Config; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.entity.EnumCreatureType; @@ -89,6 +90,7 @@ public class ChunkProviderClient implements IChunkProvider { this.chunkMapping.add(ChunkCoordIntPair.chunkXZ2Int(parInt1, parInt2), chunk); this.chunkListing.add(chunk); chunk.setChunkLoaded(true); + Config.fixChunkLoading(); return chunk; } diff --git a/src/main/java/net/minecraft/client/renderer/EntityRenderer.java b/src/main/java/net/minecraft/client/renderer/EntityRenderer.java index 03e5d95..9e069f2 100644 --- a/src/main/java/net/minecraft/client/renderer/EntityRenderer.java +++ b/src/main/java/net/minecraft/client/renderer/EntityRenderer.java @@ -651,7 +651,11 @@ public class EntityRenderer implements IResourceManagerReloadListener { } float farPlane = this.farPlaneDistance * 2.0f * MathHelper.SQRT_2; - GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + if(this.mc.gameSettings.renderDistanceChunks >= 2) { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + } else { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, farPlane); + } DeferredStateManager.setGBufferNearFarPlanes(0.05f, farPlane); GlStateManager.matrixMode(GL_MODELVIEW); GlStateManager.loadIdentity(); @@ -1216,17 +1220,25 @@ public class EntityRenderer implements IResourceManagerReloadListener { double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double) partialTicks; double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double) partialTicks; frustum.setPosition(d0, d1, d2); - if ((Config.isSkyEnabled() || Config.isSunMoonEnabled() || Config.isStarsEnabled())){ + if ((Config.isSkyEnabled() || Config.isSunMoonEnabled() || Config.isStarsEnabled()) && this.mc.gameSettings.renderDistanceChunks >= 2){ this.setupFog(-1, partialTicks); this.mc.mcProfiler.endStartSection("sky"); GlStateManager.matrixMode(GL_PROJECTION); GlStateManager.loadIdentity(); - GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + if(this.mc.gameSettings.renderDistanceChunks >= 2) { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + } else { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F); + } GlStateManager.matrixMode(GL_MODELVIEW); renderglobal.renderSky(partialTicks, pass); GlStateManager.matrixMode(GL_PROJECTION); GlStateManager.loadIdentity(); - GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + if(this.mc.gameSettings.renderDistanceChunks >= 2) { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + } else { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * MathHelper.SQRT_2); + } GlStateManager.matrixMode(GL_MODELVIEW); } else { GlStateManager.enableBlend(); @@ -1373,7 +1385,13 @@ public class EntityRenderer implements IResourceManagerReloadListener { this.mc.mcProfiler.endStartSection("clouds"); GlStateManager.matrixMode(GL_PROJECTION); GlStateManager.loadIdentity(); - GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance * 4.0F); + if(this.mc.gameSettings.renderDistanceChunks >= 2) { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance * 4.0F); + } else { + //Clouds not rendered at 1 chunk render distance + //But still, just to be safe... + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F); + } GlStateManager.matrixMode(GL_MODELVIEW); GlStateManager.pushMatrix(); this.setupFog(0, partialTicks); @@ -1382,7 +1400,13 @@ public class EntityRenderer implements IResourceManagerReloadListener { GlStateManager.popMatrix(); GlStateManager.matrixMode(GL_PROJECTION); GlStateManager.loadIdentity(); - GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + if(this.mc.gameSettings.renderDistanceChunks >= 2) { + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float)this.mc.displayWidth / (float)this.mc.displayHeight, 0.05F, this.clipDistance); + } else { + //Clouds not rendered at 1 chunk render distance + //But still, just to be safe... + GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true), (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * MathHelper.SQRT_2); + } GlStateManager.matrixMode(GL_MODELVIEW); } diff --git a/src/main/java/net/minecraft/client/renderer/RenderGlobal.java b/src/main/java/net/minecraft/client/renderer/RenderGlobal.java index d754332..9e3e4dd 100644 --- a/src/main/java/net/minecraft/client/renderer/RenderGlobal.java +++ b/src/main/java/net/minecraft/client/renderer/RenderGlobal.java @@ -1390,7 +1390,7 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene GlStateManager.enableFog(); GlStateManager.color(f, f1, f2); - if(Config.isSkyEnabled()) { + if(Config.isSkyEnabled() && this.mc.gameSettings.renderDistanceChunks >= 2) { GlStateManager.callList(this.glSkyList); } @@ -1400,7 +1400,7 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0); RenderHelper.disableStandardItemLighting(); float[] afloat = this.theWorld.provider .calcSunriseSunsetColors(this.theWorld.getCelestialAngle(partialTicks), partialTicks); - if (afloat != null && Config.isSunMoonEnabled()) { + if (afloat != null && Config.isSunMoonEnabled() && this.mc.gameSettings.renderDistanceChunks >= 2) { GlStateManager.disableTexture2D(); GlStateManager.shadeModel(GL_SMOOTH); GlStateManager.pushMatrix(); @@ -1446,33 +1446,37 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, 1, 1, 0); GlStateManager.color(1.0F, 1.0F, 1.0F, f16); GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F); - CustomSky.renderSky(this.theWorld, this.renderEngine, this.theWorld.getCelestialAngle(partialTicks), f16); + if(this.mc.gameSettings.renderDistanceChunks >= 2) { + CustomSky.renderSky(this.theWorld, this.renderEngine, this.theWorld.getCelestialAngle(partialTicks), f16); + } GlStateManager.rotate(this.theWorld.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F); - this.renderEngine.bindTexture(locationSunPng); - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos((double) (-f17), 100.0D, (double) (-f17)).tex(0.0D, 0.0D).endVertex(); - worldrenderer.pos((double) f17, 100.0D, (double) (-f17)).tex(1.0D, 0.0D).endVertex(); - worldrenderer.pos((double) f17, 100.0D, (double) f17).tex(1.0D, 1.0D).endVertex(); - worldrenderer.pos((double) (-f17), 100.0D, (double) f17).tex(0.0D, 1.0D).endVertex(); - tessellator.draw(); - f17 = 20.0F; - this.renderEngine.bindTexture(locationMoonPhasesPng); - int i = this.theWorld.getMoonPhase(); - int j = i % 4; - int l = i / 4 % 2; - float f22 = (float) (j + 0) / 4.0F; - float f23 = (float) (l + 0) / 2.0F; - float f24 = (float) (j + 1) / 4.0F; - float f14 = (float) (l + 1) / 2.0F; - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos((double) (-f17), -100.0D, (double) f17).tex((double) f24, (double) f14).endVertex(); - worldrenderer.pos((double) f17, -100.0D, (double) f17).tex((double) f22, (double) f14).endVertex(); - worldrenderer.pos((double) f17, -100.0D, (double) (-f17)).tex((double) f22, (double) f23).endVertex(); - worldrenderer.pos((double) (-f17), -100.0D, (double) (-f17)).tex((double) f24, (double) f23).endVertex(); - tessellator.draw(); + if(Config.isSunMoonEnabled() && this.mc.gameSettings.renderDistanceChunks >= 2) { + this.renderEngine.bindTexture(locationSunPng); + worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); + worldrenderer.pos((double) (-f17), 100.0D, (double) (-f17)).tex(0.0D, 0.0D).endVertex(); + worldrenderer.pos((double) f17, 100.0D, (double) (-f17)).tex(1.0D, 0.0D).endVertex(); + worldrenderer.pos((double) f17, 100.0D, (double) f17).tex(1.0D, 1.0D).endVertex(); + worldrenderer.pos((double) (-f17), 100.0D, (double) f17).tex(0.0D, 1.0D).endVertex(); + tessellator.draw(); + f17 = 20.0F; + this.renderEngine.bindTexture(locationMoonPhasesPng); + int i = this.theWorld.getMoonPhase(); + int j = i % 4; + int l = i / 4 % 2; + float f22 = (float) (j + 0) / 4.0F; + float f23 = (float) (l + 0) / 2.0F; + float f24 = (float) (j + 1) / 4.0F; + float f14 = (float) (l + 1) / 2.0F; + worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); + worldrenderer.pos((double) (-f17), -100.0D, (double) f17).tex((double) f24, (double) f14).endVertex(); + worldrenderer.pos((double) f17, -100.0D, (double) f17).tex((double) f22, (double) f14).endVertex(); + worldrenderer.pos((double) f17, -100.0D, (double) (-f17)).tex((double) f22, (double) f23).endVertex(); + worldrenderer.pos((double) (-f17), -100.0D, (double) (-f17)).tex((double) f24, (double) f23).endVertex(); + tessellator.draw(); + } GlStateManager.disableTexture2D(); float f15 = this.theWorld.getStarBrightness(partialTicks) * f16; - if (f15 > 0.0F && Config.isStarsEnabled() && !CustomSky.hasSkyLayers(this.theWorld)) { + if (f15 > 0.0F && Config.isStarsEnabled() && !CustomSky.hasSkyLayers(this.theWorld) && this.mc.gameSettings.renderDistanceChunks >= 2) { GlStateManager.color(f15, f15, f15, f15); GlStateManager.callList(this.starGLCallList); } diff --git a/src/main/java/net/minecraft/client/resources/SimpleResource.java b/src/main/java/net/minecraft/client/resources/SimpleResource.java index 8d92657..8fe3ccb 100644 --- a/src/main/java/net/minecraft/client/resources/SimpleResource.java +++ b/src/main/java/net/minecraft/client/resources/SimpleResource.java @@ -68,6 +68,7 @@ public class SimpleResource implements IResource { return this.mcmetaInputStream != null; } + @SuppressWarnings("unchecked") public T getMetadata(String s) { if (!this.hasMetadata()) { return (T) null; @@ -92,13 +93,27 @@ public class SimpleResource implements IResource { } catch(Exception e) { if(this.srResourceLocation.toString().contains("mcpatcher") || this.srResourceLocation.toString().contains("optifine")) { try { - imetadatasection = JSONUtils.fixJson(mcmetaJson.toString()); - mapMetadataSections.put(s, imetadatasection); + if(s.contains("animation")) { + imetadatasection = JSONUtils.parseCustomItemAnimation(mcmetaJson.toString()); + mapMetadataSections.put(s, imetadatasection); + } else { + /* + * Only made json utils for custom item animations + * So far I have had no issues with any other custom item feature + * If this exception is printed it is most likely a user error... + */ + e.printStackTrace(); + + //Return it anyways lol + return (T) imetadatasection; + } } catch(Exception e1) { + e1.printStackTrace(); //Return it anyways lol return (T) imetadatasection; } } else { + e.printStackTrace(); //Return it anyways lol return (T) imetadatasection; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index cdbc9a0..ad2877a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -403,21 +403,13 @@ public abstract class MinecraftServer implements Runnable, ICommandSender, IThre this.tick(); i = 0L; } else { - boolean mustYield = false; - while (i >= 50L) { - if(mustYield) { - //try { - //Thread.sleep(1l); // allow some async - //}catch(InterruptedException e) { - //System.err.println("you eagler"); - //} - } + while (i > 50L) { i -= 50L; this.tick(); - mustYield = true; } } + Thread.sleep(Math.max(1L, 50L - i)); this.serverIsRunning = true; } } else { @@ -593,6 +585,12 @@ public abstract class MinecraftServer implements Runnable, ICommandSender, IThre public void startServerThread() { this.serverThread = new Thread(this, "Server thread"); this.serverThread.start(); + + //Lmao ¯\_(ツ)_/¯ + Thread.currentThread().setPriority(10); + + //Possible TPS fix!?!? + this.serverThread.setPriority(10); } /**+ diff --git a/src/main/java/net/minecraft/world/WorldProviderEnd.java b/src/main/java/net/minecraft/world/WorldProviderEnd.java index c94ca0b..f6b0dad 100644 --- a/src/main/java/net/minecraft/world/WorldProviderEnd.java +++ b/src/main/java/net/minecraft/world/WorldProviderEnd.java @@ -1,5 +1,6 @@ package net.minecraft.world; +import net.PeytonPlayz585.shadow.Config; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; @@ -35,6 +36,7 @@ public class WorldProviderEnd extends WorldProvider { public void registerWorldChunkManager() { this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.sky, 0.0F); this.dimensionId = 1; + Config.chunkFixEnd = true; this.hasNoSky = true; } diff --git a/src/main/java/net/minecraft/world/WorldProviderHell.java b/src/main/java/net/minecraft/world/WorldProviderHell.java index b1de94c..a63fdf1 100644 --- a/src/main/java/net/minecraft/world/WorldProviderHell.java +++ b/src/main/java/net/minecraft/world/WorldProviderHell.java @@ -1,5 +1,6 @@ package net.minecraft.world; +import net.PeytonPlayz585.shadow.Config; import net.minecraft.util.Vec3; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.WorldChunkManagerHell; @@ -36,6 +37,7 @@ public class WorldProviderHell extends WorldProvider { this.isHellWorld = true; this.hasNoSky = true; this.dimensionId = -1; + Config.chunkFixNether = true; } /**+ diff --git a/src/main/java/net/minecraft/world/WorldProviderSurface.java b/src/main/java/net/minecraft/world/WorldProviderSurface.java index a037c28..ca65c69 100644 --- a/src/main/java/net/minecraft/world/WorldProviderSurface.java +++ b/src/main/java/net/minecraft/world/WorldProviderSurface.java @@ -1,5 +1,7 @@ package net.minecraft.world; +import net.PeytonPlayz585.shadow.Config; + /**+ * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. * @@ -21,6 +23,13 @@ package net.minecraft.world; * */ public class WorldProviderSurface extends WorldProvider { + + @Override + public void registerWorldChunkManager() { + super.registerWorldChunkManager(); + Config.chunkFix = true; + } + /**+ * Returns the dimension's name, e.g. "The End", "Nether", or * "Overworld".