mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #34 - Add dynamic lights, fix vanilla world seeds
This commit is contained in:
@ -409,9 +409,20 @@
|
||||
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
> INSERT 9 : 10 @ 9
|
||||
> INSERT 9 : 21 @ 9
|
||||
|
||||
+ SingleplayerServerController.shutdownEaglercraftServer();
|
||||
+ if (SingleplayerServerController.isWorldRunning()) {
|
||||
+ SingleplayerServerController.shutdownEaglercraftServer();
|
||||
+ while (SingleplayerServerController.getStatusState() == IntegratedServerState.WORLD_UNLOADING) {
|
||||
+ EagUtils.sleep(50l);
|
||||
+ SingleplayerServerController.runTick();
|
||||
+ }
|
||||
+ }
|
||||
+ if (SingleplayerServerController.isIntegratedServerWorkerAlive()
|
||||
+ && SingleplayerServerController.canKillWorker()) {
|
||||
+ SingleplayerServerController.killWorker();
|
||||
+ EagUtils.sleep(50l);
|
||||
+ }
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
+ import java.util.Locale;
|
||||
|
||||
> INSERT 1 : 13 @ 1
|
||||
> INSERT 1 : 14 @ 1
|
||||
|
||||
+ import java.util.TimeZone;
|
||||
+
|
||||
@ -31,6 +31,7 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 10
|
||||
@ -316,7 +317,13 @@
|
||||
|
||||
~ HString.format("Facing: %s (%s) (%.1f / %.1f)",
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+ if (DynamicLightsStateManager.isDynamicLightsRender()) {
|
||||
+ arraylist.add(6, DynamicLightsStateManager.getF3String());
|
||||
+ }
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ arraylist.add("Biome: " + chunk.getBiome(blockpos, null).biomeName);
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
~ GameSettings.Options.VIEW_BOBBING, GameSettings.Options.GUI_SCALE, GameSettings.Options.GAMMA,
|
||||
~ GameSettings.Options.RENDER_CLOUDS, GameSettings.Options.PARTICLES, GameSettings.Options.FXAA,
|
||||
~ GameSettings.Options.MIPMAP_LEVELS, GameSettings.Options.BLOCK_ALTERNATIVES,
|
||||
~ GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG, GameSettings.Options.FULLSCREEN,
|
||||
~ GameSettings.Options.FNAW_SKINS, GameSettings.Options.HUD_FPS, GameSettings.Options.HUD_COORDS,
|
||||
~ GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS, GameSettings.Options.HUD_WORLD,
|
||||
~ GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
|
||||
~ GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG, GameSettings.Options.EAGLER_DYNAMIC_LIGHTS,
|
||||
~ GameSettings.Options.FULLSCREEN, GameSettings.Options.FNAW_SKINS, GameSettings.Options.HUD_FPS,
|
||||
~ GameSettings.Options.HUD_COORDS, GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS,
|
||||
~ GameSettings.Options.HUD_WORLD, GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
|
||||
|
||||
> CHANGE 11 : 13 @ 11 : 31
|
||||
|
||||
|
@ -36,4 +36,11 @@
|
||||
|
||||
~ public void setParticleIcon(EaglerTextureAtlasSprite icon) {
|
||||
|
||||
> INSERT 30 : 34 @ 30
|
||||
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 0.0f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,12 +5,13 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 7 @ 2
|
||||
> INSERT 2 : 8 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.BlockVertexIDs;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
+ import net.minecraft.block.Block;
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
@ -20,10 +21,11 @@
|
||||
~ private EaglerTextureAtlasSprite[] atlasSpritesLava = new EaglerTextureAtlasSprite[2];
|
||||
~ private EaglerTextureAtlasSprite[] atlasSpritesWater = new EaglerTextureAtlasSprite[2];
|
||||
|
||||
> INSERT 15 : 17 @ 15
|
||||
> INSERT 15 : 18 @ 15
|
||||
|
||||
+ BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
+ boolean deferred = DeferredStateManager.isDeferredRenderer();
|
||||
+ boolean isDynamicLights = deferred || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
|
||||
> INSERT 1 : 3 @ 1
|
||||
|
||||
@ -78,7 +80,7 @@
|
||||
|
||||
> CHANGE 31 : 36 @ 31 : 32
|
||||
|
||||
~ if (deferred)
|
||||
~ if (isDynamicLights)
|
||||
~ worldRendererIn.genNormals(true, f12 <= -999.0F ? BlockVertexIDs.builtin_water_still_vertex_id
|
||||
~ : BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
~
|
||||
@ -86,7 +88,7 @@
|
||||
|
||||
> INSERT 8 : 11 @ 8
|
||||
|
||||
+ if (deferred)
|
||||
+ if (isDynamicLights)
|
||||
+ worldRendererIn.genNormals(true, f12 <= -999.0F ? BlockVertexIDs.builtin_water_still_vertex_id
|
||||
+ : BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
|
||||
@ -100,7 +102,7 @@
|
||||
|
||||
> INSERT 10 : 12 @ 10
|
||||
|
||||
+ if (deferred)
|
||||
+ if (isDynamicLights)
|
||||
+ worldRendererIn.putNormal(0.0f, -1.0f, 0.0f, BlockVertexIDs.builtin_water_still_vertex_id);
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
@ -119,7 +121,7 @@
|
||||
|
||||
> CHANGE 15 : 29 @ 15 : 23
|
||||
|
||||
~ if (deferred)
|
||||
~ if (isDynamicLights)
|
||||
~ worldRendererIn.putNormal(j1, 0.0f, k1, BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
~ if (!realistic) {
|
||||
~ worldRendererIn.pos(d3, d1 + 0.0D, d4).color(f32, f33, f34, 1.0F)
|
||||
@ -130,7 +132,7 @@
|
||||
~ .tex((double) f27, (double) f29).lightmap(k, l).endVertex();
|
||||
~ worldRendererIn.pos(d3, d1 + (double) f39, d4).color(f32, f33, f34, 1.0F)
|
||||
~ .tex((double) f41, (double) f28).lightmap(k, l).endVertex();
|
||||
~ if (deferred)
|
||||
~ if (isDynamicLights)
|
||||
~ worldRendererIn.putNormal(-j1, 0.0f, -k1, BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
~ }
|
||||
|
||||
|
@ -5,13 +5,14 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 4 : 9 @ 4
|
||||
> INSERT 4 : 10 @ 4
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.VertexMarkerState;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
|
||||
> DELETE 3 @ 3 : 7
|
||||
|
||||
@ -52,20 +53,22 @@
|
||||
|
||||
~ worldRendererIn, list1, bitset, afloat);
|
||||
|
||||
> INSERT 9 : 10 @ 9
|
||||
> INSERT 9 : 11 @ 9
|
||||
|
||||
+ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
+ boolean isDynamicLights = isDeferred || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ if (!isDeferred && block$enumoffsettype == Block.EnumOffsetType.XYZ) {
|
||||
|
||||
> CHANGE 4 : 8 @ 4 : 6
|
||||
> CHANGE 4 : 9 @ 4 : 6
|
||||
|
||||
~ for (int i = 0, l = listQuadsIn.size(); i < l; ++i) {
|
||||
~ BakedQuad bakedquad = listQuadsIn.get(i);
|
||||
~ int[] vertData = isDeferred ? bakedquad.getVertexDataWithNormals() : bakedquad.getVertexData();
|
||||
~ this.fillQuadBounds(blockIn, vertData, bakedquad.getFace(), quadBounds, boundsFlags, isDeferred ? 8 : 7);
|
||||
~ int[] vertData = isDynamicLights ? bakedquad.getVertexDataWithNormals() : bakedquad.getVertexData();
|
||||
~ this.fillQuadBounds(blockIn, vertData, bakedquad.getFace(), quadBounds, boundsFlags,
|
||||
~ isDynamicLights ? 8 : 7);
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
@ -101,10 +104,11 @@
|
||||
+ private final BlockPos blockpos5 = new BlockPos(0, 0, 0);
|
||||
+
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
> CHANGE 2 : 5 @ 2 : 3
|
||||
|
||||
~ List<BakedQuad> listQuadsIn, BitSet boundsFlags, float[] quadBounds) {
|
||||
~ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
~ boolean isDynamicLights = isDeferred || DynamicLightsStateManager.isDynamicLightsRender();
|
||||
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
||||
@ -115,9 +119,9 @@
|
||||
~ for (int m = 0, n = listQuadsIn.size(); m < n; ++m) {
|
||||
~ BakedQuad bakedquad = listQuadsIn.get(m);
|
||||
~ EnumFacing facingIn = bakedquad.getFace();
|
||||
~ int[] vertData = isDeferred ? bakedquad.getVertexDataWithNormals() : bakedquad.getVertexData();
|
||||
~ int[] vertData = isDynamicLights ? bakedquad.getVertexDataWithNormals() : bakedquad.getVertexData();
|
||||
~ blockPosIn.offsetEvenFaster(facingIn, blockpos0);
|
||||
~ this.fillQuadBounds(blockIn, vertData, facingIn, quadBounds, boundsFlags, isDeferred ? 8 : 7);
|
||||
~ this.fillQuadBounds(blockIn, vertData, facingIn, quadBounds, boundsFlags, isDynamicLights ? 8 : 7);
|
||||
~ boolean boundsFlags0 = boundsFlags.get(0);
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 5
|
||||
|
@ -7,13 +7,14 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
> CHANGE 1 : 7 @ 1 : 2
|
||||
|
||||
~
|
||||
~ import com.google.common.collect.Lists;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
@ -23,17 +24,22 @@
|
||||
|
||||
~ public void preRenderChunk(RenderChunk renderChunkIn, EnumWorldBlockLayer enumworldblocklayer) {
|
||||
|
||||
> CHANGE 1 : 11 @ 1 : 4
|
||||
> CHANGE 1 : 16 @ 1 : 4
|
||||
|
||||
~ float posX = (float) ((double) blockpos.getX() - this.viewEntityX);
|
||||
~ float posY = (float) ((double) blockpos.getY() - this.viewEntityY);
|
||||
~ float posZ = (float) ((double) blockpos.getZ() - this.viewEntityZ);
|
||||
~ GlStateManager.translate(posX, posY, posZ);
|
||||
~ if (DeferredStateManager.isInForwardPass()) {
|
||||
~ posX = (float) (blockpos.getX() - (MathHelper.floor_double(this.viewEntityX / 16.0) << 4)); // TODO
|
||||
~ posX = (float) (blockpos.getX() - (MathHelper.floor_double(this.viewEntityX / 16.0) << 4));
|
||||
~ posY = (float) (blockpos.getY() - (MathHelper.floor_double(this.viewEntityY / 16.0) << 4));
|
||||
~ posZ = (float) (blockpos.getZ() - (MathHelper.floor_double(this.viewEntityZ / 16.0) << 4));
|
||||
~ DeferredStateManager.reportForwardRenderObjectPosition((int) posX, (int) posY, (int) posZ);
|
||||
~ } else if (DynamicLightsStateManager.isInDynamicLightsPass()) {
|
||||
~ posX = (float) (blockpos.getX() - (MathHelper.floor_double(this.viewEntityX / 16.0) << 4));
|
||||
~ posY = (float) (blockpos.getY() - (MathHelper.floor_double(this.viewEntityY / 16.0) << 4));
|
||||
~ posZ = (float) (blockpos.getZ() - (MathHelper.floor_double(this.viewEntityZ / 16.0) << 4));
|
||||
~ DynamicLightsStateManager.reportForwardRenderObjectPosition((int) posX, (int) posY, (int) posZ);
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -16,7 +16,7 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
|
||||
> INSERT 1 : 28 @ 1
|
||||
> INSERT 1 : 29 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.base.Predicate;
|
||||
@ -42,6 +42,7 @@
|
||||
+ 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.texture.EmissiveItems;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
@ -151,7 +152,13 @@
|
||||
~ (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, farPlane);
|
||||
~ DeferredStateManager.setGBufferNearFarPlanes(0.05f, farPlane);
|
||||
|
||||
> CHANGE 57 : 58 @ 57 : 58
|
||||
> INSERT 50 : 53 @ 50
|
||||
|
||||
+ if (DynamicLightsStateManager.isInDynamicLightsPass()) {
|
||||
+ DynamicLightsStateManager.reportForwardRenderObjectPosition2(0.0f, 0.0f, 0.0f);
|
||||
+ }
|
||||
|
||||
> CHANGE 7 : 8 @ 7 : 8
|
||||
|
||||
~ GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, false),
|
||||
|
||||
@ -176,12 +183,13 @@
|
||||
|
||||
~ this.lightmapColors[i] = short1 << 24 | j | k << 8 | l << 16;
|
||||
|
||||
> INSERT 3 : 17 @ 3
|
||||
> INSERT 3 : 18 @ 3
|
||||
|
||||
+
|
||||
+ GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
||||
+ this.mc.getTextureManager().bindTexture(this.locationLightMap);
|
||||
+ if (mc.gameSettings.fancyGraphics || mc.gameSettings.ambientOcclusion > 0) {
|
||||
+ if (mc.gameSettings.fancyGraphics || mc.gameSettings.ambientOcclusion > 0
|
||||
+ || DynamicLightsStateManager.isDynamicLightsRender()) {
|
||||
+ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
+ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
+ } else {
|
||||
@ -283,11 +291,31 @@
|
||||
+ VoiceTagRenderer.clearTagsDrawnSet();
|
||||
+
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
> CHANGE 4 : 25 @ 4 : 12
|
||||
|
||||
~ boolean dlights = DynamicLightsStateManager.isDynamicLightsRender();
|
||||
~ if (dlights) {
|
||||
~ updateDynamicLightListEagler(partialTicks);
|
||||
~ }
|
||||
~ if (this.mc.gameSettings.anaglyph && !this.mc.gameSettings.shaders) {
|
||||
~ if (dlights) {
|
||||
~ GlStateManager.enableExtensionPipeline();
|
||||
~ }
|
||||
~ try {
|
||||
~ anaglyphField = 0;
|
||||
~ GlStateManager.colorMask(false, true, true, false);
|
||||
~ this.renderWorldPass(0, partialTicks, finishTimeNano);
|
||||
~ anaglyphField = 1;
|
||||
~ GlStateManager.colorMask(true, false, false, false);
|
||||
~ this.renderWorldPass(1, partialTicks, finishTimeNano);
|
||||
~ GlStateManager.colorMask(true, true, true, false);
|
||||
~ } finally {
|
||||
~ if (dlights) {
|
||||
~ GlStateManager.disableExtensionPipeline();
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> CHANGE 8 : 24 @ 8 : 9
|
||||
> CHANGE 1 : 26 @ 1 : 2
|
||||
|
||||
~ if (this.mc.gameSettings.shaders) {
|
||||
~ try {
|
||||
@ -303,7 +331,16 @@
|
||||
~ mc.effectRenderer.acceleratedParticleRenderer = EffectRenderer.vanillaAcceleratedParticleRenderer;
|
||||
~ } else {
|
||||
~ mc.effectRenderer.acceleratedParticleRenderer = EffectRenderer.vanillaAcceleratedParticleRenderer;
|
||||
~ this.renderWorldPass(2, partialTicks, finishTimeNano);
|
||||
~ if (dlights) {
|
||||
~ GlStateManager.enableExtensionPipeline();
|
||||
~ }
|
||||
~ try {
|
||||
~ this.renderWorldPass(2, partialTicks, finishTimeNano);
|
||||
~ } finally {
|
||||
~ if (dlights) {
|
||||
~ GlStateManager.disableExtensionPipeline();
|
||||
~ }
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
@ -313,9 +350,22 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 15 @ 15 : 17
|
||||
> INSERT 14 : 18 @ 14
|
||||
|
||||
> CHANGE 12 : 15 @ 12 : 14
|
||||
+ boolean isDynamicLights = DynamicLightsStateManager.isDynamicLightsRender();
|
||||
+ if (isDynamicLights) {
|
||||
+ DynamicLightsStateManager.setupInverseViewMatrix();
|
||||
+ }
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> INSERT 6 : 9 @ 6
|
||||
|
||||
+ TileEntityRendererDispatcher.staticPlayerX = d0; // hack, needed for some eagler stuff
|
||||
+ TileEntityRendererDispatcher.staticPlayerY = d1;
|
||||
+ TileEntityRendererDispatcher.staticPlayerZ = d2;
|
||||
|
||||
> CHANGE 6 : 9 @ 6 : 8
|
||||
|
||||
~ float vigg = this.getFOVModifier(partialTicks, true);
|
||||
~ GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
||||
@ -335,11 +385,59 @@
|
||||
|
||||
+ GlStateManager.shadeModel(7424);
|
||||
|
||||
> CHANGE 46 : 47 @ 46 : 47
|
||||
> INSERT 16 : 19 @ 16
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.disableExtensionPipeline();
|
||||
+ }
|
||||
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.enableExtensionPipeline();
|
||||
+ }
|
||||
|
||||
> INSERT 8 : 11 @ 8
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.disableExtensionPipeline();
|
||||
+ }
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.enableExtensionPipeline();
|
||||
+ }
|
||||
|
||||
> CHANGE 17 : 25 @ 17 : 18
|
||||
|
||||
~ if (isDynamicLights) {
|
||||
~ DynamicLightsStateManager.bindAcceleratedEffectRenderer(effectrenderer);
|
||||
~ DynamicLightsStateManager.reportForwardRenderObjectPosition2(0.0f, 0.0f, 0.0f);
|
||||
~ }
|
||||
~ effectrenderer.renderParticles(entity, partialTicks, 2);
|
||||
~ if (isDynamicLights) {
|
||||
~ effectrenderer.acceleratedParticleRenderer = null;
|
||||
~ }
|
||||
|
||||
> CHANGE 44 : 45 @ 44 : 45
|
||||
> INSERT 39 : 53 @ 39
|
||||
|
||||
+ private void updateDynamicLightListEagler(float partialTicks) {
|
||||
+ DynamicLightsStateManager.clearRenderList();
|
||||
+ Entity entity = this.mc.getRenderViewEntity();
|
||||
+ double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double) partialTicks;
|
||||
+ double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double) partialTicks;
|
||||
+ double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double) partialTicks;
|
||||
+ AxisAlignedBB entityAABB = new AxisAlignedBB(d0 - 48.0, d1 - 32.0, d2 - 48.0, d0 + 48.0, d1 + 32.0, d2 + 48.0);
|
||||
+ List<Entity> entities = this.mc.theWorld.getEntitiesWithinAABB(Entity.class, entityAABB);
|
||||
+ for (int i = 0, l = entities.size(); i < l; ++i) {
|
||||
+ entities.get(i).renderDynamicLightsEaglerSimple(partialTicks);
|
||||
+ }
|
||||
+ DynamicLightsStateManager.commitLightSourceBuckets(d0, d1, d2);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
||||
|
||||
@ -359,12 +457,15 @@
|
||||
|
||||
+ boolean df = DeferredStateManager.isInDeferredPass();
|
||||
|
||||
> CHANGE 9 : 25 @ 9 : 13
|
||||
> CHANGE 9 : 28 @ 9 : 13
|
||||
|
||||
~ if (!df) {
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
~ GlStateManager.alphaFunc(516, 0.1F);
|
||||
~ if (DynamicLightsStateManager.isInDynamicLightsPass()) {
|
||||
~ DynamicLightsStateManager.reportForwardRenderObjectPosition2(0.0f, 0.0f, 0.0f);
|
||||
~ }
|
||||
~ } else {
|
||||
~ GlStateManager.enableAlpha();
|
||||
~ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
|
@ -14,7 +14,7 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~
|
||||
|
||||
> INSERT 2 : 22 @ 2
|
||||
> INSERT 2 : 23 @ 2
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
@ -34,6 +34,7 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.SharedPipelineShaders;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
|
||||
@ -142,7 +143,7 @@
|
||||
+ this.renderDistanceChunks = this.mc.gameSettings.renderDistanceChunks;
|
||||
+
|
||||
|
||||
> INSERT 19 : 75 @ 19
|
||||
> INSERT 19 : 85 @ 19
|
||||
|
||||
+
|
||||
+ if (mc.gameSettings.shaders) {
|
||||
@ -200,6 +201,16 @@
|
||||
+ }
|
||||
+ SharedPipelineShaders.free();
|
||||
+ }
|
||||
+
|
||||
+ if (DeferredStateManager.isDeferredRenderer()) {
|
||||
+ DynamicLightsStateManager.disableDynamicLightsRender(false);
|
||||
+ } else {
|
||||
+ if (mc.gameSettings.enableDynamicLights) {
|
||||
+ DynamicLightsStateManager.enableDynamicLightsRender();
|
||||
+ } else {
|
||||
+ DynamicLightsStateManager.disableDynamicLightsRender(true);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> DELETE 9 @ 9 : 13
|
||||
|
||||
@ -600,16 +611,25 @@
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
|
||||
> CHANGE 155 : 157 @ 155 : 156
|
||||
> CHANGE 155 : 159 @ 155 : 156
|
||||
|
||||
~ worldRendererIn.begin(7, DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
~ worldRendererIn.begin(7,
|
||||
~ (DeferredStateManager.isDeferredRenderer() || DynamicLightsStateManager.isDynamicLightsRender())
|
||||
~ ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> CHANGE 19 : 20 @ 19 : 20
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = this.destroyBlockIcons[i];
|
||||
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
> INSERT 1 : 5 @ 1
|
||||
|
||||
+ if (DynamicLightsStateManager.isInDynamicLightsPass()) {
|
||||
+ DynamicLightsStateManager.reportForwardRenderObjectPosition2(blockpos.x, blockpos.y,
|
||||
+ blockpos.z);
|
||||
+ }
|
||||
|
||||
> CHANGE 16 : 18 @ 16 : 17
|
||||
|
||||
~ if (partialTicks == 0 && movingObjectPositionIn != null
|
||||
~ && movingObjectPositionIn.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
|
@ -5,13 +5,14 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 7 @ 2
|
||||
> INSERT 2 : 8 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.VertexMarkerState;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 1 @ 1 : 6
|
||||
|
||||
@ -70,9 +71,11 @@
|
||||
~ float[] sprite, EaglerTextureAtlasSprite modelRotationIn, ModelRotation partRotation,
|
||||
~ BlockPartRotation uvLocked, boolean shade, boolean parFlag2, Vector3f calcNormal) {
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
> CHANGE 1 : 4 @ 1 : 2
|
||||
|
||||
~ int i = (parFlag2 && stride != 8) ? this.getFaceShadeColor(enumfacing) : -1;
|
||||
~ int i = (parFlag2 && (stride != 8 || !Minecraft.getMinecraft().gameSettings.shaders))
|
||||
~ ? this.getFaceShadeColor(enumfacing)
|
||||
~ : -1;
|
||||
|
||||
> CHANGE 7 : 9 @ 7 : 8
|
||||
|
||||
@ -84,12 +87,18 @@
|
||||
~ EaglerTextureAtlasSprite sprite, BlockFaceUV faceUV, EnumFacing facing, Vector3f calcNormal) {
|
||||
~ int i = storeIndex * stride;
|
||||
|
||||
> INSERT 4 : 27 @ 4
|
||||
> INSERT 4 : 33 @ 4
|
||||
|
||||
+ if (stride == 8) {
|
||||
+ faceData[i] = Float.floatToRawIntBits(position.x * VertexMarkerState.localCoordDeriveHackX);
|
||||
+ faceData[i + 1] = Float.floatToRawIntBits(position.y * VertexMarkerState.localCoordDeriveHackY);
|
||||
+ faceData[i + 2] = Float.floatToRawIntBits(position.z * VertexMarkerState.localCoordDeriveHackZ);
|
||||
+ if (!Minecraft.getMinecraft().gameSettings.shaders) {
|
||||
+ faceData[i] = Float.floatToRawIntBits(position.x);
|
||||
+ faceData[i + 1] = Float.floatToRawIntBits(position.y);
|
||||
+ faceData[i + 2] = Float.floatToRawIntBits(position.z);
|
||||
+ } else {
|
||||
+ faceData[i] = Float.floatToRawIntBits(position.x * VertexMarkerState.localCoordDeriveHackX);
|
||||
+ faceData[i + 1] = Float.floatToRawIntBits(position.y * VertexMarkerState.localCoordDeriveHackY);
|
||||
+ faceData[i + 2] = Float.floatToRawIntBits(position.z * VertexMarkerState.localCoordDeriveHackZ);
|
||||
+ }
|
||||
+ if (calcNormal != null) {
|
||||
+ int x = (byte) ((int) (calcNormal.x * 127.0F)) & 255;
|
||||
+ int y = (byte) ((int) (calcNormal.y * 127.0F)) & 255;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 5
|
||||
|
||||
> CHANGE 3 : 11 @ 3 : 4
|
||||
> CHANGE 3 : 12 @ 3 : 4
|
||||
|
||||
~
|
||||
~ import com.google.common.collect.Maps;
|
||||
@ -17,6 +17,7 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.VertexFormat;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
|
||||
> DELETE 4 @ 4 : 7
|
||||
|
||||
@ -152,10 +153,12 @@
|
||||
~ this.compileTask.setCompiledChunk(this.compiledChunk);
|
||||
~ return this.compileTask;
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
> CHANGE 3 : 7 @ 3 : 4
|
||||
|
||||
~ worldRendererIn.begin(7,
|
||||
~ DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS : DefaultVertexFormats.BLOCK);
|
||||
~ (DeferredStateManager.isDeferredRenderer() || DynamicLightsStateManager.isDynamicLightsRender())
|
||||
~ ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> CHANGE 5 : 7 @ 5 : 6
|
||||
|
||||
|
@ -5,20 +5,23 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
> INSERT 2 : 7 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.VertexFormat;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> CHANGE 28 : 30 @ 28 : 29
|
||||
> CHANGE 28 : 32 @ 28 : 29
|
||||
|
||||
~ worldrenderer.begin(7, DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
~ worldrenderer.begin(7,
|
||||
~ (DeferredStateManager.isDeferredRenderer()
|
||||
~ || DynamicLightsStateManager.isDynamicLightsRender()) ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> EOF
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 10 @ 1
|
||||
> INSERT 1 : 11 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Maps;
|
||||
@ -17,6 +17,7 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.profile.RenderHighPoly;
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
@ -61,7 +62,14 @@
|
||||
|
||||
~ public <T extends Entity> Render getEntityRenderObject(Entity entityIn) {
|
||||
|
||||
> INSERT 85 : 86 @ 85
|
||||
> INSERT 82 : 86 @ 82
|
||||
|
||||
+ if (DynamicLightsStateManager.isInDynamicLightsPass()) {
|
||||
+ DynamicLightsStateManager.reportForwardRenderObjectPosition2((float) (d0 - viewerPosX),
|
||||
+ (float) (d1 - viewerPosY), (float) (d2 - viewerPosZ));
|
||||
+ }
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
|
||||
|
@ -67,4 +67,13 @@
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> INSERT 3 : 5 @ 3
|
||||
|
||||
+ GlStateManager.enablePolygonOffset();
|
||||
+ GlStateManager.doPolygonOffset(-0.025f, 1.0f);
|
||||
|
||||
> INSERT 20 : 21 @ 20
|
||||
|
||||
+ GlStateManager.disablePolygonOffset();
|
||||
|
||||
> EOF
|
||||
|
@ -7,13 +7,14 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
> INSERT 1 : 7 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
@ -24,4 +25,10 @@
|
||||
~ tileentityspecialrenderer = this
|
||||
~ .getSpecialRendererByClass((Class<? extends TileEntity>) teClass.getSuperclass());
|
||||
|
||||
> INSERT 52 : 55 @ 52
|
||||
|
||||
+ if (DynamicLightsStateManager.isInDynamicLightsPass()) {
|
||||
+ DynamicLightsStateManager.reportForwardRenderObjectPosition2((float) x, (float) y, (float) z);
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -91,7 +91,7 @@
|
||||
|
||||
~ public int guiScale = 3;
|
||||
|
||||
> INSERT 3 : 17 @ 3
|
||||
> INSERT 3 : 18 @ 3
|
||||
|
||||
+ public boolean hudFps = true;
|
||||
+ public boolean hudCoords = true;
|
||||
@ -107,6 +107,7 @@
|
||||
+ public EaglerDeferredConfig deferredShaderConf = new EaglerDeferredConfig();
|
||||
+ public boolean enableUpdateSvc = true;
|
||||
+ public boolean enableFNAWSkins = true;
|
||||
+ public boolean enableDynamicLights = false;
|
||||
|
||||
> CHANGE 1 : 7 @ 1 : 2
|
||||
|
||||
@ -157,7 +158,7 @@
|
||||
|
||||
> DELETE 20 @ 20 : 37
|
||||
|
||||
> INSERT 13 : 62 @ 13
|
||||
> INSERT 13 : 67 @ 13
|
||||
|
||||
+ if (parOptions == GameSettings.Options.HUD_FPS) {
|
||||
+ this.hudFps = !this.hudFps;
|
||||
@ -208,6 +209,11 @@
|
||||
+ this.enableVsync = !this.enableVsync;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.EAGLER_DYNAMIC_LIGHTS) {
|
||||
+ this.enableDynamicLights = !this.enableDynamicLights;
|
||||
+ this.mc.renderGlobal.loadRenderers();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 34
|
||||
|
||||
@ -217,7 +223,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> INSERT 8 : 30 @ 8
|
||||
> INSERT 8 : 32 @ 8
|
||||
|
||||
+ case HUD_COORDS:
|
||||
+ return this.hudCoords;
|
||||
@ -241,6 +247,8 @@
|
||||
+ return this.enableFNAWSkins;
|
||||
+ case EAGLER_VSYNC:
|
||||
+ return this.enableVsync;
|
||||
+ case EAGLER_DYNAMIC_LIGHTS:
|
||||
+ return this.enableDynamicLights;
|
||||
|
||||
> CHANGE 43 : 46 @ 43 : 47
|
||||
|
||||
@ -451,13 +459,17 @@
|
||||
|
||||
~ for (EnumPlayerModelParts enumplayermodelparts : EnumPlayerModelParts._VALUES) {
|
||||
|
||||
> INSERT 4 : 10 @ 4
|
||||
> INSERT 4 : 14 @ 4
|
||||
|
||||
+
|
||||
+ if (astring[0].equals("enableFNAWSkins")) {
|
||||
+ this.enableFNAWSkins = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("enableDynamicLights")) {
|
||||
+ this.enableDynamicLights = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ deferredShaderConf.readOption(astring[0], astring[1]);
|
||||
|
||||
> CHANGE 6 : 13 @ 6 : 7
|
||||
@ -509,7 +521,7 @@
|
||||
|
||||
> DELETE 13 @ 13 : 24
|
||||
|
||||
> INSERT 5 : 21 @ 5
|
||||
> INSERT 5 : 22 @ 5
|
||||
|
||||
+ printwriter.println("hudFps:" + this.hudFps);
|
||||
+ printwriter.println("hudWorld:" + this.hudWorld);
|
||||
@ -527,6 +539,7 @@
|
||||
+ printwriter.println("voiceSpeakVolume:" + this.voiceSpeakVolume);
|
||||
+ printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
||||
+ printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
||||
+ printwriter.println("enableDynamicLights:" + this.enableDynamicLights);
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 6
|
||||
|
||||
@ -576,7 +589,7 @@
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ RENDER_DISTANCE("options.renderDistance", true, false, 1.0F, 16.0F, 1.0F),
|
||||
~ RENDER_DISTANCE("options.renderDistance", true, false, 1.0F, 18.0F, 1.0F),
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 12
|
||||
|
||||
@ -592,6 +605,6 @@
|
||||
~ FOG("options.fog", false, true), FXAA("options.fxaa", false, false),
|
||||
~ FULLSCREEN("options.fullscreen", false, true),
|
||||
~ FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
||||
~ EAGLER_VSYNC("options.vsync", false, true);
|
||||
~ EAGLER_VSYNC("options.vsync", false, true), EAGLER_DYNAMIC_LIGHTS("options.dynamicLights", false, true);
|
||||
|
||||
> EOF
|
||||
|
@ -5,12 +5,13 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 8 @ 3 : 5
|
||||
> CHANGE 3 : 9 @ 3 : 5
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
~
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
@ -94,7 +95,24 @@
|
||||
~ for (int i = 0, l = list.size(); i < l; ++i) {
|
||||
~ y = list.get(i).calculateYOffset(this.getEntityBoundingBox(), y);
|
||||
|
||||
> CHANGE 650 : 652 @ 650 : 651
|
||||
> CHANGE 347 : 353 @ 347 : 348
|
||||
|
||||
~ int i = 0;
|
||||
~ if (DynamicLightsStateManager.isDynamicLightsRender()) {
|
||||
~ i += (int) (getEaglerDynamicLightsValueSimple(var1) * 15.0f);
|
||||
~ }
|
||||
~ return this.worldObj.isBlockLoaded(blockpos) ? this.worldObj.getCombinedLight(blockpos, -i)
|
||||
~ : (i > 15 ? 240 : (i << 4));
|
||||
|
||||
> CHANGE 4 : 9 @ 4 : 5
|
||||
|
||||
~ float f = this.worldObj.isBlockLoaded(blockpos) ? this.worldObj.getLightBrightness(blockpos) : 0.0F;
|
||||
~ if (DynamicLightsStateManager.isDynamicLightsRender()) {
|
||||
~ f = Math.min(f + getEaglerDynamicLightsValueSimple(var1), 1.0f);
|
||||
~ }
|
||||
~ return f;
|
||||
|
||||
> CHANGE 297 : 299 @ 297 : 298
|
||||
|
||||
~ this.entityUniqueID = new EaglercraftUUID(tagCompund.getLong("UUIDMost"),
|
||||
~ tagCompund.getLong("UUIDLeast"));
|
||||
@ -125,7 +143,7 @@
|
||||
|
||||
~ public EaglercraftUUID getUniqueID() {
|
||||
|
||||
> INSERT 151 : 177 @ 151
|
||||
> INSERT 151 : 205 @ 151
|
||||
|
||||
+
|
||||
+ public void renderDynamicLightsEagler(float partialTicks, boolean isInFrustum) {
|
||||
@ -135,7 +153,8 @@
|
||||
+ double entityX2 = entityX - TileEntityRendererDispatcher.staticPlayerX;
|
||||
+ double entityY2 = entityY - TileEntityRendererDispatcher.staticPlayerY;
|
||||
+ double entityZ2 = entityZ - TileEntityRendererDispatcher.staticPlayerZ;
|
||||
+ if (Math.sqrt(entityX2 * entityX2 + entityY2 * entityY2 + entityZ2 * entityZ2) < 48.0 * 48.0) {
|
||||
+ if (entityX2 * entityX2 + entityY2 * entityY2
|
||||
+ + entityZ2 * entityZ2 < (isInFrustum ? (64.0 * 64.0) : (24.0 * 24.0))) {
|
||||
+ renderDynamicLightsEaglerAt(entityX, entityY, entityZ, entityX2, entityY2, entityZ2, partialTicks,
|
||||
+ isInFrustum);
|
||||
+ }
|
||||
@ -143,15 +162,42 @@
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
+ double renderY, double renderZ, float partialTicks, boolean isInFrustum) {
|
||||
+ float size = Math.max(width, height);
|
||||
+ if (size < 1.0f && !isInFrustum) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (this.isBurning()) {
|
||||
+ float size = Math.max(width, height);
|
||||
+ if (size < 1.0f && !isInFrustum) {
|
||||
+ return;
|
||||
+ }
|
||||
+ float mag = 5.0f * size;
|
||||
+ DynamicLightManager.renderDynamicLight("entity_" + entityId + "_fire", entityX, entityY + height * 0.75,
|
||||
+ entityZ, mag, 0.487f * mag, 0.1411f * mag, false);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void renderDynamicLightsEaglerSimple(float partialTicks) {
|
||||
+ double entityX = prevPosX + (posX - prevPosX) * (double) partialTicks;
|
||||
+ double entityY = prevPosY + (posY - prevPosY) * (double) partialTicks;
|
||||
+ double entityZ = prevPosZ + (posZ - prevPosZ) * (double) partialTicks;
|
||||
+ renderDynamicLightsEaglerSimpleAt(entityX, entityY, entityZ, partialTicks);
|
||||
+ }
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerSimpleAt(double entityX, double entityY, double entityZ,
|
||||
+ float partialTicks) {
|
||||
+ float renderBrightness = this.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ if (renderBrightness > 0.1f) {
|
||||
+ DynamicLightsStateManager.renderDynamicLight("entity_" + entityId + "_lightmap", entityX,
|
||||
+ entityY + height * 0.85, entityZ, renderBrightness * 13.0f);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float size = Math.max(width, height);
|
||||
+ if (size < 1.0f) {
|
||||
+ return 0.0f;
|
||||
+ }
|
||||
+ if (this.isBurning()) {
|
||||
+ return size / 2.0f;
|
||||
+ }
|
||||
+ return 0.0f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -40,7 +40,7 @@
|
||||
~ for (int i = 0; i < inv.length; ++i) {
|
||||
~ ItemStack itemstack1 = inv[i];
|
||||
|
||||
> INSERT 1254 : 1265 @ 1254
|
||||
> INSERT 1254 : 1277 @ 1254
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
@ -53,5 +53,17 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float f = super.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ ItemStack itm = this.getHeldItem();
|
||||
+ if (itm != null && itm.stackSize > 0) {
|
||||
+ Item item = itm.getItem();
|
||||
+ if (item != null) {
|
||||
+ float f2 = item.getHeldItemBrightnessEagler();
|
||||
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
|
||||
+ }
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -21,4 +21,11 @@
|
||||
~ for (int i = 0, l = lst.size(); i < l; ++i) {
|
||||
~ lst.get(i).triggerAchievement(AchievementList.killWither);
|
||||
|
||||
> INSERT 13 : 17 @ 13
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 1.0f;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,6 +5,28 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 168 : 183 @ 168
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 0.5f;
|
||||
+ }
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
+ double renderY, double renderZ, float partialTicks, boolean isInFrustum) {
|
||||
+ super.renderDynamicLightsEaglerAt(entityX, entityY, entityZ, renderX, renderY, renderZ, partialTicks,
|
||||
+ isInFrustum);
|
||||
+ if (isInFrustum && renderX * renderX + renderY * renderY + renderZ * renderZ < 150.0) {
|
||||
+ float mag = 0.5f;
|
||||
+ DynamicLightManager.renderDynamicLight("entity_" + getEntityId() + "_endereye", entityX, entityY + 0.2,
|
||||
+ entityZ, mag * 0.1990f, mag * 0.7750f, mag * 0.4130f, false);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -0,0 +1,15 @@
|
||||
|
||||
# Eagler Context Redacted Diff
|
||||
# Copyright (c) 2024 lax1dude. All rights reserved.
|
||||
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 156 : 160 @ 156
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 1.0f;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
@ -25,7 +25,7 @@
|
||||
~ for (int i = 0, l = lst.size(); i < l; ++i) {
|
||||
~ this.combineItems(lst.get(i));
|
||||
|
||||
> INSERT 258 : 267 @ 258
|
||||
> INSERT 258 : 280 @ 258
|
||||
|
||||
+
|
||||
+ public boolean eaglerEmissiveFlag = false;
|
||||
@ -36,5 +36,18 @@
|
||||
+ isInFrustum);
|
||||
+ eaglerEmissiveFlag = Minecraft.getMinecraft().entityRenderer.renderItemEntityLight(this, 0.1f);
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float f = super.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ ItemStack itm = this.getEntityItem();
|
||||
+ if (itm != null && itm.stackSize > 0) {
|
||||
+ Item item = itm.getItem();
|
||||
+ if (item != null) {
|
||||
+ float f2 = item.getHeldItemBrightnessEagler() * 0.75f;
|
||||
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
|
||||
+ }
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -9,7 +9,11 @@
|
||||
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> INSERT 189 : 198 @ 189
|
||||
> INSERT 5 : 6 @ 5
|
||||
|
||||
+ import net.minecraft.item.Item;
|
||||
|
||||
> INSERT 184 : 206 @ 184
|
||||
|
||||
+
|
||||
+ public boolean eaglerEmissiveFlag = false;
|
||||
@ -20,5 +24,18 @@
|
||||
+ isInFrustum);
|
||||
+ eaglerEmissiveFlag = Minecraft.getMinecraft().entityRenderer.renderItemEntityLight(this, 0.1f);
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float f = super.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ ItemStack itm = this.getDisplayedItem();
|
||||
+ if (itm != null && itm.stackSize > 0) {
|
||||
+ Item item = itm.getItem();
|
||||
+ if (item != null) {
|
||||
+ float f2 = item.getHeldItemBrightnessEagler() * 0.75f;
|
||||
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
|
||||
+ }
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 159 : 170 @ 159
|
||||
> INSERT 159 : 178 @ 159
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
@ -24,5 +24,13 @@
|
||||
+ entityZ, dynamicLightMag, dynamicLightMag * 0.7792f, dynamicLightMag * 0.618f, false);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float f = super.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ if (minecartTNTFuse > -1 && minecartTNTFuse / 5 % 2 == 0) {
|
||||
+ f = Math.min(f + 0.75f, 1.25f);
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
|
||||
> INSERT 90 : 101 @ 90
|
||||
> INSERT 90 : 109 @ 90
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
@ -22,5 +22,13 @@
|
||||
+ entityZ, dynamicLightMag, dynamicLightMag * 0.7792f, dynamicLightMag * 0.618f, false);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float f = super.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ if (fuse / 5 % 2 == 0) {
|
||||
+ f = Math.min(f + 0.75f, 1.25f);
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -9,7 +9,14 @@
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
|
||||
> INSERT 205 : 216 @ 205
|
||||
> INSERT 55 : 59 @ 55
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 0.25f;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 150 : 161 @ 150
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
|
@ -15,7 +15,14 @@
|
||||
|
||||
~ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
|
||||
|
||||
> INSERT 185 : 192 @ 185
|
||||
> INSERT 22 : 26 @ 22
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 1.0f;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 163 : 170 @ 163
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
> DELETE 12 @ 12 : 14
|
||||
|
||||
> INSERT 204 : 217 @ 204
|
||||
> INSERT 204 : 226 @ 204
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
@ -27,5 +27,14 @@
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ float f = super.getEaglerDynamicLightsValueSimple(partialTicks);
|
||||
+ float ff = getCreeperFlashIntensity(partialTicks);
|
||||
+ if ((int) (ff * 10.0F) % 2 != 0) {
|
||||
+ f = Math.min(f + 0.5f, 1.15f);
|
||||
+ }
|
||||
+ return f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,4 +7,11 @@
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 39 : 43 @ 39
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 1.0f;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -27,4 +27,11 @@
|
||||
|
||||
~ for (int i = 0, l = list.size(); i < l; ++i) {
|
||||
|
||||
> INSERT 156 : 160 @ 156
|
||||
|
||||
+ protected float getEaglerDynamicLightsValueSimple(float partialTicks) {
|
||||
+ return 1.0f;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -28,4 +28,11 @@
|
||||
|
||||
~ protected static EaglercraftRandom itemRand = new EaglercraftRandom();
|
||||
|
||||
> INSERT 884 : 888 @ 884
|
||||
|
||||
+
|
||||
+ public float getHeldItemBrightnessEagler() {
|
||||
+ return 0.0f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,4 +7,11 @@
|
||||
|
||||
> DELETE 9 @ 9 : 11
|
||||
|
||||
> INSERT 120 : 124 @ 120
|
||||
|
||||
+
|
||||
+ public float getHeldItemBrightnessEagler() {
|
||||
+ return this.block.getLightValue() * 0.06667f;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -120,7 +120,15 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 32 @ 32 : 35
|
||||
> INSERT 6 : 11 @ 6
|
||||
|
||||
+ if (worldinfo.isOldEaglercraftRandom()) {
|
||||
+ LogManager.getLogger("EaglerMinecraftServer")
|
||||
+ .info("Detected a pre-u34 world, using old EaglercraftRandom implementation for world generation");
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 26 @ 26 : 29
|
||||
|
||||
> CHANGE 3 : 11 @ 3 : 5
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ this.random = new EaglercraftRandom(worldIn.getSeed());
|
||||
~ this.random = new EaglercraftRandom(worldIn.getSeed(), !worldIn.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> EOF
|
||||
|
@ -64,7 +64,16 @@
|
||||
|
||||
~ return Chunk.getNoSkyLightValue();
|
||||
|
||||
> CHANGE 1299 : 1300 @ 1299 : 1300
|
||||
> CHANGE 74 : 80 @ 74 : 75
|
||||
|
||||
~ if (lightValue < 0) {
|
||||
~ j += -lightValue;
|
||||
~ if (j > 15) {
|
||||
~ j = 15;
|
||||
~ }
|
||||
~ } else if (j < lightValue) {
|
||||
|
||||
> CHANGE 1224 : 1225 @ 1224 : 1225
|
||||
|
||||
~ this.worldInfo.setThunderTime((this.rand.nextInt(12000) / 2) + 3600);
|
||||
|
||||
|
@ -7,7 +7,15 @@
|
||||
|
||||
> DELETE 6 @ 6 : 11
|
||||
|
||||
> CHANGE 99 : 100 @ 99 : 100
|
||||
> INSERT 83 : 84 @ 83
|
||||
|
||||
+ float f2 = f;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ f = f2 + (f - f2) / 3.0F;
|
||||
|
||||
> CHANGE 14 : 15 @ 14 : 15
|
||||
|
||||
~ float f2 = 0.0F;
|
||||
|
||||
|
@ -24,12 +24,21 @@
|
||||
~ public void genTerrainBlocks(World world, EaglercraftRandom random, ChunkPrimer chunkprimer, int i, int j,
|
||||
~ double d0) {
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ EaglercraftRandom random1 = new EaglercraftRandom(this.field_150622_aD);
|
||||
~ this.func_150619_a(world.getSeed(), !world.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> CHANGE 111 : 112 @ 111 : 112
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1);
|
||||
~ EaglercraftRandom random1 = new EaglercraftRandom(this.field_150622_aD,
|
||||
~ !world.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> CHANGE 108 : 109 @ 108 : 109
|
||||
|
||||
~ private void func_150619_a(long parLong1, boolean scrambleRNG) {
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1, scrambleRNG);
|
||||
|
||||
> EOF
|
||||
|
@ -162,7 +162,11 @@
|
||||
~ public EaglercraftRandom getRandomWithSeed(long i) {
|
||||
~ return new EaglercraftRandom(this.worldObj.getSeed() + (long) (this.xPosition * this.xPosition * 4987142)
|
||||
|
||||
> CHANGE 92 : 93 @ 92 : 93
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ + (long) (this.zPosition * 389711) ^ i, !this.worldObj.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> CHANGE 90 : 91 @ 90 : 91
|
||||
|
||||
~ BlockPos blockpos = (BlockPos) this.tileEntityPosQueue.remove(0);
|
||||
|
||||
|
@ -16,9 +16,13 @@
|
||||
|
||||
> DELETE 8 @ 8 : 9
|
||||
|
||||
> CHANGE 90 : 92 @ 90 : 92
|
||||
> CHANGE 90 : 96 @ 90 : 94
|
||||
|
||||
~ public EaglercraftRandom getRandomWithSeed(long seed) {
|
||||
~ return new EaglercraftRandom(this.getWorld().getSeed() + (long) (this.xPosition * this.xPosition * 4987142)
|
||||
~ return new EaglercraftRandom(
|
||||
~ this.getWorld().getSeed() + (long) (this.xPosition * this.xPosition * 4987142)
|
||||
~ + (long) (this.xPosition * 5947611) + (long) (this.zPosition * this.zPosition) * 4392871L
|
||||
~ + (long) (this.zPosition * 389711) ^ seed,
|
||||
~ !this.getWorld().getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> EOF
|
||||
|
@ -17,6 +17,6 @@
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
|
||||
~ this.endRNG = new EaglercraftRandom(parLong1);
|
||||
~ this.endRNG = new EaglercraftRandom(parLong1, !worldIn.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> EOF
|
||||
|
@ -15,11 +15,32 @@
|
||||
|
||||
~ private EaglercraftRandom random;
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
> CHANGE 10 : 12 @ 10 : 11
|
||||
|
||||
~ this.random = new EaglercraftRandom(seed);
|
||||
~ boolean scramble = !worldIn.getWorldInfo().isOldEaglercraftRandom();
|
||||
~ this.random = new EaglercraftRandom(seed, scramble);
|
||||
|
||||
> CHANGE 110 : 112 @ 110 : 111
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ this.structureGenerators.add(new MapGenVillage(map1, scramble));
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ this.structureGenerators.add(new MapGenScatteredFeature((Map) map.get("biome_1"), scramble));
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ this.structureGenerators.add(new MapGenMineshaft((Map) map.get("mineshaft"), scramble));
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ this.structureGenerators.add(new MapGenStronghold((Map) map.get("stronghold"), scramble));
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ this.structureGenerators.add(new StructureOceanMonument((Map) map.get("oceanmonument"), scramble));
|
||||
|
||||
> CHANGE 84 : 86 @ 84 : 85
|
||||
|
||||
~ for (int m = 0, n = this.structureGenerators.size(); m < n; ++m) {
|
||||
~ MapGenStructure mapgenstructure = this.structureGenerators.get(m);
|
||||
|
@ -15,8 +15,26 @@
|
||||
|
||||
~ private EaglercraftRandom rand;
|
||||
|
||||
> CHANGE 32 : 33 @ 32 : 33
|
||||
> CHANGE 15 : 22 @ 15 : 22
|
||||
|
||||
~ this.rand = new EaglercraftRandom(parLong1);
|
||||
~ private MapGenBase caveGenerator;
|
||||
~ private MapGenStronghold strongholdGenerator;
|
||||
~ private MapGenVillage villageGenerator;
|
||||
~ private MapGenMineshaft mineshaftGenerator;
|
||||
~ private MapGenScatteredFeature scatteredFeatureGenerator;
|
||||
~ private MapGenBase ravineGenerator;
|
||||
~ private StructureOceanMonument oceanMonumentGenerator;
|
||||
|
||||
> CHANGE 10 : 19 @ 10 : 11
|
||||
|
||||
~ boolean scramble = !worldIn.getWorldInfo().isOldEaglercraftRandom();
|
||||
~ this.rand = new EaglercraftRandom(parLong1, scramble);
|
||||
~ this.caveGenerator = new MapGenCaves(scramble);
|
||||
~ this.strongholdGenerator = new MapGenStronghold(scramble);
|
||||
~ this.villageGenerator = new MapGenVillage(scramble);
|
||||
~ this.mineshaftGenerator = new MapGenMineshaft(scramble);
|
||||
~ this.scatteredFeatureGenerator = new MapGenScatteredFeature(scramble);
|
||||
~ this.ravineGenerator = new MapGenRavine(scramble);
|
||||
~ this.oceanMonumentGenerator = new StructureOceanMonument(scramble);
|
||||
|
||||
> EOF
|
||||
|
@ -15,8 +15,16 @@
|
||||
|
||||
~ private final EaglercraftRandom hellRNG;
|
||||
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
> CHANGE 20 : 22 @ 20 : 22
|
||||
|
||||
~ this.hellRNG = new EaglercraftRandom(parLong1);
|
||||
~ private final MapGenNetherBridge genNetherBridge;
|
||||
~ private final MapGenBase netherCaveGenerator;
|
||||
|
||||
> CHANGE 9 : 13 @ 9 : 10
|
||||
|
||||
~ boolean scramble = !worldIn.getWorldInfo().isOldEaglercraftRandom();
|
||||
~ this.hellRNG = new EaglercraftRandom(parLong1, scramble);
|
||||
~ this.genNetherBridge = new MapGenNetherBridge(scramble);
|
||||
~ this.netherCaveGenerator = new MapGenCavesHell(scramble);
|
||||
|
||||
> EOF
|
||||
|
@ -11,6 +11,17 @@
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 7
|
||||
|
||||
~ protected EaglercraftRandom rand = new EaglercraftRandom();
|
||||
~ protected EaglercraftRandom rand;
|
||||
|
||||
> INSERT 2 : 10 @ 2
|
||||
|
||||
+ public MapGenBase() {
|
||||
+ this(true);
|
||||
+ }
|
||||
+
|
||||
+ public MapGenBase(boolean scramble) {
|
||||
+ rand = new EaglercraftRandom(scramble);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -11,8 +11,16 @@
|
||||
|
||||
> DELETE 8 @ 8 : 9
|
||||
|
||||
> CHANGE 15 : 16 @ 15 : 16
|
||||
> INSERT 2 : 7 @ 2
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1);
|
||||
+
|
||||
+ public MapGenCaves(boolean scramble) {
|
||||
+ super(scramble);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 14
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1, this.rand.isScramble());
|
||||
|
||||
> EOF
|
||||
|
@ -11,8 +11,16 @@
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> CHANGE 15 : 16 @ 15 : 16
|
||||
> INSERT 2 : 7 @ 2
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1);
|
||||
+
|
||||
+ public MapGenCavesHell(boolean scramble) {
|
||||
+ super(scramble);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 14
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1, this.rand.isScramble());
|
||||
|
||||
> EOF
|
||||
|
@ -11,8 +11,15 @@
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> CHANGE 7 : 8 @ 7 : 8
|
||||
> INSERT 4 : 8 @ 4
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1);
|
||||
+ public MapGenRavine(boolean scramble) {
|
||||
+ super(scramble);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(parLong1, this.rand.isScramble());
|
||||
|
||||
> EOF
|
||||
|
@ -36,6 +36,6 @@
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ this.rand = new EaglercraftRandom(rand.nextLong());
|
||||
~ this.rand = new EaglercraftRandom(rand.nextLong(), !worldIn.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> EOF
|
||||
|
@ -7,4 +7,14 @@
|
||||
|
||||
> DELETE 5 @ 5 : 8
|
||||
|
||||
> CHANGE 4 : 6 @ 4 : 5
|
||||
|
||||
~ public MapGenMineshaft(boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> CHANGE 6 : 8 @ 6 : 7
|
||||
|
||||
~ public MapGenMineshaft(Map<String, String> parMap, boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> EOF
|
||||
|
@ -11,7 +11,12 @@
|
||||
|
||||
> DELETE 6 @ 6 : 10
|
||||
|
||||
> CHANGE 36 : 37 @ 36 : 37
|
||||
> CHANGE 4 : 6 @ 4 : 5
|
||||
|
||||
~ public MapGenNetherBridge(boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
|
||||
~ public Start(World worldIn, EaglercraftRandom parRandom, int parInt1, int parInt2) {
|
||||
|
||||
|
@ -11,7 +11,17 @@
|
||||
|
||||
> DELETE 6 @ 6 : 10
|
||||
|
||||
> CHANGE 45 : 46 @ 45 : 46
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ public MapGenScatteredFeature(boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> CHANGE 6 : 8 @ 6 : 8
|
||||
|
||||
~ public MapGenScatteredFeature(Map<String, String> parMap, boolean scramble) {
|
||||
~ this(scramble);
|
||||
|
||||
> CHANGE 28 : 29 @ 28 : 29
|
||||
|
||||
~ EaglercraftRandom random = this.worldObj.setRandomSeed(i1, j1, 14357617);
|
||||
|
||||
|
@ -11,15 +11,25 @@
|
||||
|
||||
> DELETE 6 @ 6 : 10
|
||||
|
||||
> CHANGE 14 : 17 @ 14 : 15
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ public MapGenStronghold(boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 6
|
||||
|
||||
~ BiomeGenBase[] biomes = BiomeGenBase.getBiomeGenArray();
|
||||
~ for (int i = 0; i < biomes.length; ++i) {
|
||||
~ BiomeGenBase biomegenbase = biomes[i];
|
||||
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
> CHANGE 7 : 9 @ 7 : 9
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom();
|
||||
~ public MapGenStronghold(Map<String, String> parMap, boolean scramble) {
|
||||
~ this(scramble);
|
||||
|
||||
> CHANGE 22 : 23 @ 22 : 23
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(!this.worldObj.getWorldInfo().isOldEaglercraftRandom());
|
||||
|
||||
> CHANGE 26 : 28 @ 26 : 27
|
||||
|
||||
|
@ -17,7 +17,18 @@
|
||||
|
||||
> DELETE 11 @ 11 : 16
|
||||
|
||||
> CHANGE 30 : 31 @ 30 : 31
|
||||
> INSERT 7 : 15 @ 7
|
||||
|
||||
+ public MapGenStructure() {
|
||||
+ super();
|
||||
+ }
|
||||
+
|
||||
+ public MapGenStructure(boolean scramble) {
|
||||
+ super(scramble);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
|
||||
~ HString.format("%d,%d", new Object[] { Integer.valueOf(i), Integer.valueOf(j) }));
|
||||
|
||||
|
@ -11,7 +11,17 @@
|
||||
|
||||
> DELETE 5 @ 5 : 9
|
||||
|
||||
> CHANGE 44 : 45 @ 44 : 45
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ public MapGenVillage(boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> CHANGE 4 : 6 @ 4 : 6
|
||||
|
||||
~ public MapGenVillage(Map<String, String> parMap, boolean scramble) {
|
||||
~ this(scramble);
|
||||
|
||||
> CHANGE 29 : 30 @ 29 : 30
|
||||
|
||||
~ EaglercraftRandom random = this.worldObj.setRandomSeed(i1, j1, 10387312);
|
||||
|
||||
|
@ -11,7 +11,17 @@
|
||||
|
||||
> DELETE 11 @ 11 : 15
|
||||
|
||||
> CHANGE 45 : 46 @ 45 : 46
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ public StructureOceanMonument(boolean scramble) {
|
||||
~ super(scramble);
|
||||
|
||||
> CHANGE 4 : 6 @ 4 : 6
|
||||
|
||||
~ public StructureOceanMonument(Map<String, String> parMap, boolean scramble) {
|
||||
~ this(scramble);
|
||||
|
||||
> CHANGE 30 : 31 @ 30 : 31
|
||||
|
||||
~ EaglercraftRandom random = this.worldObj.setRandomSeed(i1, j1, 10387313);
|
||||
|
||||
|
@ -10,7 +10,38 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
+
|
||||
|
||||
> CHANGE 539 : 540 @ 539 : 540
|
||||
> INSERT 39 : 42 @ 39
|
||||
|
||||
+ public static final int eaglerVersionCurrent = 1;
|
||||
+ private int eaglerVersion = eaglerVersionCurrent;
|
||||
+
|
||||
|
||||
> INSERT 116 : 117 @ 116
|
||||
|
||||
+ this.eaglerVersion = nbt.getInteger("eaglerVersionSerial");
|
||||
|
||||
> INSERT 102 : 103 @ 102
|
||||
|
||||
+ nbt.setInteger("eaglerVersionSerial", this.eaglerVersion);
|
||||
|
||||
> INSERT 274 : 288 @ 274
|
||||
|
||||
+ public int getEaglerVersion() {
|
||||
+ return this.eaglerVersion;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isOldEaglercraftRandom() {
|
||||
+ return this.eaglerVersion == 0;
|
||||
+ }
|
||||
+
|
||||
+ public static void initEaglerVersion(NBTTagCompound compound) {
|
||||
+ if (!compound.hasKey("eaglerVersionSerial", 99)) {
|
||||
+ compound.setInteger("eaglerVersionSerial", eaglerVersionCurrent);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ return HString.format("ID %02d - %s, ver %d. Features enabled: %b",
|
||||
|
||||
|
Reference in New Issue
Block a user