u37. NOTE: elytra texture is broken fix that :3

This commit is contained in:
Aether 2024-10-14 18:15:42 -04:00
parent 2f97821771
commit 948f5fcd53
13 changed files with 130 additions and 2622 deletions

View File

@ -42,7 +42,7 @@ def folder = "javascript"
def name = "classes.js" def name = "classes.js"
teavm.js { teavm.js {
obfuscated = false obfuscated = true
sourceMap = true sourceMap = true
targetFileName = "../" + name targetFileName = "../" + name
optimization = OptimizationLevel.BALANCED // Change to "AGGRESSIVE" for release optimization = OptimizationLevel.BALANCED // Change to "AGGRESSIVE" for release

View File

@ -18,7 +18,6 @@
if(window.location.href.indexOf("file:") === 0) { if(window.location.href.indexOf("file:") === 0) {
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP"); alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
}else { }else {
var relayId = Math.floor(Math.random() * 3);
const isHttps = document.location.protocol === "https:"; const isHttps = document.location.protocol === "https:";
var serverURL = isHttps ? "wss://" : "ws://"; var serverURL = isHttps ? "wss://" : "ws://";
serverURL += document.location.host + "/"; serverURL += document.location.host + "/";

View File

@ -1672,7 +1672,6 @@ public class Minecraft implements IThreadListener {
if (!this.isGamePaused) { if (!this.isGamePaused) {
this.renderGlobal.updateClouds(); this.renderGlobal.updateClouds();
} }
this.mcProfiler.endStartSection("processRenderGlobalLightUpdates");
if (!isGamePaused) if (!isGamePaused)
((ILightUpdatesProcessor) renderGlobal).alfheim$processLightUpdates(); ((ILightUpdatesProcessor) renderGlobal).alfheim$processLightUpdates();

View File

@ -15,7 +15,6 @@ import java.util.concurrent.Callable;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.base.Predicates; import com.google.common.base.Predicates;
import net.hoosiertransfer.Config;
import net.lax1dude.eaglercraft.v1_8.Display; import net.lax1dude.eaglercraft.v1_8.Display;
import net.lax1dude.eaglercraft.v1_8.EagRuntime; import net.lax1dude.eaglercraft.v1_8.EagRuntime;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -37,8 +36,8 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig;
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.EmissiveItems; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.EmissiveItems;
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockBed; import net.minecraft.block.BlockBed;
@ -92,31 +91,22 @@ import net.minecraft.util.Vec3i;
import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldSettings;
import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenBase;
/** /**+
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
* *
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" * Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team * Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
* *
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, hoosiertransfer, * EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* ayunami2000. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* DIRECT, * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* (INCLUDING, BUT * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
@ -138,8 +128,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
private MouseFilter mouseFilterXAxis = new MouseFilter(); private MouseFilter mouseFilterXAxis = new MouseFilter();
private MouseFilter mouseFilterYAxis = new MouseFilter(); private MouseFilter mouseFilterYAxis = new MouseFilter();
private float thirdPersonDistance = 4.0F; private float thirdPersonDistance = 4.0F;
/** /**+
* +
* Third person distance temp * Third person distance temp
*/ */
private float thirdPersonDistanceTemp = 4.0F; private float thirdPersonDistanceTemp = 4.0F;
@ -155,8 +144,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
private boolean cloudFog; private boolean cloudFog;
private boolean renderHand = true; private boolean renderHand = true;
private boolean drawBlockOutline = true; private boolean drawBlockOutline = true;
/** /**+
* +
* Previous frame time in milliseconds * Previous frame time in milliseconds
*/ */
private long prevFrameTime = Minecraft.getSystemTime(); private long prevFrameTime = Minecraft.getSystemTime();
@ -170,8 +158,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
private int rainSoundCounter; private int rainSoundCounter;
private float[] rainXCoords = new float[1024]; private float[] rainXCoords = new float[1024];
private float[] rainYCoords = new float[1024]; private float[] rainYCoords = new float[1024];
/** /**+
* +
* Fog color buffer * Fog color buffer
*/ */
private FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16); private FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16);
@ -190,6 +177,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
private int frameCount; private int frameCount;
private GameOverlayFramebuffer overlayFramebuffer; private GameOverlayFramebuffer overlayFramebuffer;
private float eagPartialTicks = 0.0f; private float eagPartialTicks = 0.0f;
public float currentProjMatrixFOV = 0.0f; public float currentProjMatrixFOV = 0.0f;
public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) { public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) {
@ -236,8 +224,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.useShader = !this.useShader; this.useShader = !this.useShader;
} }
/** /**+
* +
* What shader to use when spectating this entity * What shader to use when spectating this entity
*/ */
public void loadEntityShader(Entity entityIn) { public void loadEntityShader(Entity entityIn) {
@ -253,8 +240,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
public void onResourceManagerReload(IResourceManager var1) { public void onResourceManagerReload(IResourceManager var1) {
} }
/** /**+
* +
* Updates the entity renderer * Updates the entity renderer
*/ */
public void updateRenderer() { public void updateRenderer() {
@ -280,6 +266,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
if (this.mc.getRenderViewEntity() == null) { if (this.mc.getRenderViewEntity() == null) {
this.mc.setRenderViewEntity(this.mc.thePlayer); this.mc.setRenderViewEntity(this.mc.thePlayer);
} }
float f3 = this.mc.theWorld.getLightBrightness( float f3 = this.mc.theWorld.getLightBrightness(
DeferredStateManager.isDeferredRenderer() ? new BlockPos(this.mc.getRenderViewEntity()).up() DeferredStateManager.isDeferredRenderer() ? new BlockPos(this.mc.getRenderViewEntity()).up()
: new BlockPos(this.mc.getRenderViewEntity())); : new BlockPos(this.mc.getRenderViewEntity()));
@ -287,8 +274,8 @@ public class EntityRenderer implements IResourceManagerReloadListener {
float f2 = f3 * (1.0F - f4) + f4; float f2 = f3 * (1.0F - f4) + f4;
this.fogColor1 += (f2 - this.fogColor1) * 0.1F; this.fogColor1 += (f2 - this.fogColor1) * 0.1F;
++this.rendererUpdateCount; ++this.rendererUpdateCount;
this.addRainParticles();
this.itemRenderer.updateEquippedItem(); this.itemRenderer.updateEquippedItem();
this.addRainParticles();
this.bossColorModifierPrev = this.bossColorModifier; this.bossColorModifierPrev = this.bossColorModifier;
if (BossStatus.hasColorModifier) { if (BossStatus.hasColorModifier) {
this.bossColorModifier += 0.05F; this.bossColorModifier += 0.05F;
@ -300,13 +287,13 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} else if (this.bossColorModifier > 0.0F) { } else if (this.bossColorModifier > 0.0F) {
this.bossColorModifier -= 0.0125F; this.bossColorModifier -= 0.0125F;
} }
} }
public void updateShaderGroupSize(int width, int height) { public void updateShaderGroupSize(int width, int height) {
} }
/** /**+
* +
* Finds what block or object the mouse is over at the specified * Finds what block or object the mouse is over at the specified
* partial tick time. Args: partialTickTime * partial tick time. Args: partialTickTime
*/ */
@ -397,8 +384,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
} }
/** /**+
* +
* Update FOV modifier hand * Update FOV modifier hand
*/ */
private void updateFovModifierHand() { private void updateFovModifierHand() {
@ -420,8 +406,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
/** /**+
* +
* Changes the field of view of the player depending on if they * Changes the field of view of the player depending on if they
* are underwater or not * are underwater or not
*/ */
@ -473,8 +458,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
/** /**+
* +
* Setups all the GL settings for view bobbing. Args: * Setups all the GL settings for view bobbing. Args:
* partialTickTime * partialTickTime
*/ */
@ -495,8 +479,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
} }
/** /**+
* +
* sets up player's eye (or camera in third person mode) * sets up player's eye (or camera in third person mode)
*/ */
private void orientCamera(float partialTicks) { private void orientCamera(float partialTicks) {
@ -597,8 +580,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.cloudFog = this.mc.renderGlobal.hasCloudFog(d0, d1, d2, partialTicks); this.cloudFog = this.mc.renderGlobal.hasCloudFog(d0, d1, d2, partialTicks);
} }
/** /**+
* +
* sets up projection, view effects, camera position/rotation * sets up projection, view effects, camera position/rotation
*/ */
private void setupCameraTransform(float partialTicks, int pass) { private void setupCameraTransform(float partialTicks, int pass) {
@ -648,27 +630,26 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.orientCamera(partialTicks); this.orientCamera(partialTicks);
if (this.debugView) { if (this.debugView) {
switch (this.debugViewDirection) { switch (this.debugViewDirection) {
case 0: case 0:
GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
break; break;
case 1: case 1:
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
break; break;
case 2: case 2:
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
break; break;
case 3: case 3:
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
break; break;
case 4: case 4:
GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);
} }
} }
} }
/** /**+
* +
* Render player hand * Render player hand
*/ */
private void renderHand(float partialTicks, int xOffset) { private void renderHand(float partialTicks, int xOffset) {
@ -743,8 +724,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit); GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
} }
/** /**+
* +
* Recompute a random value that is applied to block color in * Recompute a random value that is applied to block color in
* updateLightmap() * updateLightmap()
*/ */
@ -1065,7 +1045,6 @@ public class EntityRenderer implements IResourceManagerReloadListener {
}); });
throw new ReportedException(crashreport); throw new ReportedException(crashreport);
} }
}
this.mc.voiceOverlay.drawOverlay(); this.mc.voiceOverlay.drawOverlay();
} }
@ -1125,7 +1104,6 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
public void renderWorld(float partialTicks, long finishTimeNano) { public void renderWorld(float partialTicks, long finishTimeNano) {
this.updateLightmap(partialTicks); this.updateLightmap(partialTicks);
if (this.mc.getRenderViewEntity() == null) { if (this.mc.getRenderViewEntity() == null) {
this.mc.setRenderViewEntity(this.mc.thePlayer); this.mc.setRenderViewEntity(this.mc.thePlayer);
@ -1345,7 +1323,6 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
GlStateManager.shadeModel(GL_SMOOTH); GlStateManager.shadeModel(GL_SMOOTH);
renderglobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double) partialTicks, pass, entity); renderglobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double) partialTicks, pass, entity);
GlStateManager.disablePolygonOffset();
GlStateManager.shadeModel(GL_FLAT); GlStateManager.shadeModel(GL_FLAT);
GlStateManager.depthMask(true); GlStateManager.depthMask(true);
GlStateManager.enableCull(); GlStateManager.enableCull();
@ -1469,8 +1446,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
} }
/** /**+
* +
* Render rain and snow * Render rain and snow
*/ */
protected void renderRainSnow(float partialTicks) { protected void renderRainSnow(float partialTicks) {
@ -1663,8 +1639,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
} }
} }
/** /**+
* +
* Setup orthogonal projection for rendering GUI screen overlays * Setup orthogonal projection for rendering GUI screen overlays
*/ */
public void setupOverlayRendering() { public void setupOverlayRendering() {
@ -1679,8 +1654,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
GlStateManager.translate(0.0F, 0.0F, -2000.0F); GlStateManager.translate(0.0F, 0.0F, -2000.0F);
} }
/** /**+
* +
* calculates fog and calls glClearColor * calculates fog and calls glClearColor
*/ */
private void updateFogColor(float partialTicks) { private void updateFogColor(float partialTicks) {
@ -1822,8 +1796,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F); GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F);
} }
/** /**+
* +
* Sets up the fog to be rendered. If the arg passed in is -1 * Sets up the fog to be rendered. If the arg passed in is -1
* the fog starts at 0 and goes to 80% of far plane distance and * the fog starts at 0 and goes to 80% of far plane distance and
* is used for sky rendering. * is used for sky rendering.
@ -1897,8 +1870,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
GlStateManager.enableFog(); GlStateManager.enableFog();
} }
/** /**+
* +
* Update and return fogColorBuffer with the RGBA values passed * Update and return fogColorBuffer with the RGBA values passed
* as arguments * as arguments
*/ */
@ -1948,12 +1920,12 @@ public class EntityRenderer implements IResourceManagerReloadListener {
float eyeHeight = entity.getEyeHeight(); float eyeHeight = entity.getEyeHeight();
frustum.setPosition(d0, d1, d2); frustum.setPosition(d0, d1, d2);
// StringBuilder builder = new StringBuilder(); // StringBuilder builder = new StringBuilder();
// long ll = Double.doubleToLongBits(d0); // long ll = Double.doubleToLongBits(d0);
// for(int i = 63; i >= 0; --i) { // for(int i = 63; i >= 0; --i) {
// builder.append((ll >>> i) & 1); // builder.append((ll >>> i) & 1);
// } // }
// System.out.println(builder.toString()); // System.out.println(builder.toString());
float waveTimer = (float) ((EagRuntime.steadyTimeMillis() % 600000l) * 0.001); float waveTimer = (float) ((EagRuntime.steadyTimeMillis() % 600000l) * 0.001);
DeferredStateManager.setWaterWindOffset(0.0f, 0.0f, waveTimer, waveTimer); DeferredStateManager.setWaterWindOffset(0.0f, 0.0f, waveTimer, waveTimer);

View File

@ -4,31 +4,22 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
/** /**+
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
* *
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" * Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team * Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
* *
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, hoosiertransfer, * EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* ayunami2000. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* DIRECT, * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* (INCLUDING, BUT * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
@ -39,6 +30,7 @@ public abstract class AbstractTexture implements ITextureObject {
protected boolean mipmap; protected boolean mipmap;
protected boolean blurLast; protected boolean blurLast;
protected boolean mipmapLast; protected boolean mipmapLast;
protected boolean hasAllocated;
public void setBlurMipmapDirect(boolean parFlag, boolean parFlag2) { public void setBlurMipmapDirect(boolean parFlag, boolean parFlag2) {
if (blur != parFlag || mipmap != parFlag2) { if (blur != parFlag || mipmap != parFlag2) {
@ -76,6 +68,7 @@ public abstract class AbstractTexture implements ITextureObject {
public int getGlTextureId() { public int getGlTextureId() {
if (this.glTextureId == -1) { if (this.glTextureId == -1) {
this.glTextureId = TextureUtil.glGenTextures(); this.glTextureId = TextureUtil.glGenTextures();
hasAllocated = false;
} }
return this.glTextureId; return this.glTextureId;

File diff suppressed because it is too large Load Diff

View File

@ -51,8 +51,7 @@ public class EntityAITasks {
private int tickCount; private int tickCount;
private int tickRate = 3; private int tickRate = 3;
public EntityAITasks(Profiler profilerIn) { public EntityAITasks() {
this.theProfiler = profilerIn;
} }
/**+ /**+

View File

@ -684,7 +684,7 @@ public final class ItemStack {
} }
public List<String> getTooltipImpl(EntityPlayer playerIn, boolean advanced, boolean profanityFilter) { public List<String> getTooltipImpl(EntityPlayer playerIn, boolean advanced, boolean profanityFilter) {
ArrayList arraylist = Lists.newArrayList(); ArrayList list = Lists.newArrayList();
String s = profanityFilter ? this.getDisplayNameProfanityFilter() : this.getDisplayName(); String s = profanityFilter ? this.getDisplayNameProfanityFilter() : this.getDisplayName();
if (this.hasDisplayName()) { if (this.hasDisplayName()) {
s = EnumChatFormatting.ITALIC + s; s = EnumChatFormatting.ITALIC + s;

View File

@ -28,31 +28,22 @@ import org.apache.commons.lang3.Validate;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
/** /**+
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
* *
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" * Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team * Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
* *
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, hoosiertransfer, * EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* ayunami2000. All Rights Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* DIRECT, * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* (INCLUDING, BUT * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
@ -77,8 +68,7 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
this.networkManager = parNetworkManager; this.networkManager = parNetworkManager;
} }
/** /**+
* +
* Like the old updateEntity(), except more generic. * Like the old updateEntity(), except more generic.
*/ */
public void update() { public void update() {
@ -157,8 +147,7 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
} }
/** /**+
* +
* Invoked when disconnecting, the parameter is a ChatComponent * Invoked when disconnecting, the parameter is a ChatComponent
* describing the reason for termination * describing the reason for termination
*/ */

View File

@ -176,7 +176,7 @@ public abstract class World implements IBlockAccess, ILightingEngineProvider, IL
private LightingEngine alfheim$lightingEngine; private LightingEngine alfheim$lightingEngine;
protected World(ISaveHandler saveHandlerIn, WorldInfo info, WorldProvider providerIn, Profiler profilerIn, protected World(ISaveHandler saveHandlerIn, WorldInfo info, WorldProvider providerIn,
boolean client) { boolean client) {
this.ambientTickCountdown = this.rand.nextInt(12000); this.ambientTickCountdown = this.rand.nextInt(12000);
this.spawnHostileMobs = true; this.spawnHostileMobs = true;

View File

@ -4,7 +4,6 @@ import net.hoosiertransfer.Alfheim.util.ClampUtil;
import net.hoosiertransfer.Alfheim.util.DeduplicatedLongQueue; import net.hoosiertransfer.Alfheim.util.DeduplicatedLongQueue;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.profiler.Profiler;
import net.minecraft.util.BlockPos; import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.Vec3i; import net.minecraft.util.Vec3i;
@ -21,8 +20,6 @@ public class LightingEngine {
private final World world; private final World world;
private final Profiler profiler;
private final DeduplicatedLongQueue[] lightUpdateQueues = new DeduplicatedLongQueue[EnumSkyBlock.values().length]; private final DeduplicatedLongQueue[] lightUpdateQueues = new DeduplicatedLongQueue[EnumSkyBlock.values().length];
private final DeduplicatedLongQueue[] darkeningQueues = new DeduplicatedLongQueue[MAX_LIGHT_LEVEL + 1]; private final DeduplicatedLongQueue[] darkeningQueues = new DeduplicatedLongQueue[MAX_LIGHT_LEVEL + 1];
@ -75,7 +72,6 @@ public class LightingEngine {
public LightingEngine(final World world) { public LightingEngine(final World world) {
this.world = world; this.world = world;
profiler = world.theProfiler;
initialBrightenings = new DeduplicatedLongQueue(16384); initialBrightenings = new DeduplicatedLongQueue(16384);
initialDarkenings = new DeduplicatedLongQueue(16384); initialDarkenings = new DeduplicatedLongQueue(16384);
@ -115,11 +111,7 @@ public class LightingEngine {
if (queue.isEmpty()) if (queue.isEmpty())
return; return;
profiler.startSection("process");
processLightUpdatesForTypeInner(lightType, queue); processLightUpdatesForTypeInner(lightType, queue);
profiler.endSection();
} }
private boolean isCallingFromMainThread() { private boolean isCallingFromMainThread() {
@ -127,15 +119,8 @@ public class LightingEngine {
} }
public void processLightUpdates() { public void processLightUpdates() {
profiler.startSection("processSky");
processLightUpdatesForType(EnumSkyBlock.SKY); processLightUpdatesForType(EnumSkyBlock.SKY);
profiler.endStartSection("processBlock");
processLightUpdatesForType(EnumSkyBlock.BLOCK); processLightUpdatesForType(EnumSkyBlock.BLOCK);
profiler.endSection();
} }
private void processLightUpdatesForTypeInner(final EnumSkyBlock lightType, final DeduplicatedLongQueue queue) { private void processLightUpdatesForTypeInner(final EnumSkyBlock lightType, final DeduplicatedLongQueue queue) {
@ -152,8 +137,6 @@ public class LightingEngine {
if (currentQueue != null) if (currentQueue != null)
currentQueue.clearSet(); currentQueue.clearSet();
profiler.startSection("prepare");
// Process the queued updates and enqueue them for further processing // Process the queued updates and enqueue them for further processing
while (nextItem()) { while (nextItem()) {
if (currentChunk == null) if (currentChunk == null)
@ -171,8 +154,6 @@ public class LightingEngine {
// scheduling // scheduling
} }
profiler.endStartSection("enqueueBrightening");
currentQueue = initialBrightenings; currentQueue = initialBrightenings;
if (currentQueue != null) if (currentQueue != null)
@ -192,8 +173,6 @@ public class LightingEngine {
// for later // for later
} }
profiler.endStartSection("enqueueDarkening");
currentQueue = initialDarkenings; currentQueue = initialDarkenings;
if (currentQueue != null) if (currentQueue != null)
@ -207,8 +186,6 @@ public class LightingEngine {
// to only schedule once // to only schedule once
} }
profiler.endStartSection("process");
// Iterate through enqueued updates (brightening and darkening in parallel) from // Iterate through enqueued updates (brightening and darkening in parallel) from
// brightest to darkest so that we only need to iterate once // brightest to darkest so that we only need to iterate once
for (byte currentLight = MAX_LIGHT_LEVEL; currentLight >= 0; --currentLight) { for (byte currentLight = MAX_LIGHT_LEVEL; currentLight >= 0; --currentLight) {
@ -294,9 +271,7 @@ public class LightingEngine {
} }
} }
} }
profiler.endSection();
updating = false; updating = false;
} }

View File

@ -42,6 +42,12 @@ public class EaglercraftVersion {
public static final BigInteger updateSignatureModulus = new BigInteger( public static final BigInteger updateSignatureModulus = new BigInteger(
"9934844152704206425984038360710846195785255499658630347555679233517037320419089417353684680137701223265944443284321705629368787894053054988233896240570752560271396448764359123258518818693879688207544671033079915029195517675413202427147319375331350380376604266826560830299822638274516845927247015696509586216934495843289602444650044805651410710164106192952455213102521880119736500301420208590760465989706511018182601545217390196438291842825959549203290633490664834390313090964927686415922400638755956780717898579080985306487440294133874610155281675147758926351882699414541707391045631732309999601681661304360813629331"); "9934844152704206425984038360710846195785255499658630347555679233517037320419089417353684680137701223265944443284321705629368787894053054988233896240570752560271396448764359123258518818693879688207544671033079915029195517675413202427147319375331350380376604266826560830299822638274516845927247015696509586216934495843289602444650044805651410710164106192952455213102521880119736500301420208590760465989706511018182601545217390196438291842825959549203290633490664834390313090964927686415922400638755956780717898579080985306487440294133874610155281675147758926351882699414541707391045631732309999601681661304360813629331");
// Client brand identification system configuration
public static final EaglercraftUUID clientBrandUUID = EagUtils.makeClientBrandUUID(projectForkName);
public static final EaglercraftUUID legacyClientUUIDInSharedWorld = EagUtils.makeClientBrandUUIDLegacy(projectOriginName);
// Miscellaneous variables: // Miscellaneous variables:
public static final String mainMenuStringA = "Minecraft 1.9.4"; public static final String mainMenuStringA = "Minecraft 1.9.4";

View File

@ -60,6 +60,10 @@ public class GLObjectMap<T> {
return (T) values[obj]; return (T) values[obj];
} }
public void set(int obj, T val) {
values[obj] = val;
}
private void resize() { private void resize() {
int oldSize = size; int oldSize = size;
size += size / 2; size += size / 2;
@ -74,4 +78,4 @@ public class GLObjectMap<T> {
insertIndex = 0; insertIndex = 0;
allocatedObjects = 0; allocatedObjects = 0;
} }
} }