mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #18 - Final release, added PBR shaders
This commit is contained in:
@ -93,4 +93,11 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 43 : 47 @ 43
|
||||
|
||||
+
|
||||
+ public boolean eaglerShadersShouldRenderGlassHighlights() {
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -8,10 +8,17 @@
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
|
||||
~ public int quantityDropped(EaglercraftRandom var1) {
|
||||
|
||||
> INSERT 14 : 18 @ 14
|
||||
|
||||
+
|
||||
+ public boolean eaglerShadersShouldRenderGlassHighlights() {
|
||||
+ return DeferredStateManager.isRenderingGlassHighlights();
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -8,7 +8,7 @@
|
||||
> CHANGE 2 : 4 @ 2 : 6
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> CHANGE 104 : 105 @ 104 : 105
|
||||
|
||||
@ -18,7 +18,14 @@
|
||||
|
||||
~ public int quantityDropped(EaglercraftRandom var1) {
|
||||
|
||||
> CHANGE 64 : 65 @ 64 : 65
|
||||
> CHANGE 61 : 65 @ 61 : 62
|
||||
|
||||
~ return this.blockMaterial == Material.water
|
||||
~ ? (DeferredStateManager.isRenderingRealisticWater() ? EnumWorldBlockLayer.REALISTIC_WATER
|
||||
~ : EnumWorldBlockLayer.TRANSLUCENT)
|
||||
~ : EnumWorldBlockLayer.SOLID;
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ public void randomDisplayTick(World world, BlockPos blockpos, IBlockState iblockstate, EaglercraftRandom random) {
|
||||
|
||||
|
@ -8,10 +8,17 @@
|
||||
> CHANGE 3 : 5 @ 3 : 5
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> CHANGE 47 : 48 @ 47 : 48
|
||||
|
||||
~ public Item getItemDropped(IBlockState iblockstate, EaglercraftRandom random, int i) {
|
||||
|
||||
> INSERT 101 : 105 @ 101
|
||||
|
||||
+ public boolean eaglerShadersShouldRenderGlassHighlights() {
|
||||
+ return this == Blocks.glass_pane && DeferredStateManager.isRenderingGlassHighlights();
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -14,7 +14,9 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ import net.minecraft.client.resources.I18n;
|
||||
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
@ -26,7 +28,7 @@
|
||||
~ GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth_double(),
|
||||
~ scaledresolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
|
||||
|
||||
> INSERT 19 : 33 @ 19
|
||||
> INSERT 19 : 37 @ 19
|
||||
|
||||
+ public void eaglerShow(String line1, String line2) {
|
||||
+ if (!this.mc.running) {
|
||||
@ -42,6 +44,10 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void eaglerShowRefreshResources() {
|
||||
+ eaglerShow(I18n.format("resourcePack.load.refreshing"), I18n.format("resourcePack.load.pleaseWait"));
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 20
|
||||
|
||||
|
@ -5,7 +5,10 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 2 @ 2 : 17
|
||||
> CHANGE 2 : 4 @ 2 : 17
|
||||
|
||||
~ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL._wglBindFramebuffer;
|
||||
~
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
@ -17,7 +20,7 @@
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> CHANGE 1 : 32 @ 1 : 4
|
||||
> CHANGE 1 : 41 @ 1 : 4
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
|
||||
@ -44,6 +47,15 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
|
||||
~ 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.DebugFramebufferView;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShaderPackInfoReloadListener;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.EmissiveItems;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.MetalsLUT;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.PBRTextureMapUtils;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.TemperaturesLUT;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenEditProfile;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinPreviewRenderer;
|
||||
@ -85,7 +97,9 @@
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
> INSERT 6 : 7 @ 6
|
||||
|
||||
+ import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
> INSERT 11 : 12 @ 11
|
||||
|
||||
@ -119,10 +133,12 @@
|
||||
|
||||
~ private final List<FutureTask<?>> scheduledTasks = new LinkedList();
|
||||
|
||||
> INSERT 14 : 16 @ 14
|
||||
> INSERT 14 : 18 @ 14
|
||||
|
||||
+ public int joinWorldTickCounter = 0;
|
||||
+ private int dontPauseTimer = 0;
|
||||
+ public int bungeeOutdatedMsgTimer = 0;
|
||||
+ public String bungeeOutdatedMsgVer = null;
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 6
|
||||
|
||||
@ -199,7 +215,16 @@
|
||||
|
||||
~ this.standardGalacticFontRenderer = new EaglerFontRenderer(this.gameSettings,
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
> INSERT 5 : 11 @ 5
|
||||
|
||||
+ this.mcResourceManager.registerReloadListener(new ShaderPackInfoReloadListener());
|
||||
+ this.mcResourceManager.registerReloadListener(PBRTextureMapUtils.blockMaterialConstants);
|
||||
+ this.mcResourceManager.registerReloadListener(new TemperaturesLUT());
|
||||
+ this.mcResourceManager.registerReloadListener(new MetalsLUT());
|
||||
+ this.mcResourceManager.registerReloadListener(new EmissiveItems());
|
||||
+ this.mcResourceManager.registerReloadListener(new BlockVertexIDs());
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ return HString.format(parString1, new Object[] { GameSettings
|
||||
|
||||
@ -207,7 +232,11 @@
|
||||
|
||||
~ GlStateManager.clearDepth(1.0f);
|
||||
|
||||
> INSERT 30 : 31 @ 30
|
||||
> INSERT 10 : 11 @ 10
|
||||
|
||||
+ this.textureMapBlocks.setEnablePBREagler(gameSettings.shaders);
|
||||
|
||||
> INSERT 20 : 21 @ 20
|
||||
|
||||
+ SkinPreviewRenderer.initialize();
|
||||
|
||||
@ -276,7 +305,12 @@
|
||||
~ logger.info("Caught error stitching, removing all assigned resourcepacks");
|
||||
~ logger.info(runtimeexception);
|
||||
|
||||
> CHANGE 16 : 19 @ 16 : 28
|
||||
> INSERT 9 : 11 @ 9
|
||||
|
||||
+ ShaderSource.clearCache();
|
||||
+
|
||||
|
||||
> CHANGE 7 : 10 @ 7 : 19
|
||||
|
||||
~ private void updateDisplayMode() {
|
||||
~ this.displayWidth = Display.getWidth();
|
||||
@ -333,9 +367,16 @@
|
||||
|
||||
> DELETE 18 @ 18 : 26
|
||||
|
||||
> CHANGE 1 : 11 @ 1 : 5
|
||||
> CHANGE 1 : 4 @ 1 : 5
|
||||
|
||||
~ if (!Display.contextLost()) {
|
||||
~ this.mcProfiler.startSection("EaglercraftGPU_optimize");
|
||||
~ EaglercraftGPU.optimize();
|
||||
|
||||
> CHANGE 1 : 11 @ 1 : 2
|
||||
|
||||
~ _wglBindFramebuffer(0x8D40, null);
|
||||
~ GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
|
||||
~ GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.clear(16640);
|
||||
@ -344,17 +385,16 @@
|
||||
~ if (this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock()) {
|
||||
~ this.gameSettings.thirdPersonView = 0;
|
||||
~ }
|
||||
~
|
||||
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
> CHANGE 1 : 6 @ 1 : 5
|
||||
|
||||
~ this.mcProfiler.endSection();
|
||||
~ if (!this.skipRenderWorld) {
|
||||
~ this.mcProfiler.endStartSection("gameRenderer");
|
||||
~ this.entityRenderer.func_181560_a(this.timer.renderPartialTicks, i);
|
||||
~ this.mcProfiler.endSection();
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 13 @ 1 : 5
|
||||
> CHANGE 2 : 18 @ 2 : 7
|
||||
|
||||
~ this.mcProfiler.endSection();
|
||||
~ if (this.gameSettings.showDebugInfo && this.gameSettings.showDebugProfilerChart
|
||||
@ -368,9 +408,8 @@
|
||||
~ } else {
|
||||
~ this.mcProfiler.profilingEnabled = false;
|
||||
~ this.prevFrameTime = System.nanoTime();
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 7
|
||||
|
||||
~ }
|
||||
~
|
||||
~ this.guiAchievement.updateAchievementWindow();
|
||||
~ GlStateManager.popMatrix();
|
||||
|
||||
@ -434,7 +473,11 @@
|
||||
+ RateLimitTracker.tick();
|
||||
+
|
||||
|
||||
> INSERT 23 : 29 @ 23
|
||||
> INSERT 15 : 16 @ 15
|
||||
|
||||
+ GlStateManager.viewport(0, 0, displayWidth, displayHeight); // to be safe
|
||||
|
||||
> INSERT 8 : 14 @ 8
|
||||
|
||||
+ if (this.currentScreen == null && this.dontPauseTimer <= 0) {
|
||||
+ if (!Mouse.isMouseGrabbed()) {
|
||||
@ -470,18 +513,64 @@
|
||||
+ KeyBinding.setKeyBindState(gameSettings.keyBindSprint.getKeyCode(), Keyboard.getEventKeyState());
|
||||
+ }
|
||||
|
||||
> CHANGE 26 : 27 @ 26 : 27
|
||||
> CHANGE 19 : 27 @ 19 : 21
|
||||
|
||||
~ if (EaglerDeferredPipeline.instance != null) {
|
||||
~ if (k == 62) {
|
||||
~ DebugFramebufferView.toggleDebugView();
|
||||
~ } else if (k == 0xCB || k == 0xC8) {
|
||||
~ DebugFramebufferView.switchView(-1);
|
||||
~ } else if (k == 0xCD || k == 0xD0) {
|
||||
~ DebugFramebufferView.switchView(1);
|
||||
~ }
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ if (k == 1 || (k > -1 && k == this.gameSettings.keyBindClose.getKeyCode())) {
|
||||
|
||||
> INSERT 41 : 42 @ 41
|
||||
> INSERT 11 : 18 @ 11
|
||||
|
||||
+ if (k == 19 && Keyboard.isKeyDown(61)) { // F3+R
|
||||
+ if (gameSettings.shaders) {
|
||||
+ ShaderSource.clearCache();
|
||||
+ this.renderGlobal.loadRenderers();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 30 : 31 @ 30
|
||||
|
||||
+ GlStateManager.recompileShaders();
|
||||
|
||||
> INSERT 206 : 212 @ 206
|
||||
> INSERT 206 : 237 @ 206
|
||||
|
||||
+ if (this.theWorld != null) {
|
||||
+ ++joinWorldTickCounter;
|
||||
+ if (bungeeOutdatedMsgTimer > 0) {
|
||||
+ if (--bungeeOutdatedMsgTimer == 0) {
|
||||
+ String pfx = EnumChatFormatting.GOLD + "[EagX]" + EnumChatFormatting.AQUA;
|
||||
+ ingameGUI.getChatGUI()
|
||||
+ .printChatMessage(new ChatComponentText(pfx + " ---------------------------------------"));
|
||||
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(
|
||||
+ pfx + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " MESSAGE FROM LAX:"));
|
||||
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
|
||||
+ ingameGUI.getChatGUI()
|
||||
+ .printChatMessage(new ChatComponentText(
|
||||
+ pfx + " This server appears to be using version " + EnumChatFormatting.YELLOW
|
||||
+ + bungeeOutdatedMsgVer + EnumChatFormatting.AQUA + " of"));
|
||||
+ ingameGUI.getChatGUI().printChatMessage(
|
||||
+ new ChatComponentText(pfx + " the EaglerXBungee plugin which has memory leaks"));
|
||||
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
|
||||
+ ingameGUI.getChatGUI()
|
||||
+ .printChatMessage(new ChatComponentText(pfx + " If you are the admin update to "
|
||||
+ + EnumChatFormatting.YELLOW + "1.0.6" + EnumChatFormatting.AQUA + " or newer"));
|
||||
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
|
||||
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx + EnumChatFormatting.GREEN
|
||||
+ + " https://ftp.deev.is/EaglerXBungee-1.0.6-MemleakFix.jar"));
|
||||
+ ingameGUI.getChatGUI()
|
||||
+ .printChatMessage(new ChatComponentText(pfx + " ---------------------------------------"));
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ joinWorldTickCounter = 0;
|
||||
+ }
|
||||
@ -503,7 +592,14 @@
|
||||
|
||||
~ this.thePlayer = this.playerController.func_178892_a(this.theWorld, new StatFileWriter());
|
||||
|
||||
> CHANGE 165 : 166 @ 165 : 166
|
||||
> CHANGE 34 : 38 @ 34 : 35
|
||||
|
||||
~ if (theMinecraft == null)
|
||||
~ return false;
|
||||
~ GameSettings g = theMinecraft.gameSettings;
|
||||
~ return g.ambientOcclusion != 0 && !g.shadersAODisable;
|
||||
|
||||
> CHANGE 130 : 131 @ 130 : 131
|
||||
|
||||
~ return EagRuntime.getVersion();
|
||||
|
||||
@ -579,7 +675,7 @@
|
||||
|
||||
> DELETE 24 @ 24 : 32
|
||||
|
||||
> INSERT 7 : 15 @ 7
|
||||
> INSERT 7 : 19 @ 7
|
||||
|
||||
+
|
||||
+ public static int getGLMaximumTextureSize() {
|
||||
@ -589,5 +685,9 @@
|
||||
+ public boolean areKeysLocked() {
|
||||
+ return PlatformInput.lockKeys;
|
||||
+ }
|
||||
+
|
||||
+ public ModelManager getModelManager() {
|
||||
+ return modelManager;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -11,4 +11,26 @@
|
||||
|
||||
> DELETE 3 @ 3 : 6
|
||||
|
||||
> INSERT 13 : 14 @ 13
|
||||
|
||||
+ public float fontScale = 1.0f;
|
||||
|
||||
> CHANGE 51 : 66 @ 51 : 53
|
||||
|
||||
~ if (fontScale == 1.0f) {
|
||||
~ this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2,
|
||||
~ this.yPosition + (this.height - 8) / 2, j);
|
||||
~ } else {
|
||||
~ float xScale = fontScale;
|
||||
~ float yScale = 1.0f + (fontScale - 1.0f) * 0.7f;
|
||||
~ float strWidth = fontrenderer.getStringWidth(displayString) / xScale;
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.translate(this.xPosition + this.width / 2,
|
||||
~ this.yPosition + (this.height - 8 * yScale) / 2, 1.0f);
|
||||
~ GlStateManager.scale(xScale, yScale, 1.0f);
|
||||
~ GlStateManager.translate(-strWidth * 0.5f * xScale, 0.0f, 0.0f);
|
||||
~ fontrenderer.drawStringWithShadow(displayString, 0, 0, j);
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -37,9 +37,11 @@
|
||||
|
||||
> DELETE 27 @ 27 : 28
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 21
|
||||
> CHANGE 16 : 19 @ 16 : 21
|
||||
|
||||
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
~ GlStateManager.enableDepth();
|
||||
~ GlStateManager.disableLighting();
|
||||
|
||||
> DELETE 21 @ 21 : 22
|
||||
|
||||
|
@ -20,10 +20,9 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> INSERT 56 : 58 @ 56
|
||||
> INSERT 56 : 57 @ 56
|
||||
|
||||
+ this.mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
|
||||
+ I18n.format("resourcePack.load.pleaseWait"));
|
||||
+ this.mc.loadingScreen.eaglerShowRefreshResources();
|
||||
|
||||
> INSERT 9 : 10 @ 9
|
||||
|
||||
|
@ -254,19 +254,51 @@
|
||||
+ s1 = EaglercraftVersion.mainMenuStringD;
|
||||
+ this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2,
|
||||
|
||||
> CHANGE 1 : 9 @ 1 : 7
|
||||
> CHANGE 1 : 10 @ 1 : 7
|
||||
|
||||
~
|
||||
~ String lbl = "CREDITS.txt";
|
||||
~ int w = fontRendererObj.getStringWidth(lbl) * 3 / 4;
|
||||
~
|
||||
~ if (i >= (this.width - w - 4) && i <= this.width && j >= 0 && j <= 9) {
|
||||
~ drawRect((this.width - w - 4), 0, this.width, 10, 0x55000099);
|
||||
~ } else {
|
||||
~ drawRect((this.width - w - 4), 0, this.width, 10, 0x55200000);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
~ int www = 0;
|
||||
~ int hhh = 0;
|
||||
~ s1 = EaglercraftVersion.mainMenuStringG;
|
||||
~ if (s1 != null) {
|
||||
~ www = this.fontRendererObj.getStringWidth(s1);
|
||||
~ hhh += 10;
|
||||
|
||||
> INSERT 2 : 8 @ 2
|
||||
> INSERT 1 : 20 @ 1
|
||||
|
||||
+ s1 = EaglercraftVersion.mainMenuStringH;
|
||||
+ if (s1 != null) {
|
||||
+ www = Math.max(www, this.fontRendererObj.getStringWidth(s1));
|
||||
+ hhh += 10;
|
||||
+ }
|
||||
+ if (www > 0) {
|
||||
+ drawRect(0, 0, www + 6, hhh + 4, 0x55200000);
|
||||
+ s1 = EaglercraftVersion.mainMenuStringG;
|
||||
+ if (s1 != null) {
|
||||
+ www = this.fontRendererObj.getStringWidth(s1);
|
||||
+ this.drawString(this.fontRendererObj, s1, 3, 3, 0xFFFFFF99);
|
||||
+ }
|
||||
+ s1 = EaglercraftVersion.mainMenuStringH;
|
||||
+ if (s1 != null) {
|
||||
+ www = Math.max(www, this.fontRendererObj.getStringWidth(s1));
|
||||
+ this.drawString(this.fontRendererObj, s1, 3, 13, 0xFFFFFF99);
|
||||
+ }
|
||||
+ }
|
||||
+ GlStateManager.popMatrix();
|
||||
|
||||
> INSERT 1 : 16 @ 1
|
||||
|
||||
+ String lbl = "CREDITS.txt";
|
||||
+ int w = fontRendererObj.getStringWidth(lbl) * 3 / 4;
|
||||
+
|
||||
+ if (i >= (this.width - w - 4) && i <= this.width && j >= 0 && j <= 9) {
|
||||
+ drawRect((this.width - w - 4), 0, this.width, 10, 0x55000099);
|
||||
+ } else {
|
||||
+ drawRect((this.width - w - 4), 0, this.width, 10, 0x55200000);
|
||||
+ }
|
||||
+
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.translate((this.width - w - 2), 2.0f, 0.0f);
|
||||
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
|
@ -5,26 +5,25 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
> CHANGE 2 : 7 @ 2 : 24
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShadersNotSupported;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.vfs.SYS;
|
||||
|
||||
> DELETE 4 @ 4 : 21
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 12 : 14 @ 12
|
||||
> INSERT 12 : 13 @ 12
|
||||
|
||||
+ private GuiButton notSoSuperSecret;
|
||||
+ private GuiButton broadcastSettings;
|
||||
|
||||
> CHANGE 46 : 48 @ 46 : 48
|
||||
> CHANGE 47 : 48 @ 47 : 59
|
||||
|
||||
~ this.buttonList.add(notSoSuperSecret = new GuiButton(8675309, this.width / 2 + 5, this.height / 6 + 48 - 6, 150,
|
||||
~ 20, "Super Secret Settings...") {
|
||||
~ I18n.format("shaders.gui.optionsButton")));
|
||||
|
||||
> CHANGE 13 : 16 @ 13 : 15
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
|
||||
~ this.buttonList.add(broadcastSettings = new GuiButton(107, this.width / 2 + 5, this.height / 6 + 72 - 6, 150,
|
||||
~ 20, I18n.format(EagRuntime.getRecText(), new Object[0])));
|
||||
@ -53,9 +52,14 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 32 : 33 @ 32 : 33
|
||||
> CHANGE 32 : 38 @ 32 : 33
|
||||
|
||||
~ notSoSuperSecret.displayString = "Nope!";
|
||||
~ if (EaglerDeferredPipeline.isSupported()) {
|
||||
~ this.mc.displayGuiScreen(new GuiShaderConfig(this));
|
||||
~ } else {
|
||||
~ this.mc.displayGuiScreen(new GuiShadersNotSupported(this,
|
||||
~ I18n.format(EaglerDeferredPipeline.getReasonUnsupported())));
|
||||
~ }
|
||||
|
||||
> DELETE 22 @ 22 : 27
|
||||
|
||||
|
@ -107,7 +107,13 @@
|
||||
|
||||
~ EagRuntime.setClipboard(copyText);
|
||||
|
||||
> INSERT 176 : 177 @ 176
|
||||
> CHANGE 68 : 71 @ 68 : 69
|
||||
|
||||
~ if (s1.length() > 0) {
|
||||
~ this.fontRendererObj.drawStringWithShadow(s1, (float) j2, (float) k2, -1);
|
||||
~ }
|
||||
|
||||
> INSERT 107 : 108 @ 107
|
||||
|
||||
+ String uri = clickevent.getValue();
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
~ GameSettings.Options.BLOCK_ALTERNATIVES, GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG,
|
||||
~ GameSettings.Options.FULLSCREEN, 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.HUD_24H, GameSettings.Options.CHUNK_FIX, GameSettings.Options.FAST_MATH };
|
||||
|
||||
> CHANGE 11 : 13 @ 11 : 14
|
||||
|
||||
|
@ -5,8 +5,23 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 5
|
||||
> CHANGE 2 : 6 @ 2 : 5
|
||||
|
||||
~ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> INSERT 154 : 155 @ 154
|
||||
|
||||
+ boolean flag = DeferredStateManager.isEnableShadowRender();
|
||||
|
||||
> CHANGE 18 : 19 @ 18 : 19
|
||||
|
||||
~ GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT);
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK);
|
||||
|
||||
> EOF
|
||||
|
@ -7,13 +7,14 @@
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> CHANGE 3 : 6 @ 3 : 4
|
||||
> CHANGE 3 : 7 @ 3 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.AcceleratedEffectRenderer;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.IAcceleratedParticleEngine;
|
||||
~
|
||||
|
||||
> INSERT 1 : 7 @ 1
|
||||
> INSERT 1 : 9 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
@ -21,6 +22,8 @@
|
||||
+
|
||||
+ 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.GBufferAcceleratedEffectRenderer;
|
||||
|
||||
> DELETE 3 @ 3 : 36
|
||||
|
||||
@ -28,19 +31,48 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 20 : 21 @ 20 : 21
|
||||
> INSERT 16 : 18 @ 16
|
||||
|
||||
+ private static final ResourceLocation particleMaterialsTextures = new ResourceLocation(
|
||||
+ "eagler:glsl/deferred/particles_s.png");
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ private EaglercraftRandom rand = new EaglercraftRandom();
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ private AcceleratedEffectRenderer acceleratedParticleRenderer = new AcceleratedEffectRenderer();
|
||||
+ public static final AcceleratedEffectRenderer vanillaAcceleratedParticleRenderer = new AcceleratedEffectRenderer();
|
||||
+ public IAcceleratedParticleEngine acceleratedParticleRenderer = vanillaAcceleratedParticleRenderer;
|
||||
+
|
||||
|
||||
> CHANGE 170 : 172 @ 170 : 172
|
||||
> CHANGE 157 : 167 @ 157 : 158
|
||||
|
||||
~ public boolean hasParticlesInAlphaLayer() {
|
||||
~ for (int i = 0; i < 3; ++i) {
|
||||
~ if (!this.fxLayers[i][0].isEmpty()) {
|
||||
~ return true;
|
||||
~ }
|
||||
~ }
|
||||
~ return false;
|
||||
~ }
|
||||
~
|
||||
~ public void renderParticles(Entity entityIn, float partialTicks, int pass) {
|
||||
|
||||
> CHANGE 8 : 12 @ 8 : 10
|
||||
|
||||
~ if (!DeferredStateManager.isDeferredRenderer()) {
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.blendFunc(770, 771);
|
||||
~ }
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 4
|
||||
|
||||
~ for (int i = 0; i < 3; ++i) {
|
||||
~ for (int j = 1; j >= 0; --j) {
|
||||
~ if (pass != 2 && j != pass) {
|
||||
~ continue;
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 8 @ 1 : 8
|
||||
|
||||
@ -57,11 +89,24 @@
|
||||
+ float texCoordWidth = 0.001f;
|
||||
+ float texCoordHeight = 0.001f;
|
||||
|
||||
> INSERT 4 : 5 @ 4
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ GBufferAcceleratedEffectRenderer.isMaterialNormalTexture = false;
|
||||
|
||||
> INSERT 1 : 7 @ 1
|
||||
|
||||
+ if (DeferredStateManager.isDeferredRenderer()) {
|
||||
+ GlStateManager.setActiveTexture(33986);
|
||||
+ this.renderer.bindTexture(particleMaterialsTextures);
|
||||
+ GlStateManager.setActiveTexture(33984);
|
||||
+ }
|
||||
+ texCoordWidth = texCoordHeight = 1.0f / 256.0f;
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ GBufferAcceleratedEffectRenderer.isMaterialNormalTexture = true;
|
||||
|
||||
> INSERT 1 : 4 @ 1
|
||||
|
||||
+ TextureMap blockMap = (TextureMap) this.renderer.getTexture(TextureMap.locationBlocksTexture);
|
||||
+ texCoordWidth = 1.0f / blockMap.getWidth();
|
||||
|
@ -12,11 +12,16 @@
|
||||
|
||||
> DELETE 3 @ 3 : 6
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
> INSERT 3 : 5 @ 3
|
||||
|
||||
+ import net.minecraft.util.EnumWorldBlockLayer;
|
||||
+ import net.minecraft.util.MathHelper;
|
||||
|
||||
> INSERT 90 : 103 @ 90
|
||||
> INSERT 15 : 16 @ 15
|
||||
|
||||
+ this.particleAlpha = state.getBlock().getBlockLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 0.999f : 1.0f;
|
||||
|
||||
> INSERT 75 : 88 @ 75
|
||||
|
||||
+ public boolean renderAccelerated(IAcceleratedParticleEngine accelerator, Entity var2, float f, float f1, float f2,
|
||||
+ float f3, float f4, float f5) {
|
||||
|
@ -5,10 +5,11 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ 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;
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
@ -18,8 +19,25 @@
|
||||
|
||||
> DELETE 6 @ 6 : 10
|
||||
|
||||
> CHANGE 30 : 31 @ 30 : 31
|
||||
> CHANGE 30 : 32 @ 30 : 31
|
||||
|
||||
~ int l = DeferredStateManager.isInDeferredPass() ? ((var2.getBrightnessForRender(f) >> 16) & 0xFF) : 0;
|
||||
~ worldrenderer.begin(7, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP);
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ .lightmap(l, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ .lightmap(l, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ .lightmap(l, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ .lightmap(l, 240).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
||||
> EOF
|
||||
|
@ -5,29 +5,137 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 7 @ 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.minecraft.block.Block;
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> CHANGE 7 : 9 @ 7 : 9
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import net.minecraft.init.Blocks;
|
||||
|
||||
> CHANGE 6 : 8 @ 6 : 8
|
||||
|
||||
~ private EaglerTextureAtlasSprite[] atlasSpritesLava = new EaglerTextureAtlasSprite[2];
|
||||
~ private EaglerTextureAtlasSprite[] atlasSpritesWater = new EaglerTextureAtlasSprite[2];
|
||||
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
> INSERT 15 : 17 @ 15
|
||||
|
||||
~ EaglerTextureAtlasSprite[] atextureatlassprite = blockliquid.getMaterial() == Material.lava
|
||||
~ ? this.atlasSpritesLava
|
||||
+ BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
+ boolean deferred = DeferredStateManager.isDeferredRenderer();
|
||||
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
> INSERT 1 : 3 @ 1
|
||||
|
||||
+ boolean lava = blockliquid.getMaterial() == Material.lava;
|
||||
+ boolean realistic = !lava && DeferredStateManager.isRenderingRealisticWater();
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 3
|
||||
|
||||
~ EaglerTextureAtlasSprite[] atextureatlassprite = lava ? this.atlasSpritesLava : this.atlasSpritesWater;
|
||||
|
||||
> CHANGE 4 : 10 @ 4 : 6
|
||||
|
||||
~ boolean flag = blockliquid.shouldSideBeRendered(blockAccess, blockPosIn.up(tmp), EnumFacing.UP);
|
||||
~ if (realistic && blockStateIn.getValue(BlockLiquid.LEVEL).intValue() == 0) {
|
||||
~ Block blockUp = blockAccess.getBlockState(blockPosIn.up(tmp)).getBlock();
|
||||
~ flag &= !blockUp.isFullCube() || !blockUp.isBlockSolid(blockAccess, blockPosIn.up(tmp), EnumFacing.DOWN);
|
||||
~ }
|
||||
~ boolean flag1 = blockliquid.shouldSideBeRendered(blockAccess, blockPosIn.down(tmp), EnumFacing.DOWN);
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 5
|
||||
|
||||
~ blockliquid.shouldSideBeRendered(blockAccess, blockPosIn.north(tmp), EnumFacing.NORTH),
|
||||
~ blockliquid.shouldSideBeRendered(blockAccess, blockPosIn.south(tmp), EnumFacing.SOUTH),
|
||||
~ blockliquid.shouldSideBeRendered(blockAccess, blockPosIn.west(tmp), EnumFacing.WEST),
|
||||
~ blockliquid.shouldSideBeRendered(blockAccess, blockPosIn.east(tmp), EnumFacing.EAST) };
|
||||
|
||||
> CHANGE 10 : 16 @ 10 : 16
|
||||
|
||||
~ float f8 = this.getFluidHeight(blockAccess, blockPosIn.south(tmp), material);
|
||||
~ float f9 = this.getFluidHeight(blockAccess, blockPosIn.east(tmp).south(tmp), material);
|
||||
~ float f10 = this.getFluidHeight(blockAccess, blockPosIn.east(tmp), material);
|
||||
~ double d0 = (double) blockPosIn.x;
|
||||
~ double d1 = (double) blockPosIn.y;
|
||||
~ double d2 = (double) blockPosIn.z;
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = atextureatlassprite[0];
|
||||
|
||||
> CHANGE 105 : 106 @ 105 : 106
|
||||
> CHANGE 17 : 22 @ 17 : 20
|
||||
|
||||
~ if (realistic || f12 < -999.0F) {
|
||||
~ f13 = realistic ? (f12 < -999.0F ? 0.0f : MathHelper.sin(f12))
|
||||
~ : textureatlassprite.getInterpolatedU(0.0D);
|
||||
~ f17 = realistic ? (f12 < -999.0F ? 0.0f : -MathHelper.cos(f12))
|
||||
~ : textureatlassprite.getInterpolatedV(0.0D);
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
|
||||
~ f18 = realistic ? f17 : textureatlassprite.getInterpolatedV(16.0D);
|
||||
~ f15 = realistic ? f13 : textureatlassprite.getInterpolatedU(16.0D);
|
||||
|
||||
> CHANGE 31 : 36 @ 31 : 32
|
||||
|
||||
~ if (deferred)
|
||||
~ worldRendererIn.genNormals(true, f12 <= -999.0F ? BlockVertexIDs.builtin_water_still_vertex_id
|
||||
~ : BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
~
|
||||
~ if (blockliquid.func_176364_g(blockAccess, blockPosIn.up(tmp))) {
|
||||
|
||||
> INSERT 8 : 11 @ 8
|
||||
|
||||
+ if (deferred)
|
||||
+ worldRendererIn.genNormals(true, f12 <= -999.0F ? BlockVertexIDs.builtin_water_still_vertex_id
|
||||
+ : BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
|
||||
> CHANGE 4 : 9 @ 4 : 9
|
||||
|
||||
~ float f35 = realistic ? 0.0f : atextureatlassprite[0].getMinU();
|
||||
~ float f36 = realistic ? 0.0f : atextureatlassprite[0].getMaxU();
|
||||
~ float f37 = realistic ? 0.0f : atextureatlassprite[0].getMinV();
|
||||
~ float f38 = realistic ? 0.0f : atextureatlassprite[0].getMaxV();
|
||||
~ int l1 = blockliquid.getMixedBrightnessForBlock(blockAccess, blockPosIn.down(tmp));
|
||||
|
||||
> INSERT 10 : 12 @ 10
|
||||
|
||||
+ if (deferred)
|
||||
+ worldRendererIn.putNormal(0.0f, -1.0f, 0.0f, BlockVertexIDs.builtin_water_still_vertex_id);
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite1 = atextureatlassprite[1];
|
||||
|
||||
> CHANGE 38 : 45 @ 38 : 43
|
||||
|
||||
~ float f41 = realistic ? 1.0f : textureatlassprite1.getInterpolatedU(0.0D);
|
||||
~ float f27 = realistic ? 1.0f : textureatlassprite1.getInterpolatedU(8.0D);
|
||||
~ float f28 = realistic ? 0.0f
|
||||
~ : textureatlassprite1.getInterpolatedV((double) ((1.0F - f39) * 16.0F * 0.5F));
|
||||
~ float f29 = realistic ? 0.0f
|
||||
~ : textureatlassprite1.getInterpolatedV((double) ((1.0F - f40) * 16.0F * 0.5F));
|
||||
~ float f30 = realistic ? 0.0f : textureatlassprite1.getInterpolatedV(8.0D);
|
||||
|
||||
> CHANGE 15 : 29 @ 15 : 23
|
||||
|
||||
~ if (deferred)
|
||||
~ 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)
|
||||
~ .tex((double) f41, (double) f30).lightmap(k, l).endVertex();
|
||||
~ worldRendererIn.pos(d5, d1 + 0.0D, d6).color(f32, f33, f34, 1.0F)
|
||||
~ .tex((double) f27, (double) f30).lightmap(k, l).endVertex();
|
||||
~ worldRendererIn.pos(d5, d1 + (double) f40, d6).color(f32, f33, f34, 1.0F)
|
||||
~ .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)
|
||||
~ worldRendererIn.putNormal(-j1, 0.0f, -k1, BlockVertexIDs.builtin_water_flow_vertex_id);
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,15 +5,25 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 4 : 7 @ 4
|
||||
> INSERT 4 : 9 @ 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;
|
||||
|
||||
> DELETE 3 @ 3 : 7
|
||||
|
||||
> INSERT 75 : 76 @ 75
|
||||
> INSERT 72 : 73 @ 72
|
||||
|
||||
+ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ float[] afloat = isDeferred ? new float[EnumFacing.values().length * 2] : null;
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ BlockPos.MutableBlockPos pointer = new BlockPos.MutableBlockPos();
|
||||
|
||||
@ -21,4 +31,316 @@
|
||||
|
||||
~ BlockPos blockpos = blockPosIn.offsetEvenFaster(enumfacing, pointer);
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ worldRendererIn, list, bitset, afloat);
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ worldRendererIn, list1, bitset, afloat);
|
||||
|
||||
> INSERT 9 : 10 @ 9
|
||||
|
||||
+ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ if (!isDeferred && block$enumoffsettype == Block.EnumOffsetType.XYZ) {
|
||||
|
||||
> CHANGE 5 : 7 @ 5 : 6
|
||||
|
||||
~ int[] vertData = isDeferred ? bakedquad.getVertexDataWithNormals() : bakedquad.getVertexData();
|
||||
~ this.fillQuadBounds(blockIn, vertData, bakedquad.getFace(), quadBounds, boundsFlags, isDeferred ? 8 : 7);
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ worldRendererIn.addVertexData(vertData);
|
||||
|
||||
> CHANGE 36 : 37 @ 36 : 37
|
||||
|
||||
~ BitSet boundsFlags, int deferredStrideOverride) {
|
||||
|
||||
> CHANGE 8 : 12 @ 8 : 11
|
||||
|
||||
~ int j = i * deferredStrideOverride;
|
||||
~ float f6 = Float.intBitsToFloat(vertexData[j]);
|
||||
~ float f7 = Float.intBitsToFloat(vertexData[j + 1]);
|
||||
~ float f8 = Float.intBitsToFloat(vertexData[j + 2]);
|
||||
|
||||
> INSERT 53 : 60 @ 53
|
||||
|
||||
+ private final BlockPos blockpos0 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos1 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos2 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos3 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos4 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos5 = new BlockPos(0, 0, 0);
|
||||
+
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
|
||||
~ List<BakedQuad> listQuadsIn, BitSet boundsFlags, float[] quadBounds) {
|
||||
~ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
|
||||
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
||||
~ if (!isDeferred && block$enumoffsettype == Block.EnumOffsetType.XYZ) {
|
||||
|
||||
> INSERT 5 : 10 @ 5
|
||||
|
||||
+ EnumFacing facingIn = bakedquad.getFace();
|
||||
+ int[] vertData = isDeferred ? bakedquad.getVertexDataWithNormals() : bakedquad.getVertexData();
|
||||
+ blockPosIn.offsetEvenFaster(facingIn, blockpos0);
|
||||
+ this.fillQuadBounds(blockIn, vertData, facingIn, quadBounds, boundsFlags, isDeferred ? 8 : 7);
|
||||
+ boolean boundsFlags0 = boundsFlags.get(0);
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 5
|
||||
|
||||
~ brightnessIn = boundsFlags0 ? blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos0)
|
||||
|
||||
> CHANGE 3 : 100 @ 3 : 5
|
||||
|
||||
~ worldRendererIn.addVertexData(vertData);
|
||||
~
|
||||
~ if (isDeferred) {
|
||||
~ BlockModelRenderer.EnumNeighborInfo blockmodelrenderer$enumneighborinfo = BlockModelRenderer.EnumNeighborInfo
|
||||
~ .getNeighbourInfo(facingIn);
|
||||
~ BlockPos blockPosIn2 = boundsFlags0 ? blockpos0 : blockPosIn;
|
||||
~ blockPosIn2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[0], blockpos1);
|
||||
~ int i = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos1);
|
||||
~ blockPosIn2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[1], blockpos2);
|
||||
~ int j = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos2);
|
||||
~ blockPosIn2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[2], blockpos3);
|
||||
~ int k = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos3);
|
||||
~ blockPosIn2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[3], blockpos4);
|
||||
~ int l = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos4);
|
||||
~
|
||||
~ blockpos1.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[2], blockpos5);
|
||||
~ int i1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
~
|
||||
~ blockpos1.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[3], blockpos5);
|
||||
~ int j1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
~
|
||||
~ blockpos2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[2], blockpos5);
|
||||
~ int k1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
~
|
||||
~ blockpos2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[3], blockpos5);
|
||||
~ int l1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
~
|
||||
~ int[] b = new int[4];
|
||||
~
|
||||
~ boolean upIsOpaque = !blockAccessIn.getBlockState(blockpos0).getBlock().isOpaqueCube();
|
||||
~ int i3;
|
||||
~ if (boundsFlags0 || upIsOpaque) {
|
||||
~ i3 = (ownBrightness && boundsFlags0) ? brightnessIn
|
||||
~ : blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos0);
|
||||
~ } else {
|
||||
~ i3 = (ownBrightness && !boundsFlags0) ? brightnessIn
|
||||
~ : blockIn.getMixedBrightnessForBlock(blockAccessIn, blockPosIn);
|
||||
~ }
|
||||
~
|
||||
~ BlockModelRenderer.VertexTranslations blockmodelrenderer$vertextranslations = BlockModelRenderer.VertexTranslations
|
||||
~ .getVertexTranslations(facingIn);
|
||||
~ if (boundsFlags.get(1) && blockmodelrenderer$enumneighborinfo.field_178289_i) {
|
||||
~ float f13 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[0].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[1].field_178229_m];
|
||||
~ float f14 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[2].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[3].field_178229_m];
|
||||
~ float f15 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[4].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[5].field_178229_m];
|
||||
~ float f16 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[6].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178286_j[7].field_178229_m];
|
||||
~ float f17 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[0].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[1].field_178229_m];
|
||||
~ float f18 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[2].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[3].field_178229_m];
|
||||
~ float f19 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[4].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[5].field_178229_m];
|
||||
~ float f20 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[6].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178287_k[7].field_178229_m];
|
||||
~ float f21 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[0].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[1].field_178229_m];
|
||||
~ float f22 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[2].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[3].field_178229_m];
|
||||
~ float f23 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[4].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[5].field_178229_m];
|
||||
~ float f24 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[6].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178284_l[7].field_178229_m];
|
||||
~ float f25 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[0].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[1].field_178229_m];
|
||||
~ float f26 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[2].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[3].field_178229_m];
|
||||
~ float f27 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[4].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[5].field_178229_m];
|
||||
~ float f28 = quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[6].field_178229_m]
|
||||
~ * quadBounds[blockmodelrenderer$enumneighborinfo.field_178285_m[7].field_178229_m];
|
||||
~ int i2 = getAoBrightness(l, i, j1, i3);
|
||||
~ int j2 = getAoBrightness(k, i, i1, i3);
|
||||
~ int k2 = getAoBrightness(k, j, k1, i3);
|
||||
~ int l2 = getAoBrightness(l, j, l1, i3);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178191_g] = getVertexBrightness(i2, j2, k2, l2, f13,
|
||||
~ f14, f15, f16);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178200_h] = getVertexBrightness(i2, j2, k2, l2, f17,
|
||||
~ f18, f19, f20);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178201_i] = getVertexBrightness(i2, j2, k2, l2, f21,
|
||||
~ f22, f23, f24);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178198_j] = getVertexBrightness(i2, j2, k2, l2, f25,
|
||||
~ f26, f27, f28);
|
||||
~ } else {
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178191_g] = getAoBrightness(l, i, j1, i3);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178200_h] = getAoBrightness(k, i, i1, i3);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178201_i] = getAoBrightness(k, j, k1, i3);
|
||||
~ b[blockmodelrenderer$vertextranslations.field_178198_j] = getAoBrightness(l, j, l1, i3);
|
||||
~ }
|
||||
~ worldRendererIn.putBrightness4(b[0], b[1], b[2], b[3]);
|
||||
~ } else {
|
||||
~ worldRendererIn.putBrightness4(brightnessIn, brightnessIn, brightnessIn, brightnessIn);
|
||||
~ }
|
||||
~
|
||||
|
||||
> INSERT 20 : 36 @ 20
|
||||
|
||||
+ private static int getAoBrightness(int parInt1, int parInt2, int parInt3, int parInt4) {
|
||||
+ if (parInt1 == 0) {
|
||||
+ parInt1 = parInt4;
|
||||
+ }
|
||||
+
|
||||
+ if (parInt2 == 0) {
|
||||
+ parInt2 = parInt4;
|
||||
+ }
|
||||
+
|
||||
+ if (parInt3 == 0) {
|
||||
+ parInt3 = parInt4;
|
||||
+ }
|
||||
+
|
||||
+ return parInt1 + parInt2 + parInt3 + parInt4 >> 2 & 16711935;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 45 : 47 @ 45 : 46
|
||||
|
||||
~ worldrenderer.putNormal((float) vec3i.getX(), (float) vec3i.getY(), (float) vec3i.getZ(),
|
||||
~ VertexMarkerState.markId);
|
||||
|
||||
> INSERT 9 : 16 @ 9
|
||||
|
||||
+ private final BlockPos blockpos0 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos1 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos2 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos3 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos4 = new BlockPos(0, 0, 0);
|
||||
+ private final BlockPos blockpos5 = new BlockPos(0, 0, 0);
|
||||
+
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ BlockPos blockpos = boundsFlags.get(0) ? blockPosIn.offsetEvenFaster(facingIn, blockpos0) : blockPosIn;
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 6
|
||||
|
||||
~ blockpos.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[0], blockpos1);
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+ blockpos1.offsetEvenFaster(facingIn, blockpos5);
|
||||
+ boolean flag = blockAccessIn.getBlockState(blockpos5).getBlock().isTranslucent();
|
||||
+
|
||||
+ blockpos.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[1], blockpos2);
|
||||
+ int j = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos2);
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+ blockpos2.offsetEvenFaster(facingIn, blockpos5);
|
||||
+ boolean flag1 = blockAccessIn.getBlockState(blockpos5).getBlock().isTranslucent();
|
||||
+
|
||||
+ blockpos.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[2], blockpos3);
|
||||
+ int k = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos3);
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+ blockpos3.offsetEvenFaster(facingIn, blockpos5);
|
||||
+ boolean flag2 = blockAccessIn.getBlockState(blockpos5).getBlock().isTranslucent();
|
||||
+
|
||||
+ blockpos.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[3], blockpos4);
|
||||
+ int l = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos4);
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 5
|
||||
|
||||
~ blockpos4.offsetEvenFaster(facingIn, blockpos5);
|
||||
~ boolean flag3 = blockAccessIn.getBlockState(blockpos5).getBlock().isTranslucent();
|
||||
~
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 7
|
||||
|
||||
~ blockpos1.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[2], blockpos5);
|
||||
|
||||
> CHANGE 10 : 13 @ 10 : 13
|
||||
|
||||
~ blockpos1.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[3], blockpos5);
|
||||
~ f5 = blockAccessIn.getBlockState(blockpos5).getBlock().getAmbientOcclusionLightValue();
|
||||
~ j1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
|
||||
> CHANGE 8 : 11 @ 8 : 11
|
||||
|
||||
~ blockpos2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[2], blockpos5);
|
||||
~ f6 = blockAccessIn.getBlockState(blockpos5).getBlock().getAmbientOcclusionLightValue();
|
||||
~ k1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
|
||||
> CHANGE 8 : 11 @ 8 : 11
|
||||
|
||||
~ blockpos2.offsetEvenFaster(blockmodelrenderer$enumneighborinfo.field_178276_g[3], blockpos5);
|
||||
~ f7 = blockAccessIn.getBlockState(blockpos5).getBlock().getAmbientOcclusionLightValue();
|
||||
~ l1 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ blockPosIn.offsetEvenFaster(facingIn, blockpos5);
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 4
|
||||
|
||||
~ if (boundsFlags.get(0) || !blockAccessIn.getBlockState(blockpos5).getBlock().isOpaqueCube()) {
|
||||
~ i3 = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos5);
|
||||
|
||||
> CHANGE 52 : 64 @ 52 : 64
|
||||
|
||||
~ int i2 = getAoBrightness(l, i, j1, i3);
|
||||
~ int j2 = getAoBrightness(k, i, i1, i3);
|
||||
~ int k2 = getAoBrightness(k, j, k1, i3);
|
||||
~ int l2 = getAoBrightness(l, j, l1, i3);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178191_g] = getVertexBrightness(i2,
|
||||
~ j2, k2, l2, f13, f14, f15, f16);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178200_h] = getVertexBrightness(i2,
|
||||
~ j2, k2, l2, f17, f18, f19, f20);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178201_i] = getVertexBrightness(i2,
|
||||
~ j2, k2, l2, f21, f22, f23, f24);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178198_j] = getVertexBrightness(i2,
|
||||
~ j2, k2, l2, f25, f26, f27, f28);
|
||||
|
||||
> CHANGE 5 : 13 @ 5 : 13
|
||||
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178191_g] = getAoBrightness(l, i, j1,
|
||||
~ i3);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178200_h] = getAoBrightness(k, i, i1,
|
||||
~ i3);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178201_i] = getAoBrightness(k, j, k1,
|
||||
~ i3);
|
||||
~ this.vertexBrightness[blockmodelrenderer$vertextranslations.field_178198_j] = getAoBrightness(l, j, l1,
|
||||
~ i3);
|
||||
|
||||
> INSERT 7 : 8 @ 7
|
||||
|
||||
+ }
|
||||
|
||||
> CHANGE 1 : 8 @ 1 : 25
|
||||
|
||||
~ private static int getVertexBrightness(int parInt1, int parInt2, int parInt3, int parInt4, float parFloat1,
|
||||
~ float parFloat2, float parFloat3, float parFloat4) {
|
||||
~ int i = (int) ((float) (parInt1 >> 16 & 255) * parFloat1 + (float) (parInt2 >> 16 & 255) * parFloat2
|
||||
~ + (float) (parInt3 >> 16 & 255) * parFloat3 + (float) (parInt4 >> 16 & 255) * parFloat4) & 255;
|
||||
~ int j = (int) ((float) (parInt1 & 255) * parFloat1 + (float) (parInt2 & 255) * parFloat2
|
||||
~ + (float) (parInt3 & 255) * parFloat3 + (float) (parInt4 & 255) * parFloat4) & 255;
|
||||
~ return i << 16 | j;
|
||||
|
||||
> EOF
|
||||
|
@ -7,11 +7,33 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
> CHANGE 1 : 6 @ 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;
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ import net.minecraft.util.MathHelper;
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
|
||||
~ public void preRenderChunk(RenderChunk renderChunkIn, EnumWorldBlockLayer enumworldblocklayer) {
|
||||
|
||||
> CHANGE 1 : 11 @ 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
|
||||
~ 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);
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,4 +9,9 @@
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
> INSERT 10 : 12 @ 10
|
||||
|
||||
+ this.worldRenderers[EnumWorldBlockLayer.REALISTIC_WATER.ordinal()] = new WorldRenderer(262145);
|
||||
+ this.worldRenderers[EnumWorldBlockLayer.GLASS_HIGHLIGHTS.ordinal()] = new WorldRenderer(131072);
|
||||
|
||||
> EOF
|
||||
|
@ -7,12 +7,14 @@
|
||||
|
||||
> DELETE 2 @ 2 : 7
|
||||
|
||||
> CHANGE 6 : 8 @ 6 : 7
|
||||
> CHANGE 6 : 10 @ 6 : 7
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~
|
||||
|
||||
> INSERT 2 : 16 @ 2
|
||||
> INSERT 2 : 22 @ 2
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
@ -25,7 +27,13 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ 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.deferred.DynamicLightManager;
|
||||
+ 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.vector.Vector3f;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
|
||||
@ -39,7 +47,15 @@
|
||||
|
||||
> DELETE 2 @ 2 : 5
|
||||
|
||||
> DELETE 29 @ 29 : 34
|
||||
> INSERT 15 : 16 @ 15
|
||||
|
||||
+ import net.minecraft.util.ChatComponentText;
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
> DELETE 13 @ 13 : 18
|
||||
|
||||
> DELETE 20 @ 20 : 24
|
||||
|
||||
@ -108,21 +124,277 @@
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(10842L);
|
||||
|
||||
> DELETE 70 @ 70 : 79
|
||||
> DELETE 67 @ 67 : 79
|
||||
|
||||
> DELETE 1 @ 1 : 7
|
||||
> CHANGE 1 : 5 @ 1 : 5
|
||||
|
||||
> DELETE 28 @ 28 : 32
|
||||
~ if (mc.gameSettings.shaders) {
|
||||
~ if (!EaglerDeferredPipeline.isSupported()) {
|
||||
~ mc.gameSettings.shaders = false;
|
||||
~ }
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ Blocks.leaves.setGraphicsLevel(mc.gameSettings.shaders || mc.gameSettings.fancyGraphics);
|
||||
+ Blocks.leaves2.setGraphicsLevel(mc.gameSettings.shaders || mc.gameSettings.fancyGraphics);
|
||||
+ this.renderDistanceChunks = this.mc.gameSettings.renderDistanceChunks;
|
||||
+
|
||||
|
||||
> INSERT 19 : 76 @ 19
|
||||
|
||||
+
|
||||
+ if (mc.gameSettings.shaders) {
|
||||
+ EaglerDeferredConfig dfc = mc.gameSettings.deferredShaderConf;
|
||||
+ dfc.updateConfig();
|
||||
+ if (theWorld.provider.getHasNoSky()) {
|
||||
+ dfc.is_rendering_shadowsSun_clamped = 0;
|
||||
+ dfc.is_rendering_lightShafts = false;
|
||||
+ } else {
|
||||
+ int maxDist = renderDistanceChunks << 4;
|
||||
+ int ss = dfc.is_rendering_shadowsSun;
|
||||
+ while (ss > 1 && (1 << (ss + 3)) > maxDist) {
|
||||
+ --ss;
|
||||
+ }
|
||||
+ dfc.is_rendering_shadowsSun_clamped = ss;
|
||||
+ dfc.is_rendering_lightShafts = dfc.lightShafts;
|
||||
+ }
|
||||
+ boolean flag = false;
|
||||
+ if (EaglerDeferredPipeline.instance == null) {
|
||||
+ EaglerDeferredPipeline.instance = new EaglerDeferredPipeline(mc);
|
||||
+ flag = true;
|
||||
+ }
|
||||
+ try {
|
||||
+ SharedPipelineShaders.init();
|
||||
+ EaglerDeferredPipeline.instance.rebuild(dfc);
|
||||
+ EaglerDeferredPipeline.isSuspended = false;
|
||||
+ } catch (Throwable ex) {
|
||||
+ logger.error("Could not enable shaders!");
|
||||
+ logger.error(ex);
|
||||
+ EaglerDeferredPipeline.isSuspended = true;
|
||||
+ }
|
||||
+ if (flag && !EaglerDeferredPipeline.isSuspended) {
|
||||
+ ChatComponentText shaderF4Msg = new ChatComponentText("[EaglercraftX]");
|
||||
+ shaderF4Msg.getChatStyle().setColor(EnumChatFormatting.GOLD);
|
||||
+ ChatComponentText shaderF4Msg2 = new ChatComponentText(
|
||||
+ " Press " + Keyboard.getKeyName(mc.gameSettings.keyBindFunction.getKeyCode())
|
||||
+ + "+4 to access the shader debug menu");
|
||||
+ shaderF4Msg2.getChatStyle().setColor(EnumChatFormatting.AQUA);
|
||||
+ shaderF4Msg.appendSibling(shaderF4Msg2);
|
||||
+ mc.ingameGUI.getChatGUI().printChatMessage(shaderF4Msg);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ mc.gameSettings.shadersAODisable = mc.gameSettings.shaders
|
||||
+ && mc.gameSettings.deferredShaderConf.is_rendering_ssao;
|
||||
+
|
||||
+ if (!mc.gameSettings.shaders || EaglerDeferredPipeline.isSuspended) {
|
||||
+ try {
|
||||
+ if (EaglerDeferredPipeline.instance != null) {
|
||||
+ EaglerDeferredPipeline.instance.destroy();
|
||||
+ EaglerDeferredPipeline.instance = null;
|
||||
+ }
|
||||
+ } catch (Throwable ex) {
|
||||
+ logger.error("Could not safely disable shaders!");
|
||||
+ logger.error(ex);
|
||||
+ }
|
||||
+ SharedPipelineShaders.free();
|
||||
+ }
|
||||
|
||||
> DELETE 9 @ 9 : 13
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 41 @ 41 : 78
|
||||
> INSERT 6 : 7 @ 6
|
||||
|
||||
> CHANGE 53 : 54 @ 53 : 54
|
||||
+ boolean light = DynamicLightManager.isRenderingLights();
|
||||
|
||||
> CHANGE 27 : 36 @ 27 : 54
|
||||
|
||||
~ if (!DeferredStateManager.isDeferredRenderer()) {
|
||||
~ for (int i = 0; i < this.theWorld.weatherEffects.size(); ++i) {
|
||||
~ Entity entity1 = (Entity) this.theWorld.weatherEffects.get(i);
|
||||
~ ++this.countEntitiesRendered;
|
||||
~ if (entity1.isInRangeToRender3d(d0, d1, d2)) {
|
||||
~ if (light) {
|
||||
~ entity1.renderDynamicLightsEagler(partialTicks, true);
|
||||
~ }
|
||||
~ this.renderManager.renderEntitySimple(entity1, partialTicks);
|
||||
|
||||
> DELETE 2 @ 2 : 16
|
||||
|
||||
> INSERT 24 : 27 @ 24
|
||||
|
||||
+ if (light) {
|
||||
+ entity2.renderDynamicLightsEagler(partialTicks, flag2);
|
||||
+ }
|
||||
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
|
||||
~ for (TileEntity tileentity2 : (List<TileEntity>) list1) {
|
||||
|
||||
> CHANGE 52 : 53 @ 52 : 53
|
||||
> INSERT 41 : 200 @ 41
|
||||
|
||||
+ public static interface EntityChunkCullAdapter {
|
||||
+ boolean shouldCull(RenderChunk renderChunk);
|
||||
+ }
|
||||
+
|
||||
+ public static interface EntityObjectCullAdapter {
|
||||
+ boolean shouldCull(RenderChunk renderChunk, RenderManager renderManager, Entity entity);
|
||||
+ }
|
||||
+
|
||||
+ public void renderShadowLODEntities(Entity renderViewEntity, float partialTicks,
|
||||
+ EntityChunkCullAdapter entityChunkCull, EntityObjectCullAdapter entityObjectCull) { // TODO
|
||||
+ if (renderEntitiesStartupCounter <= 0) {
|
||||
+ theWorld.theProfiler.startSection("shadow_entity_prepare");
|
||||
+
|
||||
+ TileEntityRendererDispatcher.instance.cacheActiveRenderInfo(theWorld, mc.getTextureManager(),
|
||||
+ mc.fontRendererObj, renderViewEntity, partialTicks);
|
||||
+ renderManager.cacheActiveRenderInfo(theWorld, mc.fontRendererObj, renderViewEntity, mc.pointedEntity,
|
||||
+ mc.gameSettings, partialTicks);
|
||||
+
|
||||
+ double d3 = renderViewEntity.lastTickPosX
|
||||
+ + (renderViewEntity.posX - renderViewEntity.lastTickPosX) * (double) partialTicks;
|
||||
+ double d4 = renderViewEntity.lastTickPosY
|
||||
+ + (renderViewEntity.posY - renderViewEntity.lastTickPosY) * (double) partialTicks;
|
||||
+ double d5 = renderViewEntity.lastTickPosZ
|
||||
+ + (renderViewEntity.posZ - renderViewEntity.lastTickPosZ) * (double) partialTicks;
|
||||
+ TileEntityRendererDispatcher.staticPlayerX = d3;
|
||||
+ TileEntityRendererDispatcher.staticPlayerY = d4;
|
||||
+ TileEntityRendererDispatcher.staticPlayerZ = d5;
|
||||
+ renderManager.setRenderPosition(d3, d4, d5);
|
||||
+
|
||||
+ this.theWorld.theProfiler.endStartSection("shadow_entities");
|
||||
+ for (RenderGlobal.ContainerLocalRenderInformation containerlocalrenderinformation : this.renderInfos) {
|
||||
+ RenderChunk currentRenderChunk = containerlocalrenderinformation.renderChunk;
|
||||
+
|
||||
+ if (!entityChunkCull.shouldCull(currentRenderChunk)) {
|
||||
+ Chunk chunk = this.theWorld
|
||||
+ .getChunkFromBlockCoords(containerlocalrenderinformation.renderChunk.getPosition());
|
||||
+ ClassInheritanceMultiMap<Entity> classinheritancemultimap = chunk
|
||||
+ .getEntityLists()[containerlocalrenderinformation.renderChunk.getPosition().getY() / 16];
|
||||
+ if (!classinheritancemultimap.isEmpty()) {
|
||||
+ Iterator<Entity> iterator = classinheritancemultimap.iterator();
|
||||
+ while (iterator.hasNext()) {
|
||||
+ Entity entity2 = iterator.next();
|
||||
+ if (!entityObjectCull.shouldCull(currentRenderChunk, renderManager, entity2)
|
||||
+ || entity2.riddenByEntity == this.mc.thePlayer) {
|
||||
+ if (entity2.posY < 0.0D || entity2.posY >= 256.0D
|
||||
+ || this.theWorld.isBlockLoaded(new BlockPos(entity2))) {
|
||||
+ ++this.countEntitiesRendered;
|
||||
+ this.renderManager.renderEntitySimple(entity2, partialTicks);
|
||||
+ mc.entityRenderer.disableLightmap();
|
||||
+ GlStateManager.disableShaderBlendAdd();
|
||||
+ GlStateManager.disableBlend();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ // TODO: why?
|
||||
+ // if (!flag2 && entity2 instanceof EntityWitherSkull) {
|
||||
+ // this.mc.getRenderManager().renderWitherSkull(entity2, partialTicks);
|
||||
+ // }
|
||||
+ }
|
||||
+
|
||||
+ List<TileEntity> tileEntities = currentRenderChunk.compiledChunk.getTileEntities();
|
||||
+ for (int i = 0, l = tileEntities.size(); i < l; ++i) {
|
||||
+ TileEntityRendererDispatcher.instance.renderTileEntity(tileEntities.get(i), partialTicks, -1);
|
||||
+ mc.entityRenderer.disableLightmap();
|
||||
+ GlStateManager.disableShaderBlendAdd();
|
||||
+ GlStateManager.disableBlend();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ synchronized (this.field_181024_n) {
|
||||
+ for (TileEntity tileentity : this.field_181024_n) {
|
||||
+ TileEntityRendererDispatcher.instance.renderTileEntity(tileentity, partialTicks, -1);
|
||||
+ mc.entityRenderer.disableLightmap();
|
||||
+ GlStateManager.disableShaderBlendAdd();
|
||||
+ GlStateManager.disableBlend();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ }
|
||||
+ theWorld.theProfiler.endSection();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void renderParaboloidTileEntities(Entity renderViewEntity, float partialTicks, int up) {
|
||||
+ if (renderEntitiesStartupCounter <= 0) {
|
||||
+ theWorld.theProfiler.startSection("paraboloid_entity_prepare");
|
||||
+
|
||||
+ TileEntityRendererDispatcher.instance.cacheActiveRenderInfo(theWorld, mc.getTextureManager(),
|
||||
+ mc.fontRendererObj, renderViewEntity, partialTicks);
|
||||
+ renderManager.cacheActiveRenderInfo(theWorld, mc.fontRendererObj, renderViewEntity, mc.pointedEntity,
|
||||
+ mc.gameSettings, partialTicks);
|
||||
+
|
||||
+ double d3 = renderViewEntity.lastTickPosX
|
||||
+ + (renderViewEntity.posX - renderViewEntity.lastTickPosX) * (double) partialTicks;
|
||||
+ double d4 = renderViewEntity.lastTickPosY
|
||||
+ + (renderViewEntity.posY - renderViewEntity.lastTickPosY) * (double) partialTicks;
|
||||
+ double d5 = renderViewEntity.lastTickPosZ
|
||||
+ + (renderViewEntity.posZ - renderViewEntity.lastTickPosZ) * (double) partialTicks;
|
||||
+ TileEntityRendererDispatcher.staticPlayerX = d3;
|
||||
+ TileEntityRendererDispatcher.staticPlayerY = d4;
|
||||
+ TileEntityRendererDispatcher.staticPlayerZ = d5;
|
||||
+ renderManager.setRenderPosition(d3, d4, d5);
|
||||
+
|
||||
+ double rad = 8.0;
|
||||
+
|
||||
+ int minX = (int) (d3 - rad);
|
||||
+ int minY = (int) d4;
|
||||
+ if (up == -1) {
|
||||
+ minY -= rad;
|
||||
+ }
|
||||
+ int minZ = (int) (d5 - rad);
|
||||
+
|
||||
+ int maxX = (int) (d3 + rad);
|
||||
+ int maxY = (int) d4;
|
||||
+ if (up == 1) {
|
||||
+ maxY += rad;
|
||||
+ }
|
||||
+ int maxZ = (int) (d5 + rad);
|
||||
+
|
||||
+ BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
+ minX = MathHelper.floor_double(minX / 16.0) * 16;
|
||||
+ minY = MathHelper.floor_double(minY / 16.0) * 16;
|
||||
+ minZ = MathHelper.floor_double(minZ / 16.0) * 16;
|
||||
+ maxX = MathHelper.floor_double(maxX / 16.0) * 16;
|
||||
+ maxY = MathHelper.floor_double(maxY / 16.0) * 16;
|
||||
+ maxZ = MathHelper.floor_double(maxZ / 16.0) * 16;
|
||||
+
|
||||
+ this.theWorld.theProfiler.endStartSection("paraboloid_entities");
|
||||
+ for (int cx = minX; cx <= maxX; cx += 16) {
|
||||
+ for (int cz = minZ; cz <= maxZ; cz += 16) {
|
||||
+ for (int cy = minY; cy <= maxY; cy += 16) {
|
||||
+ tmp.x = cx;
|
||||
+ tmp.y = cy;
|
||||
+ tmp.z = cz;
|
||||
+ RenderChunk ch = viewFrustum.getRenderChunk(tmp);
|
||||
+ CompiledChunk cch;
|
||||
+ if (ch != null && (cch = ch.compiledChunk) != null) {
|
||||
+ List<TileEntity> tileEntities = cch.getTileEntities();
|
||||
+ for (int i = 0, l = tileEntities.size(); i < l; ++i) {
|
||||
+ mc.entityRenderer.enableLightmap();
|
||||
+ TileEntityRendererDispatcher.instance.renderTileEntity(tileEntities.get(i),
|
||||
+ partialTicks, -1);
|
||||
+ GlStateManager.disableShaderBlendAdd();
|
||||
+ GlStateManager.disableBlend();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ theWorld.theProfiler.endSection();
|
||||
+ mc.entityRenderer.disableLightmap();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
||||
~ return HString.format("C: %d/%d %sD: %d, %s",
|
||||
|
||||
@ -156,11 +428,111 @@
|
||||
|
||||
+ ((ClippingHelperImpl) this.debugFixedClippingHelper).destroy();
|
||||
|
||||
> DELETE 94 @ 94 : 104
|
||||
> INSERT 92 : 129 @ 92
|
||||
|
||||
> DELETE 1 @ 1 : 21
|
||||
+ public static interface ChunkCullAdapter {
|
||||
+ boolean shouldCull(RenderChunk chunk);
|
||||
+ }
|
||||
+
|
||||
+ public int renderBlockLayerShadow(EnumWorldBlockLayer blockLayerIn, AxisAlignedBB boundingBox,
|
||||
+ ChunkCullAdapter cullAdapter) {
|
||||
+ int i = 0;
|
||||
+ BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
+ int minXChunk = MathHelper.floor_double(boundingBox.minX / 16.0) * 16;
|
||||
+ int minYChunk = MathHelper.floor_double(boundingBox.minY / 16.0) * 16;
|
||||
+ int minZChunk = MathHelper.floor_double(boundingBox.minZ / 16.0) * 16;
|
||||
+ int maxXChunk = MathHelper.floor_double(boundingBox.maxX / 16.0) * 16;
|
||||
+ int maxYChunk = MathHelper.floor_double(boundingBox.maxY / 16.0) * 16;
|
||||
+ int maxZChunk = MathHelper.floor_double(boundingBox.maxZ / 16.0) * 16;
|
||||
+ for (int cx = minXChunk; cx <= maxXChunk; cx += 16) {
|
||||
+ for (int cz = minZChunk; cz <= maxZChunk; cz += 16) {
|
||||
+ for (int cy = minYChunk; cy <= maxYChunk; cy += 16) {
|
||||
+ tmp.x = cx;
|
||||
+ tmp.y = cy;
|
||||
+ tmp.z = cz;
|
||||
+ RenderChunk ch = viewFrustum.getRenderChunk(tmp);
|
||||
+ CompiledChunk cch;
|
||||
+ if (ch != null && (cch = ch.getCompiledChunk()) != null && !cch.isLayerEmpty(blockLayerIn)
|
||||
+ && !cullAdapter.shouldCull(ch)) {
|
||||
+ this.renderContainer.addRenderChunk(ch, blockLayerIn);
|
||||
+ ++i;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (i > 0) {
|
||||
+ this.mc.mcProfiler.endStartSection("render_shadow_" + blockLayerIn);
|
||||
+ this.renderContainer.renderChunkLayer(blockLayerIn);
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 93 : 94 @ 93 : 103
|
||||
> CHANGE 2 : 16 @ 2 : 10
|
||||
|
||||
~ this.renderContainer.renderChunkLayer(blockLayerIn);
|
||||
~ this.mc.entityRenderer.disableLightmap();
|
||||
~ }
|
||||
~
|
||||
~ public int renderParaboloidBlockLayer(EnumWorldBlockLayer blockLayerIn, double partialTicks, int up,
|
||||
~ Entity entityIn) {
|
||||
~ double rad = 8.0;
|
||||
~
|
||||
~ int minX = (int) (entityIn.posX - rad);
|
||||
~ int minY = (int) entityIn.posY;
|
||||
~ if (up == -1) {
|
||||
~ minY -= rad * 0.75;
|
||||
~ } else {
|
||||
~ minY += 1.0;
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ int minZ = (int) (entityIn.posZ - rad);
|
||||
|
||||
> CHANGE 1 : 31 @ 1 : 18
|
||||
|
||||
~ int maxX = (int) (entityIn.posX + rad);
|
||||
~ int maxY = (int) entityIn.posY;
|
||||
~ if (up == 1) {
|
||||
~ maxY += rad;
|
||||
~ } else {
|
||||
~ maxY += 2.0;
|
||||
~ }
|
||||
~ int maxZ = (int) (entityIn.posZ + rad);
|
||||
~
|
||||
~ BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
~ minX = MathHelper.floor_double(minX / 16.0) * 16;
|
||||
~ minY = MathHelper.floor_double(minY / 16.0) * 16;
|
||||
~ minZ = MathHelper.floor_double(minZ / 16.0) * 16;
|
||||
~ maxX = MathHelper.floor_double(maxX / 16.0) * 16;
|
||||
~ maxY = MathHelper.floor_double(maxY / 16.0) * 16;
|
||||
~ maxZ = MathHelper.floor_double(maxZ / 16.0) * 16;
|
||||
~
|
||||
~ int i = 0;
|
||||
~ for (int cx = minX; cx <= maxX; cx += 16) {
|
||||
~ for (int cz = minZ; cz <= maxZ; cz += 16) {
|
||||
~ for (int cy = minY; cy <= maxY; cy += 16) {
|
||||
~ tmp.x = cx;
|
||||
~ tmp.y = cy;
|
||||
~ tmp.z = cz;
|
||||
~ RenderChunk ch = viewFrustum.getRenderChunk(tmp);
|
||||
~ CompiledChunk cch;
|
||||
~ if (ch != null && (cch = ch.getCompiledChunk()) != null && !cch.isLayerEmpty(blockLayerIn)) {
|
||||
~ this.renderContainer.addRenderChunk(ch, blockLayerIn);
|
||||
~ ++i;
|
||||
~ }
|
||||
|
||||
> CHANGE 3 : 10 @ 3 : 5
|
||||
|
||||
~ if (i > 0) {
|
||||
~ this.mc.mcProfiler.endStartSection("render_paraboloid_" + up + "_" + blockLayerIn);
|
||||
~ this.mc.entityRenderer.enableLightmap();
|
||||
~ this.renderContainer.renderChunkLayer(blockLayerIn);
|
||||
~ this.mc.entityRenderer.disableLightmap();
|
||||
~ }
|
||||
~ return i;
|
||||
|
||||
> CHANGE 92 : 93 @ 92 : 102
|
||||
|
||||
~ GlStateManager.callList(this.glSkyList);
|
||||
|
||||
@ -182,11 +554,21 @@
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
|
||||
> CHANGE 175 : 176 @ 175 : 176
|
||||
> CHANGE 155 : 157 @ 155 : 156
|
||||
|
||||
~ worldRendererIn.begin(7, DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> CHANGE 19 : 20 @ 19 : 20
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = this.destroyBlockIcons[i];
|
||||
|
||||
> CHANGE 21 : 22 @ 21 : 22
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
|
||||
~ if (partialTicks == 0 && movingObjectPositionIn != null
|
||||
~ && movingObjectPositionIn.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ EaglercraftGPU.glLineWidth(2.0F);
|
||||
|
||||
|
@ -5,25 +5,42 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 5
|
||||
> CHANGE 2 : 6 @ 2 : 5
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 10
|
||||
> CHANGE 7 : 13 @ 7 : 11
|
||||
|
||||
~ GlStateManager.disableMCLight(0);
|
||||
~ GlStateManager.disableMCLight(1);
|
||||
~ if (!DeferredStateManager.isInDeferredPass()) {
|
||||
~ GlStateManager.disableLighting();
|
||||
~ GlStateManager.disableMCLight(0);
|
||||
~ GlStateManager.disableMCLight(1);
|
||||
~ GlStateManager.disableColorMaterial();
|
||||
~ }
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 7
|
||||
> CHANGE 3 : 10 @ 3 : 21
|
||||
|
||||
~ GlStateManager.enableMCLight(0, 0.6f, LIGHT0_POS.xCoord, LIGHT0_POS.yCoord, LIGHT0_POS.zCoord, 0.0D);
|
||||
~ GlStateManager.enableMCLight(1, 0.6f, LIGHT1_POS.xCoord, LIGHT1_POS.yCoord, LIGHT1_POS.zCoord, 0.0D);
|
||||
~ GlStateManager.setMCLightAmbient(0.4f, 0.4f, 0.4f);
|
||||
~ if (!DeferredStateManager.isInDeferredPass()) {
|
||||
~ GlStateManager.enableLighting();
|
||||
~ GlStateManager.enableMCLight(0, 0.6f, LIGHT0_POS.xCoord, LIGHT0_POS.yCoord, LIGHT0_POS.zCoord, 0.0D);
|
||||
~ GlStateManager.enableMCLight(1, 0.6f, LIGHT1_POS.xCoord, LIGHT1_POS.yCoord, LIGHT1_POS.zCoord, 0.0D);
|
||||
~ GlStateManager.setMCLightAmbient(0.4f, 0.4f, 0.4f);
|
||||
~ GlStateManager.enableColorMaterial();
|
||||
~ }
|
||||
|
||||
> DELETE 1 @ 1 : 15
|
||||
> CHANGE 15 : 22 @ 15 : 20
|
||||
|
||||
~ if (!DeferredStateManager.isInDeferredPass()) {
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.rotate(-30.0F, 0.0F, 1.0F, 0.0F);
|
||||
~ GlStateManager.rotate(165.0F, 1.0F, 0.0F, 0.0F);
|
||||
~ enableStandardItemLighting();
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -12,8 +12,9 @@
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
> CHANGE 7 : 9 @ 7 : 9
|
||||
|
||||
~ this.preRenderChunk(renderchunk, enumworldblocklayer);
|
||||
~ EaglercraftGPU.glCallList(
|
||||
|
||||
> EOF
|
||||
|
@ -0,0 +1,33 @@
|
||||
|
||||
# Eagler Context Redacted Diff
|
||||
# Copyright (c) 2023 lax1dude. All rights reserved.
|
||||
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 6 : 7 @ 6
|
||||
|
||||
+ protected final int[] vertexDataWithNormals;
|
||||
|
||||
> INSERT 5 : 6 @ 5
|
||||
|
||||
+ this.vertexDataWithNormals = null;
|
||||
|
||||
> INSERT 4 : 11 @ 4
|
||||
|
||||
+ public BakedQuad(int[] vertexDataIn, int[] vertexDataWithNormalsIn, int tintIndexIn, EnumFacing faceIn) {
|
||||
+ this.vertexData = vertexDataIn;
|
||||
+ this.vertexDataWithNormals = vertexDataWithNormalsIn;
|
||||
+ this.tintIndex = tintIndexIn;
|
||||
+ this.face = faceIn;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 4 : 8 @ 4
|
||||
|
||||
+ public int[] getVertexDataWithNormals() {
|
||||
+ return this.vertexDataWithNormals;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
@ -7,17 +7,30 @@
|
||||
|
||||
> DELETE 3 @ 3 : 6
|
||||
|
||||
> INSERT 1 : 3 @ 1
|
||||
> INSERT 1 : 4 @ 1
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ private final EaglerTextureAtlasSprite texture;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
> CHANGE 1 : 5 @ 1 : 4
|
||||
|
||||
~ public BreakingFour(BakedQuad parBakedQuad, EaglerTextureAtlasSprite textureIn) {
|
||||
~ super(Arrays.copyOf(parBakedQuad.getVertexData(), parBakedQuad.getVertexData().length),
|
||||
~ Arrays.copyOf(parBakedQuad.getVertexDataWithNormals(), parBakedQuad.getVertexDataWithNormals().length),
|
||||
~ parBakedQuad.tintIndex, parBakedQuad.face);
|
||||
|
||||
> INSERT 46 : 52 @ 46
|
||||
|
||||
+ if (this.vertexDataWithNormals != null) {
|
||||
+ int i2 = 8 * parInt1;
|
||||
+ this.vertexDataWithNormals[i2 + 4] = this.vertexData[i + 4];
|
||||
+ this.vertexDataWithNormals[i2 + 4 + 1] = this.vertexData[i + 4 + 1];
|
||||
+
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,9 +5,10 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
> INSERT 2 : 7 @ 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;
|
||||
@ -16,31 +17,133 @@
|
||||
|
||||
> DELETE 4 @ 4 : 7
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 8
|
||||
> CHANGE 5 : 11 @ 5 : 8
|
||||
|
||||
~ private int stride = 7;
|
||||
~
|
||||
~ public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face,
|
||||
~ EaglerTextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn,
|
||||
~ BlockPartRotation partRotation, boolean uvLocked, boolean shade) {
|
||||
~ stride = 7;
|
||||
|
||||
> CHANGE 14 : 15 @ 14 : 15
|
||||
> CHANGE 1 : 4 @ 1 : 3
|
||||
|
||||
~ modelRotationIn, partRotation, uvLocked, shade, null);
|
||||
~ Vector3f calcNormal = getNormalFromVertexData(aint);
|
||||
~ EnumFacing enumfacing = getFacingFromVertexData(calcNormal);
|
||||
|
||||
> CHANGE 8 : 21 @ 8 : 9
|
||||
|
||||
~ stride = 8;
|
||||
~ int[] aint2 = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo),
|
||||
~ modelRotationIn, partRotation, uvLocked, shade, calcNormal);
|
||||
~ if (uvLocked) {
|
||||
~ this.func_178409_a(aint2, enumfacing, face.blockFaceUV, sprite);
|
||||
~ }
|
||||
~
|
||||
~ if (partRotation == null) {
|
||||
~ this.func_178408_a(aint2, enumfacing);
|
||||
~ }
|
||||
~ stride = 7;
|
||||
~
|
||||
~ return new BakedQuad(aint, aint2, face.tintIndex, enumfacing);
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ private int[] makeQuadVertexData(BlockPartFace partFace, EaglerTextureAtlasSprite sprite, EnumFacing facing,
|
||||
|
||||
> CHANGE 47 : 49 @ 47 : 49
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
|
||||
~ boolean parFlag2, Vector3f calcNormal) {
|
||||
~ int[] aint = new int[stride * 4];
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ parFlag2, calcNormal);
|
||||
|
||||
> CHANGE 40 : 42 @ 40 : 42
|
||||
|
||||
~ float[] sprite, EaglerTextureAtlasSprite modelRotationIn, ModelRotation partRotation,
|
||||
~ BlockPartRotation uvLocked, boolean shade, boolean parFlag2) {
|
||||
~ BlockPartRotation uvLocked, boolean shade, boolean parFlag2, Vector3f calcNormal) {
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 14
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ EaglerTextureAtlasSprite sprite, BlockFaceUV faceUV) {
|
||||
~ int i = (parFlag2 && stride != 8) ? this.getFaceShadeColor(enumfacing) : -1;
|
||||
|
||||
> CHANGE 113 : 114 @ 113 : 114
|
||||
> CHANGE 7 : 9 @ 7 : 8
|
||||
|
||||
~ this.storeVertexData(faceData, j, vertexIndex, vector3f, i, modelRotationIn, partFace.blockFaceUV, enumfacing,
|
||||
~ calcNormal);
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 8
|
||||
|
||||
~ EaglerTextureAtlasSprite sprite, BlockFaceUV faceUV, EnumFacing facing, Vector3f calcNormal) {
|
||||
~ int i = storeIndex * stride;
|
||||
|
||||
> INSERT 4 : 27 @ 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 (calcNormal != null) {
|
||||
+ int x = (byte) ((int) (calcNormal.x * 127.0F)) & 255;
|
||||
+ int y = (byte) ((int) (calcNormal.y * 127.0F)) & 255;
|
||||
+ int z = (byte) ((int) (calcNormal.z * 127.0F)) & 255;
|
||||
+ int l = x | y << 8 | z << 16 | ((byte) VertexMarkerState.markId) << 24;
|
||||
+ faceData[i + 6] = l;
|
||||
+ } else {
|
||||
+ Vec3i vec = facing.getDirectionVec();
|
||||
+ int x = (byte) ((int) (vec.x * 127.0F)) & 255;
|
||||
+ int y = (byte) ((int) (vec.y * 127.0F)) & 255;
|
||||
+ int z = (byte) ((int) (vec.z * 127.0F)) & 255;
|
||||
+ int l = x | y << 8 | z << 16 | ((byte) VertexMarkerState.markId) << 24;
|
||||
+ faceData[i + 6] = l;
|
||||
+ }
|
||||
+ } else {
|
||||
+ faceData[i] = Float.floatToRawIntBits(position.x);
|
||||
+ faceData[i + 1] = Float.floatToRawIntBits(position.y);
|
||||
+ faceData[i + 2] = Float.floatToRawIntBits(position.z);
|
||||
+ }
|
||||
|
||||
> CHANGE 66 : 67 @ 66 : 67
|
||||
|
||||
~ public static Vector3f getNormalFromVertexData(int[] faceData) {
|
||||
|
||||
> INSERT 17 : 21 @ 17
|
||||
|
||||
+ return vector3f5;
|
||||
+ }
|
||||
+
|
||||
+ public static EnumFacing getFacingFromVertexData(Vector3f normal) {
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 7
|
||||
|
||||
~ float f2 = Vector3f.dot(normal, vector3f6);
|
||||
|
||||
> CHANGE 14 : 15 @ 14 : 15
|
||||
|
||||
~ EaglerTextureAtlasSprite parTextureAtlasSprite) {
|
||||
|
||||
> CHANGE 76 : 77 @ 76 : 77
|
||||
> CHANGE 18 : 19 @ 18 : 19
|
||||
|
||||
~ int j = stride * i;
|
||||
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
|
||||
~ int j1 = stride * i1;
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
|
||||
~ int l = stride * k;
|
||||
|
||||
> CHANGE 14 : 16 @ 14 : 16
|
||||
|
||||
~ EaglerTextureAtlasSprite parTextureAtlasSprite) {
|
||||
~ int i = stride * facing;
|
||||
|
||||
> CHANGE 43 : 44 @ 43 : 44
|
||||
|
||||
~ int j = parBlockFaceUV.func_178345_c(facing) * stride;
|
||||
|
||||
> EOF
|
||||
|
@ -7,11 +7,12 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 2
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
|
||||
~
|
||||
~ import com.google.common.collect.Lists;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 3
|
||||
|
||||
@ -57,11 +58,17 @@
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
> INSERT 8 : 16 @ 8
|
||||
> INSERT 8 : 22 @ 8
|
||||
|
||||
+ public boolean canExecuteYet() {
|
||||
+ if (this.type == ChunkCompileTaskGenerator.Type.RESORT_TRANSPARENCY) {
|
||||
+ return !this.renderChunk.getCompiledChunk().isLayerEmpty(EnumWorldBlockLayer.TRANSLUCENT);
|
||||
+ CompiledChunk ch = this.renderChunk.getCompiledChunk();
|
||||
+ if (DeferredStateManager.isRenderingRealisticWater()) {
|
||||
+ return !ch.isLayerEmpty(EnumWorldBlockLayer.TRANSLUCENT)
|
||||
+ || !ch.isLayerEmpty(EnumWorldBlockLayer.REALISTIC_WATER);
|
||||
+ } else {
|
||||
+ return !ch.isLayerEmpty(EnumWorldBlockLayer.TRANSLUCENT);
|
||||
+ }
|
||||
+ } else {
|
||||
+ return true;
|
||||
+ }
|
||||
|
@ -5,11 +5,12 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 9
|
||||
> CHANGE 2 : 6 @ 2 : 9
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.ChunkUpdateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
@ -66,11 +67,7 @@
|
||||
+ generator.setStatus(ChunkCompileTaskGenerator.Status.UPLOADING);
|
||||
+
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 2
|
||||
|
||||
~ if (compiledchunk == null) {
|
||||
~ System.out.println(chunkcompiletaskgenerator$type);
|
||||
~ }
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
@ -87,9 +84,15 @@
|
||||
|
||||
~ this.chunkRenderDispatcher.uploadChunk(
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 3
|
||||
> CHANGE 2 : 11 @ 2 : 3
|
||||
|
||||
~ generator.getRenderChunk(), compiledchunk);
|
||||
~ if (DeferredStateManager.isRenderingRealisticWater()) {
|
||||
~ this.chunkRenderDispatcher.uploadChunk(
|
||||
~ EnumWorldBlockLayer.REALISTIC_WATER, generator.getRegionRenderCacheBuilder()
|
||||
~ .getWorldRendererByLayer(EnumWorldBlockLayer.REALISTIC_WATER),
|
||||
~ generator.getRenderChunk(), compiledchunk);
|
||||
~ }
|
||||
~ generator.getRenderChunk().setCompiledChunk(compiledchunk);
|
||||
~ generator.setStatus(ChunkCompileTaskGenerator.Status.DONE);
|
||||
|
||||
|
@ -18,4 +18,19 @@
|
||||
|
||||
~ return true;
|
||||
|
||||
> INSERT 8 : 9 @ 8
|
||||
|
||||
+ private WorldRenderer.State stateWater;
|
||||
|
||||
> INSERT 45 : 53 @ 45
|
||||
|
||||
+
|
||||
+ public WorldRenderer.State getStateRealisticWater() {
|
||||
+ return this.stateWater;
|
||||
+ }
|
||||
+
|
||||
+ public void setStateRealisticWater(WorldRenderer.State stateIn) {
|
||||
+ this.stateWater = stateIn;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -9,14 +9,16 @@
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
||||
|
||||
> CHANGE 3 : 9 @ 3 : 4
|
||||
> CHANGE 3 : 11 @ 3 : 4
|
||||
|
||||
~
|
||||
~ import com.google.common.collect.Maps;
|
||||
~ import com.google.common.collect.Sets;
|
||||
~
|
||||
~ 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;
|
||||
|
||||
> DELETE 4 @ 4 : 7
|
||||
|
||||
@ -24,17 +26,45 @@
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 13 @ 13 : 15
|
||||
> INSERT 8 : 12 @ 8
|
||||
|
||||
+ public static enum ShadowFrustumState {
|
||||
+ OUTSIDE, OUTSIDE_BB, INTERSECT, INSIDE
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 5 @ 5 : 7
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 5
|
||||
|
||||
~ private final float[] modelviewMatrix = new float[16];
|
||||
|
||||
> DELETE 13 @ 13 : 19
|
||||
> INSERT 3 : 9 @ 3
|
||||
|
||||
+ public int shadowLOD0FrameIndex = -1;
|
||||
+ public int shadowLOD1FrameIndex = -1;
|
||||
+ public int shadowLOD2FrameIndex = -1;
|
||||
+ public ShadowFrustumState shadowLOD0InFrustum = ShadowFrustumState.OUTSIDE;
|
||||
+ public ShadowFrustumState shadowLOD1InFrustum = ShadowFrustumState.OUTSIDE;
|
||||
+ public ShadowFrustumState shadowLOD2InFrustum = ShadowFrustumState.OUTSIDE;
|
||||
|
||||
> DELETE 10 @ 10 : 16
|
||||
|
||||
> DELETE 11 @ 11 : 15
|
||||
|
||||
> DELETE 31 @ 31 : 32
|
||||
> INSERT 24 : 33 @ 24
|
||||
|
||||
+ if (DeferredStateManager.isRenderingRealisticWater() && compiledchunk.getStateRealisticWater() != null
|
||||
+ && !compiledchunk.isLayerEmpty(EnumWorldBlockLayer.REALISTIC_WATER)) {
|
||||
+ this.preRenderBlocks(generator.getRegionRenderCacheBuilder()
|
||||
+ .getWorldRendererByLayer(EnumWorldBlockLayer.REALISTIC_WATER), this.position);
|
||||
+ generator.getRegionRenderCacheBuilder().getWorldRendererByLayer(EnumWorldBlockLayer.REALISTIC_WATER)
|
||||
+ .setVertexState(compiledchunk.getStateRealisticWater());
|
||||
+ this.postRenderBlocks(EnumWorldBlockLayer.REALISTIC_WATER, x, y, z, generator.getRegionRenderCacheBuilder()
|
||||
+ .getWorldRendererByLayer(EnumWorldBlockLayer.REALISTIC_WATER), compiledchunk);
|
||||
+ }
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 11
|
||||
|
||||
@ -56,7 +86,23 @@
|
||||
|
||||
~ TileEntity tileentity = regionrendercache.getTileEntity(blockpos$mutableblockpos);
|
||||
|
||||
> DELETE 38 @ 38 : 39
|
||||
> INSERT 21 : 34 @ 21
|
||||
|
||||
+
|
||||
+ if (block.eaglerShadersShouldRenderGlassHighlights()) {
|
||||
+ enumworldblocklayer1 = EnumWorldBlockLayer.GLASS_HIGHLIGHTS;
|
||||
+ worldrenderer = generator.getRegionRenderCacheBuilder()
|
||||
+ .getWorldRendererByLayerId(enumworldblocklayer1.ordinal());
|
||||
+ if (!compiledchunk.isLayerStarted(enumworldblocklayer1)) {
|
||||
+ compiledchunk.setLayerStarted(enumworldblocklayer1);
|
||||
+ this.preRenderBlocks(worldrenderer, blockpos);
|
||||
+ }
|
||||
+
|
||||
+ aboolean[enumworldblocklayer1.ordinal()] |= blockrendererdispatcher.renderBlock(iblockstate,
|
||||
+ blockpos$mutableblockpos, regionrendercache, worldrenderer);
|
||||
+ }
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
|
||||
> CHANGE 1 : 8 @ 1 : 12
|
||||
|
||||
@ -92,7 +138,25 @@
|
||||
~ this.compileTask.setCompiledChunk(this.compiledChunk);
|
||||
~ return this.compileTask;
|
||||
|
||||
> CHANGE 37 : 38 @ 37 : 45
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
|
||||
~ worldRendererIn.begin(7,
|
||||
~ DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> CHANGE 5 : 7 @ 5 : 6
|
||||
|
||||
~ if ((layer == EnumWorldBlockLayer.TRANSLUCENT || layer == EnumWorldBlockLayer.REALISTIC_WATER)
|
||||
~ && !compiledChunkIn.isLayerEmpty(layer)) {
|
||||
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
|
||||
~ if (layer == EnumWorldBlockLayer.REALISTIC_WATER) {
|
||||
~ compiledChunkIn.setStateRealisticWater(worldRendererIn.func_181672_a());
|
||||
~ } else {
|
||||
~ compiledChunkIn.setState(worldRendererIn.func_181672_a());
|
||||
~ }
|
||||
|
||||
> CHANGE 25 : 26 @ 25 : 33
|
||||
|
||||
~ this.compiledChunk = compiledChunkIn;
|
||||
|
||||
|
@ -5,12 +5,14 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
> INSERT 2 : 8 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ 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.NameTagRenderer;
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
@ -20,7 +22,20 @@
|
||||
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
> CHANGE 61 : 63 @ 61 : 63
|
||||
> INSERT 12 : 15 @ 12
|
||||
|
||||
+ if (DeferredStateManager.isEnableShadowRender()) {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
> INSERT 21 : 25 @ 21
|
||||
|
||||
+ public static void renderNameAdapter(Render r, Entity e, double x, double y, double z) {
|
||||
+ r.renderName(e, x, y, z);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 28 : 30 @ 28 : 30
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite("minecraft:blocks/fire_layer_0");
|
||||
~ EaglerTextureAtlasSprite textureatlassprite1 = texturemap.getAtlasSprite("minecraft:blocks/fire_layer_1");
|
||||
@ -29,7 +44,23 @@
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite2 = i % 2 == 0 ? textureatlassprite : textureatlassprite1;
|
||||
|
||||
> CHANGE 179 : 180 @ 179 : 180
|
||||
> CHANGE 150 : 152 @ 150 : 152
|
||||
|
||||
~ if (!DeferredStateManager.isInDeferredPass() && this.renderManager.options.field_181151_V
|
||||
~ && this.shadowSize > 0.0F && !entityIn.isInvisible() && this.renderManager.isRenderShadow()) {
|
||||
|
||||
> CHANGE 19 : 20 @ 19 : 20
|
||||
|
||||
~ public void renderLivingLabel(T entityIn, String str, double x, double y, double z, int maxDistance) {
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ NameTagRenderer.renderNameTag(entityIn, str, x, y, z, maxDistance);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ EaglercraftGPU.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
@ -5,6 +5,26 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 3 @ 3 : 5
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> INSERT 13 : 26 @ 13
|
||||
|
||||
+
|
||||
+ public void doRender(EntityBlaze entityliving, double d0, double d1, double d2, float f, float f1) {
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ try {
|
||||
+ super.doRender(entityliving, d0, d1, d2, f, f1);
|
||||
+ } finally {
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ }
|
||||
+ } else {
|
||||
+ super.doRender(entityliving, d0, d1, d2, f, f1);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,10 +5,31 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ 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.deferred.DynamicLightManager;
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
> INSERT 34 : 46 @ 34
|
||||
|
||||
+ public void doRender(EntityCreeper entitycreeper, double d0, double d1, double d2, float f, float f1) {
|
||||
+ float ff = entitycreeper.getCreeperFlashIntensity(f);
|
||||
+ if ((int) (ff * 10.0F) % 2 != 0) {
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ }
|
||||
+ try {
|
||||
+ super.doRender(entitycreeper, d0, d1, d2, f, f1);
|
||||
+ } finally {
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,13 +5,41 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ 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;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 2 @ 2 : 5
|
||||
|
||||
> INSERT 43 : 67 @ 43
|
||||
|
||||
+ if (DeferredStateManager.isDeferredRenderer()) {
|
||||
+ if (entitydragon.deathTicks > 0) {
|
||||
+ float f6 = (float) entitydragon.deathTicks / 200.0F;
|
||||
+ GlStateManager.depthFunc(515);
|
||||
+ GlStateManager.enableAlpha();
|
||||
+ GlStateManager.alphaFunc(516, f6);
|
||||
+ this.bindTexture(enderDragonExplodingTextures);
|
||||
+ this.mainModel.render(entitydragon, f, f1, f2, f3, f4, f5);
|
||||
+ GlStateManager.alphaFunc(516, 0.1F);
|
||||
+ GlStateManager.depthFunc(514);
|
||||
+ }
|
||||
+ if (entitydragon.hurtTime > 0) {
|
||||
+ GlStateManager.enableShaderBlendAdd();
|
||||
+ GlStateManager.setShaderBlendSrc(0.5f, 0.5f, 0.5f, 1.0f);
|
||||
+ GlStateManager.setShaderBlendAdd(1.0f, 0.0f, 0.0f, 0.0f);
|
||||
+ }
|
||||
+ this.bindEntityTexture(entitydragon);
|
||||
+ this.mainModel.render(entitydragon, f, f1, f2, f3, f4, f5);
|
||||
+ GlStateManager.depthFunc(515);
|
||||
+ if (entitydragon.hurtTime > 0) {
|
||||
+ GlStateManager.disableShaderBlendAdd();
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,10 +5,9 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
|
@ -5,11 +5,13 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
> CHANGE 2 : 7 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
~ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
@ -22,4 +24,21 @@
|
||||
~ float f6 = 0.0F * (float) (i - 1) * 0.5F;
|
||||
~ float f4 = 0.0F * (float) (i - 1) * 0.5F;
|
||||
|
||||
> INSERT 25 : 27 @ 25
|
||||
|
||||
+ boolean emissive = entityitem.eaglerEmissiveFlag;
|
||||
+ entityitem.eaglerEmissiveFlag = false;
|
||||
|
||||
> INSERT 8 : 11 @ 8
|
||||
|
||||
+ if (emissive) {
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ }
|
||||
|
||||
> INSERT 43 : 46 @ 43
|
||||
|
||||
+ if (emissive) {
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,13 +5,20 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 6 @ 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;
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> CHANGE 28 : 30 @ 28 : 29
|
||||
|
||||
~ worldrenderer.begin(7, DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> EOF
|
||||
|
@ -5,14 +5,130 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 4 : 7 @ 4
|
||||
> INSERT 4 : 12 @ 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.EaglerDeferredPipeline;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture.PassType;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> DELETE 21 @ 21 : 22
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 21 : 22 @ 21
|
||||
|
||||
+ import net.minecraft.item.ItemBlock;
|
||||
|
||||
> INSERT 5 : 6 @ 5
|
||||
|
||||
+ import net.minecraft.util.EnumWorldBlockLayer;
|
||||
|
||||
> INSERT 63 : 67 @ 63
|
||||
|
||||
+ public static float renderPosX = 0.0f;
|
||||
+ public static float renderPosY = 0.0f;
|
||||
+ public static float renderPosZ = 0.0f;
|
||||
+
|
||||
|
||||
> CHANGE 12 : 82 @ 12 : 15
|
||||
|
||||
~ if (DeferredStateManager.isInDeferredPass() && isTransparentItem(stack)) {
|
||||
~ if (DeferredStateManager.forwardCallbackHandler != null) {
|
||||
~ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
~ final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
~ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(renderPosX,
|
||||
~ renderPosY, renderPosZ, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||
~ @Override
|
||||
~ public void draw(PassType pass) {
|
||||
~ if (pass == PassType.MAIN) {
|
||||
~ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
~ }
|
||||
~ EntityRenderer.enableLightmapStatic();
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.loadMatrix(mat);
|
||||
~ GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
~ Minecraft.getMinecraft().getTextureManager()
|
||||
~ .bindTexture(TextureMap.locationBlocksTexture);
|
||||
~ RenderItem.this.renderModel(model, stack);
|
||||
~ if (pass != PassType.SHADOW && stack.hasEffect()) {
|
||||
~ GlStateManager.color(1.5F, 0.5F, 1.5F, 1.0F);
|
||||
~ DeferredStateManager.setDefaultMaterialConstants();
|
||||
~ DeferredStateManager.setRoughnessConstant(0.05f);
|
||||
~ DeferredStateManager.setMetalnessConstant(0.01f);
|
||||
~ GlStateManager.blendFunc(768, 1);
|
||||
~ renderEffect(model);
|
||||
~ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
~ }
|
||||
~ GlStateManager.popMatrix();
|
||||
~ EntityRenderer.disableLightmapStatic();
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ }
|
||||
~ });
|
||||
~ }
|
||||
~ } else {
|
||||
~ this.renderModel(model, stack);
|
||||
~ if (stack.hasEffect()) {
|
||||
~ if (DeferredStateManager.isInDeferredPass()) {
|
||||
~ if (DeferredStateManager.forwardCallbackHandler != null
|
||||
~ && !DeferredStateManager.isEnableShadowRender()) {
|
||||
~ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
~ final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
~ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(renderPosX,
|
||||
~ renderPosY, renderPosZ, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||
~ @Override
|
||||
~ public void draw(PassType pass) {
|
||||
~ if (pass == PassType.MAIN) {
|
||||
~ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
~ }
|
||||
~ EntityRenderer.enableLightmapStatic();
|
||||
~ GlStateManager.color(1.5F, 0.5F, 1.5F, 1.0F);
|
||||
~ DeferredStateManager.setDefaultMaterialConstants();
|
||||
~ DeferredStateManager.setRoughnessConstant(0.05f);
|
||||
~ DeferredStateManager.setMetalnessConstant(0.01f);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.loadMatrix(mat);
|
||||
~ GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
~ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ONE);
|
||||
~ renderEffect(model);
|
||||
~ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
~ GlStateManager.popMatrix();
|
||||
~ EntityRenderer.disableLightmapStatic();
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ }
|
||||
~ });
|
||||
~ }
|
||||
~ } else {
|
||||
~ GlStateManager.blendFunc(768, 1);
|
||||
~ this.renderEffect(model);
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> INSERT 7 : 13 @ 7
|
||||
|
||||
+ private static boolean isTransparentItem(ItemStack stack) {
|
||||
+ Item itm = stack.getItem();
|
||||
+ return itm instanceof ItemBlock
|
||||
+ && ((ItemBlock) itm).getBlock().getBlockLayer() == EnumWorldBlockLayer.TRANSLUCENT;
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> INSERT 123 : 124 @ 123
|
||||
|
||||
+ boolean flag = DeferredStateManager.isEnableShadowRender();
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT);
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK);
|
||||
|
||||
> EOF
|
||||
|
@ -5,16 +5,46 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 6 @ 2 : 4
|
||||
> CHANGE 2 : 9 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ 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.vector.Matrix4f;
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> CHANGE 21 : 22 @ 21 : 22
|
||||
> INSERT 11 : 33 @ 11
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ GlStateManager.disableExtensionPipeline();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.tryBlendFuncSeparate(768, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
+ GlStateManager.disableCull();
|
||||
+ float bright = 0.04f;
|
||||
+ GlStateManager.color(6.0f * bright, 6.25f * bright, 7.0f * bright, 1.0f);
|
||||
+ doRender0(entitylightningbolt, d0, d1, d2, var8, var9);
|
||||
+ GlStateManager.enableCull();
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ GlStateManager.enableExtensionPipeline();
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ return;
|
||||
+ }
|
||||
+ GlStateManager.enableBlend();
|
||||
+ GlStateManager.blendFunc(770, 1);
|
||||
+ doRender0(entitylightningbolt, d0, d1, d2, var8, var9);
|
||||
+ GlStateManager.disableBlend();
|
||||
+ }
|
||||
+
|
||||
+ private void doRender0(EntityLightningBolt entitylightningbolt, double d0, double d1, double d2, float var8,
|
||||
+ float var9) {
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(entitylightningbolt.boltVertex);
|
||||
|
||||
@ -22,4 +52,6 @@
|
||||
|
||||
~ EaglercraftRandom random1 = new EaglercraftRandom(entitylightningbolt.boltVertex);
|
||||
|
||||
> DELETE 73 @ 73 : 74
|
||||
|
||||
> EOF
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 7 @ 1
|
||||
> INSERT 1 : 8 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Maps;
|
||||
@ -15,6 +15,7 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ 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;
|
||||
|
||||
> DELETE 16 @ 16 : 18
|
||||
|
||||
@ -35,4 +36,50 @@
|
||||
|
||||
~ public <T extends Entity> Render getEntityRenderObject(Entity entityIn) {
|
||||
|
||||
> INSERT 85 : 86 @ 85
|
||||
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
|
||||
> CHANGE 7 : 13 @ 7 : 9
|
||||
|
||||
~ try {
|
||||
~ return this.doRenderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f,
|
||||
~ partialTicks, parFlag);
|
||||
~ } finally {
|
||||
~ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
~ }
|
||||
|
||||
> INSERT 2 : 13 @ 2
|
||||
|
||||
+ public static void setupLightmapCoords(Entity entity, float partialTicks) {
|
||||
+ int i = entity.getBrightnessForRender(partialTicks);
|
||||
+ if (entity.isBurning()) {
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ i = 15728880;
|
||||
+ }
|
||||
+ int j = i % 65536;
|
||||
+ int k = i / 65536;
|
||||
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 18 : 23 @ 18 : 19
|
||||
|
||||
~ try {
|
||||
~ return this.doRenderEntity(entityIn, x, y, z, entityYaw, partialTicks, false);
|
||||
~ } finally {
|
||||
~ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
~ }
|
||||
|
||||
> INSERT 14 : 17 @ 14
|
||||
|
||||
+ RenderItem.renderPosX = (float) x;
|
||||
+ RenderItem.renderPosY = (float) y + entity.height * 0.5f;
|
||||
+ RenderItem.renderPosZ = (float) z;
|
||||
|
||||
> CHANGE 14 : 16 @ 14 : 15
|
||||
|
||||
~ if (this.debugBoundingBox && !entity.isInvisible() && !parFlag
|
||||
~ && !DeferredStateManager.isDeferredRenderer()) {
|
||||
|
||||
> EOF
|
||||
|
@ -80,4 +80,8 @@
|
||||
~ ((ModelPlayer) modelplayer).renderLeftArm();
|
||||
~ }
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ public void renderLivingAt(AbstractClientPlayer abstractclientplayer, double d0, double d1, double d2) {
|
||||
|
||||
> EOF
|
||||
|
@ -11,4 +11,8 @@
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ public static final ResourceLocation slimeTextures = new ResourceLocation("textures/entity/slime/slime.png");
|
||||
|
||||
> EOF
|
||||
|
@ -5,10 +5,36 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 2 @ 2 : 5
|
||||
|
||||
> INSERT 28 : 37 @ 28
|
||||
|
||||
+ boolean light = entitytntprimed.fuse / 5 % 2 == 0;
|
||||
+ boolean deferred = DeferredStateManager.isInDeferredPass();
|
||||
+ if (light && deferred) {
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ DeferredStateManager.disableMaterialTexture();
|
||||
+ GlStateManager.enableShaderBlendAdd();
|
||||
+ GlStateManager.setShaderBlendSrc(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
+ GlStateManager.setShaderBlendAdd(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ }
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ if (light && !deferred) {
|
||||
|
||||
> INSERT 18 : 24 @ 18
|
||||
|
||||
+ if (light && deferred) {
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ DeferredStateManager.enableMaterialTexture();
|
||||
+ GlStateManager.disableShaderBlendAdd();
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
||||
|
||||
> INSERT 1 : 10 @ 1
|
||||
> INSERT 1 : 15 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
@ -20,8 +20,18 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ 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.deferred.EaglerDeferredPipeline;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.NameTagRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> DELETE 5 @ 5 : 7
|
||||
> INSERT 4 : 6 @ 4
|
||||
|
||||
+ import net.minecraft.client.model.ModelBiped;
|
||||
+ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
@ -31,7 +41,84 @@
|
||||
|
||||
~ return this.layerRenderers.add((LayerRenderer<T>) layer);
|
||||
|
||||
> CHANGE 194 : 201 @ 194 : 250
|
||||
> DELETE 115 @ 115 : 116
|
||||
|
||||
> CHANGE 36 : 42 @ 36 : 37
|
||||
|
||||
~ protected void renderModel(T entitylivingbase, float f, float f1, float f2, float f3, float f4, float f5) { // f8,
|
||||
~ // f7,
|
||||
~ // f10,
|
||||
~ // f4,
|
||||
~ // f9,
|
||||
~ // 0.0625
|
||||
|
||||
> INSERT 6 : 65 @ 6
|
||||
|
||||
+ if (flag1 && DeferredStateManager.isDeferredRenderer()) {
|
||||
+ if (!DeferredStateManager.isEnableShadowRender()
|
||||
+ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entitylivingbase,
|
||||
+ EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ EntityRenderer.enableLightmapStatic();
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.05f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.2f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.5f);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ GlStateManager.enableAlpha();
|
||||
+ GlStateManager.alphaFunc(516, 0.003921569F);
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 0.15F);
|
||||
+ RendererLivingEntity.this.bindEntityTexture(entitylivingbase);
|
||||
+ RendererLivingEntity.this.mainModel.swingProgress = RendererLivingEntity.this
|
||||
+ .getSwingProgress(entitylivingbase, f1);
|
||||
+ RendererLivingEntity.this.mainModel.isRiding = entitylivingbase.isRiding();
|
||||
+ RendererLivingEntity.this.mainModel.isChild = entitylivingbase.isChild();
|
||||
+ if (RendererLivingEntity.this.mainModel instanceof ModelBiped) {
|
||||
+ if ((entitylivingbase instanceof EntityPlayer)
|
||||
+ && ((EntityPlayer) entitylivingbase).isSpectator()) {
|
||||
+ ((ModelBiped) RendererLivingEntity.this.mainModel).setInvisible(false);
|
||||
+ ((ModelBiped) RendererLivingEntity.this.mainModel).bipedHead.showModel = true;
|
||||
+ ((ModelBiped) RendererLivingEntity.this.mainModel).bipedHeadwear.showModel = true;
|
||||
+ } else {
|
||||
+ ((ModelBiped) RendererLivingEntity.this.mainModel).setInvisible(true);
|
||||
+ }
|
||||
+ }
|
||||
+ RendererLivingEntity.this.mainModel.setLivingAnimations(entitylivingbase, f, f1, f1);
|
||||
+ RendererLivingEntity.this.mainModel.setRotationAngles(f, f1, f2, f3, f4, f5,
|
||||
+ entitylivingbase);
|
||||
+ RendererLivingEntity.this.mainModel.render(entitylivingbase, f, f1, f2, f3, f4, f5);
|
||||
+ if (RendererLivingEntity.this.mainModel instanceof ModelBiped) {
|
||||
+ if ((entitylivingbase instanceof EntityPlayer)
|
||||
+ && ((EntityPlayer) entitylivingbase).isSpectator()) {
|
||||
+ ((ModelBiped) RendererLivingEntity.this.mainModel).setInvisible(true);
|
||||
+ }
|
||||
+ }
|
||||
+ GlStateManager.alphaFunc(516, 0.1F);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.disableAlpha();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> CHANGE 25 : 26 @ 25 : 26
|
||||
|
||||
~ public boolean setBrightness(T entitylivingbaseIn, float partialTicks, boolean combineTextures) {
|
||||
|
||||
> CHANGE 9 : 16 @ 9 : 65
|
||||
|
||||
~ GlStateManager.enableShaderBlendAdd();
|
||||
~ float f1 = 1.0F - (float) (i >> 24 & 255) / 255.0F;
|
||||
@ -41,11 +128,23 @@
|
||||
~ GlStateManager.setShaderBlendSrc(f1, f1, f1, 1.0F);
|
||||
~ GlStateManager.setShaderBlendAdd(f2 * f1 + 0.4F, f3 * f1, f4 * f1, 0.0f);
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 42
|
||||
> CHANGE 4 : 6 @ 4 : 42
|
||||
|
||||
~ public void unsetBrightness() {
|
||||
~ GlStateManager.disableShaderBlendAdd();
|
||||
|
||||
> CHANGE 73 : 74 @ 73 : 74
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ public void renderLivingAt(T entityLivingBaseIn, double x, double y, double z) {
|
||||
|
||||
> INSERT 66 : 70 @ 66
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ NameTagRenderer.renderNameTag(entitylivingbase, null, d0, d1, d2, -69);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ EaglercraftGPU.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
@ -7,15 +7,21 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
> INSERT 1 : 10 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
+ 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.deferred.EaglerDeferredPipeline;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
@ -23,11 +29,93 @@
|
||||
|
||||
~ this.func_177179_a((T) modelbase, parInt1);
|
||||
|
||||
> CHANGE 19 : 20 @ 19 : 20
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
|
||||
> INSERT 1 : 18 @ 1
|
||||
|
||||
+ case CHAIN:
|
||||
+ case IRON:
|
||||
+ DeferredStateManager.setRoughnessConstant(0.123f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.902f);
|
||||
+ break;
|
||||
+ case GOLD:
|
||||
+ DeferredStateManager.setRoughnessConstant(0.108f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.907f);
|
||||
+ break;
|
||||
+ case DIAMOND:
|
||||
+ DeferredStateManager.setRoughnessConstant(0.078f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.588f);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ switch (itemarmor.getArmorMaterial()) {
|
||||
|
||||
> INSERT 14 : 15 @ 14
|
||||
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
|
||||
> CHANGE 2 : 41 @ 2 : 3
|
||||
|
||||
~ if (DeferredStateManager.isInDeferredPass()) {
|
||||
~ if (!DeferredStateManager.isEnableShadowRender()
|
||||
~ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
~ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
~ final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
~ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(
|
||||
~ entitylivingbaseIn, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||
~ @Override
|
||||
~ public void draw(PassType pass) {
|
||||
~ if (pass == PassType.MAIN) {
|
||||
~ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
~ }
|
||||
~ EntityRenderer.enableLightmapStatic();
|
||||
~ float f = 0.55f;
|
||||
~ GlStateManager.color(1.5F * f, 0.5F * f, 1.5F * f, 1.0F);
|
||||
~ DeferredStateManager.setDefaultMaterialConstants();
|
||||
~ DeferredStateManager.setRoughnessConstant(0.05f);
|
||||
~ DeferredStateManager.setMetalnessConstant(0.01f);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.loadMatrix(mat);
|
||||
~ GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ONE);
|
||||
~ modelbase.setModelAttributes(LayerArmorBase.this.renderer.getMainModel());
|
||||
~ modelbase.setLivingAnimations(entitylivingbaseIn, armorSlot, parFloat2, parFloat3);
|
||||
~ LayerArmorBase.this.func_177179_a((T) modelbase, parInt1);
|
||||
~ LayerArmorBase.this.func_177183_a(entitylivingbaseIn, (T) modelbase, armorSlot,
|
||||
~ parFloat2, parFloat3, parFloat4, parFloat5, parFloat6, parFloat7);
|
||||
~ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.popMatrix();
|
||||
~ EntityRenderer.disableLightmapStatic();
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ }
|
||||
~ });
|
||||
~ }
|
||||
~ break;
|
||||
~ }
|
||||
~ this.func_177183_a(entitylivingbaseIn, (T) modelbase, armorSlot, parFloat2, parFloat3, parFloat4,
|
||||
|
||||
> CHANGE 58 : 59 @ 58 : 59
|
||||
> CHANGE 27 : 31 @ 27 : 28
|
||||
|
||||
~ boolean d = !DeferredStateManager.isInDeferredPass();
|
||||
~ if (d) {
|
||||
~ GlStateManager.color(f1, f1, f1, 1.0F);
|
||||
~ }
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
|
||||
~ if (d) {
|
||||
~ GlStateManager.blendFunc(768, 1);
|
||||
~ GlStateManager.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
|
||||
~ }
|
||||
|
||||
> CHANGE 24 : 25 @ 24 : 25
|
||||
|
||||
~ String s = HString.format("textures/models/armor/%s_layer_%d%s.png",
|
||||
|
||||
|
@ -5,12 +5,85 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ 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.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
|
||||
> INSERT 16 : 67 @ 16
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (DeferredStateManager.forwardCallbackHandler != null
|
||||
+ && !DeferredStateManager.isEnableShadowRender()) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entitycreeper) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ boolean flag = entitycreeper.isInvisible();
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.1f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
+ GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);
|
||||
+ if (flag) {
|
||||
+ GlStateManager.depthMask(false);
|
||||
+ }
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.disableCull();
|
||||
+ GlStateManager.matrixMode(5890);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadIdentity();
|
||||
+ float f7 = (float) entitycreeper.ticksExisted + f2;
|
||||
+ GlStateManager.translate(f7 * 0.01F, f7 * 0.01F, 0.0F);
|
||||
+ GlStateManager.matrixMode(5888);
|
||||
+ LayerCreeperCharge.this.creeperRenderer.bindTexture(LIGHTNING_TEXTURE);
|
||||
+ LayerCreeperCharge.this.creeperModel
|
||||
+ .setModelAttributes(LayerCreeperCharge.this.creeperRenderer.getMainModel());
|
||||
+ LayerCreeperCharge.this.creeperModel.setLivingAnimations(entitycreeper, f, f1, f1);
|
||||
+ LayerCreeperCharge.this.creeperModel.render(entitycreeper, f, f1, f3, f4, f5, f6);
|
||||
+ GlStateManager.matrixMode(5890);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ GlStateManager.matrixMode(5888);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ if (flag) {
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ GlStateManager.enableCull();
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 2
|
||||
|
||||
~ if (flag) {
|
||||
~ GlStateManager.depthMask(false);
|
||||
~ }
|
||||
|
||||
> CHANGE 18 : 21 @ 18 : 19
|
||||
|
||||
~ if (flag) {
|
||||
~ GlStateManager.depthMask(true);
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,17 +5,73 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 6 @ 2 : 4
|
||||
> CHANGE 2 : 11 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ 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.EaglerDeferredPipeline;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
> INSERT 6 : 48 @ 6
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (entitydragon.deathTicks > 0 && !DeferredStateManager.isEnableShadowRender()
|
||||
+ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ final float ly = GlStateManager.getTexCoordY(1);
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(
|
||||
+ new ShadersRenderPassFuture(entitydragon, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ float bright = 0.01f + ly * 0.001f;
|
||||
+ GlStateManager.color(bright, bright, bright, 1.0F);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.tryBlendFuncSeparate(770, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
+ GlStateManager.enableCull();
|
||||
+ GlStateManager.enableBlend();
|
||||
+ GlStateManager.disableExtensionPipeline();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ doRenderLayer0(entitydragon, var2, var3, f, var5, var6, var7, var8);
|
||||
+ GlStateManager.enableExtensionPipeline();
|
||||
+ GlStateManager.popMatrix();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.disableAlpha();
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ } else {
|
||||
+ GlStateManager.enableBlend();
|
||||
+ GlStateManager.enableCull();
|
||||
+ GlStateManager.blendFunc(770, 1);
|
||||
+ doRenderLayer0(entitydragon, var2, var3, f, var5, var6, var7, var8);
|
||||
+ GlStateManager.disableBlend();
|
||||
+ GlStateManager.disableCull();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void doRenderLayer0(EntityDragon entitydragon, float var2, float var3, float f, float var5, float var6,
|
||||
+ float var7, float var8) {
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom(432L);
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 27 @ 27 : 29
|
||||
|
||||
> EOF
|
||||
|
@ -5,11 +5,26 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 14 : 25 @ 14
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ DeferredStateManager.setEmissionConstant(0.5f);
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ GlStateManager.enablePolygonOffset();
|
||||
+ GlStateManager.doPolygonOffset(-0.025f, 1.0f);
|
||||
+ this.dragonRenderer.getMainModel().render(entitydragon, f, f1, f3, f4, f5, f6);
|
||||
+ this.dragonRenderer.func_177105_a(entitydragon, f2);
|
||||
+ GlStateManager.disablePolygonOffset();
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,11 +5,69 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
> CHANGE 2 : 9 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
~ import net.minecraft.client.model.ModelEnderman;
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 14 : 64 @ 14
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (entityenderman.isInvisible()) {
|
||||
+ if (!DeferredStateManager.isEnableShadowRender()
|
||||
+ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entityenderman) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ LayerEndermanEyes.this.endermanRenderer.bindTexture(field_177203_a);
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.1f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
+ GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);
|
||||
+ GlStateManager.depthMask(false);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.disableCull();
|
||||
+ ModelEnderman eee = (ModelEnderman) LayerEndermanEyes.this.endermanRenderer.getMainModel();
|
||||
+ eee.isAttacking = entityenderman.isScreaming();
|
||||
+ eee.setLivingAnimations(entityenderman, f, f1, f1);
|
||||
+ eee.render(entityenderman, f, f1, f3, f4, f5, f6);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ GlStateManager.enableCull();
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ this.endermanRenderer.bindTexture(field_177203_a);
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ GlStateManager.enablePolygonOffset();
|
||||
+ GlStateManager.doPolygonOffset(-0.025f, 1.0f);
|
||||
+ this.endermanRenderer.getMainModel().render(entityenderman, f, f1, f3, f4, f5, f6);
|
||||
+ GlStateManager.disablePolygonOffset();
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ EntityRenderer.enableLightmapStatic();
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,13 +5,59 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 7 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
> CHANGE 4 : 5 @ 4 : 6
|
||||
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.minecraft.util.EnumWorldBlockLayer;
|
||||
|
||||
> INSERT 25 : 55 @ 25
|
||||
|
||||
+
|
||||
+ if (DeferredStateManager.isInDeferredPass()
|
||||
+ && iblockstate.getBlock().getBlockLayer() == EnumWorldBlockLayer.TRANSLUCENT) {
|
||||
+ if (DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entityenderman) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ EntityRenderer.enableLightmapStatic();
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
+ LayerHeldBlock.this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ GlStateManager.popMatrix();
|
||||
+ GlStateManager.disableRescaleNormal();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,12 +5,24 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
|
||||
~ boolean flag = DeferredStateManager.isEnableShadowRender();
|
||||
~ GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT);
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
|
||||
~ GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK);
|
||||
|
||||
> EOF
|
||||
|
@ -5,16 +5,64 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ 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.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
~ import net.minecraft.client.renderer.entity.RenderManager;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import net.minecraft.util.MathHelper;
|
||||
|
||||
> INSERT 11 : 44 @ 11
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entityslime) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.1f);
|
||||
+ boolean flag = LayerSlimeGel.this.slimeRenderer.setBrightness(entityslime, partialTicks,
|
||||
+ LayerSlimeGel.this.shouldCombineTextures());
|
||||
+ EntityRenderer.enableLightmapStatic();
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ RenderManager.setupLightmapCoords(entityslime, partialTicks);
|
||||
+ LayerSlimeGel.this.slimeModel
|
||||
+ .setModelAttributes(LayerSlimeGel.this.slimeRenderer.getMainModel());
|
||||
+ LayerSlimeGel.this.slimeRenderer.bindTexture(RenderSlime.slimeTextures);
|
||||
+ LayerSlimeGel.this.slimeModel.render(entityslime, f, f1, f2, f3, f4, f5);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ if (flag) {
|
||||
+ LayerSlimeGel.this.slimeRenderer.unsetBrightness();
|
||||
+ }
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 14 @ 14 : 15
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> EOF
|
||||
|
@ -5,11 +5,66 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
> CHANGE 2 : 9 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
~ import net.minecraft.client.model.ModelSpider;
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 13 : 60 @ 13
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (entityspider.isInvisible()) {
|
||||
+ if (!DeferredStateManager.isEnableShadowRender()
|
||||
+ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entityspider) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ LayerSpiderEyes.this.spiderRenderer.bindTexture(SPIDER_EYES);
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.1f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
+ GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);
|
||||
+ GlStateManager.depthMask(false);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.disableCull();
|
||||
+ ModelSpider eee = (ModelSpider) LayerSpiderEyes.this.spiderRenderer.getMainModel();
|
||||
+ eee.setLivingAnimations(entityspider, f, f1, f1);
|
||||
+ eee.render(entityspider, f, f1, f3, f4, f5, f6);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ GlStateManager.enableCull();
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ this.spiderRenderer.bindTexture(SPIDER_EYES);
|
||||
+ DeferredStateManager.setEmissionConstant(0.5f);
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ GlStateManager.enablePolygonOffset();
|
||||
+ GlStateManager.doPolygonOffset(-0.025f, 1.0f);
|
||||
+ this.spiderRenderer.getMainModel().render(entityspider, f, f1, f3, f4, f5, f6);
|
||||
+ GlStateManager.disablePolygonOffset();
|
||||
+ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,12 +5,74 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ 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.deferred.ShadersRenderPassFuture;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
> INSERT 17 : 67 @ 17
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (!DeferredStateManager.isEnableShadowRender()
|
||||
+ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(entitywither) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ boolean flag = entitywither.isInvisible();
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.5f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.2f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
+ GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);
|
||||
+ if (flag) {
|
||||
+ GlStateManager.depthMask(false);
|
||||
+ }
|
||||
+ LayerWitherAura.this.witherRenderer.bindTexture(WITHER_ARMOR);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.matrixMode(5890);
|
||||
+ GlStateManager.loadIdentity();
|
||||
+ float f7 = (float) entitywither.ticksExisted + f2;
|
||||
+ float f8 = MathHelper.cos(f7 * 0.02F) * 3.0F;
|
||||
+ float f9 = f7 * 0.01F;
|
||||
+ GlStateManager.translate(f8, f9, 0.0F);
|
||||
+ GlStateManager.matrixMode(5888);
|
||||
+ GlStateManager.disableCull();
|
||||
+ LayerWitherAura.this.witherModel.setLivingAnimations(entitywither, f, f1, f2);
|
||||
+ LayerWitherAura.this.witherModel.setRotationAngles(f, f1, f2, f3, f4, f5, entitywither);
|
||||
+ LayerWitherAura.this.witherModel
|
||||
+ .setModelAttributes(LayerWitherAura.this.witherRenderer.getMainModel());
|
||||
+ LayerWitherAura.this.witherModel.render(entitywither, f, f1, f3, f4, f5, f6);
|
||||
+ GlStateManager.matrixMode(5890);
|
||||
+ GlStateManager.loadIdentity();
|
||||
+ GlStateManager.matrixMode(5888);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ if (flag) {
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> INSERT 22 : 23 @ 22
|
||||
|
||||
+ GlStateManager.depthMask(true);
|
||||
|
||||
> EOF
|
||||
|
@ -14,25 +14,20 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+
|
||||
|
||||
> CHANGE 8 : 20 @ 8 : 19
|
||||
> CHANGE 8 : 16 @ 8 : 10
|
||||
|
||||
~ if (blur != parFlag || mipmap != parFlag2) {
|
||||
~ this.blur = parFlag;
|
||||
~ this.mipmap = parFlag2;
|
||||
~ int i = -1;
|
||||
~ short short1 = -1;
|
||||
~ if (parFlag) {
|
||||
~ i = parFlag2 ? 9987 : 9729;
|
||||
~ short1 = 9729;
|
||||
~ } else {
|
||||
~ i = parFlag2 ? 9986 : 9728;
|
||||
~ short1 = 9728;
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 3
|
||||
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, i);
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, short1);
|
||||
~ setBlurMipmapDirect0(parFlag, parFlag2);
|
||||
~ }
|
||||
~ }
|
||||
~
|
||||
~ protected void setBlurMipmapDirect0(boolean parFlag, boolean parFlag2) {
|
||||
|
||||
> CHANGE 10 : 12 @ 10 : 12
|
||||
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, i);
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, short1);
|
||||
|
||||
> EOF
|
||||
|
@ -5,8 +5,9 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
@ -15,10 +16,14 @@
|
||||
|
||||
~ public class TextureClock extends EaglerTextureAtlasSprite {
|
||||
|
||||
> CHANGE 41 : 43 @ 41 : 43
|
||||
> CHANGE 7 : 8 @ 7 : 8
|
||||
|
||||
~ public void updateAnimation(IFramebufferGL[] copyColorFramebuffer) {
|
||||
|
||||
> CHANGE 33 : 35 @ 33 : 35
|
||||
|
||||
~ animationCache.copyFrameLevelsToTex2D(this.frameCounter, this.originX, this.originY, this.width,
|
||||
~ this.height);
|
||||
~ this.height, copyColorFramebuffer);
|
||||
|
||||
> INSERT 4 : 5 @ 4
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
@ -15,10 +16,26 @@
|
||||
|
||||
~ public class TextureCompass extends EaglerTextureAtlasSprite {
|
||||
|
||||
> CHANGE 62 : 64 @ 62 : 64
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ public void updateAnimation(IFramebufferGL[] copyColorFramebuffer) {
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ (double) minecraft.thePlayer.rotationYaw, false, false, copyColorFramebuffer);
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ this.updateCompass((World) null, 0.0D, 0.0D, 0.0D, true, false, copyColorFramebuffer);
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ boolean parFlag2, IFramebufferGL[] copyColorFramebuffer) {
|
||||
|
||||
> CHANGE 40 : 42 @ 40 : 42
|
||||
|
||||
~ animationCache.copyFrameLevelsToTex2D(this.frameCounter, this.originX, this.originY, this.width,
|
||||
~ this.height);
|
||||
~ this.height, copyColorFramebuffer);
|
||||
|
||||
> INSERT 4 : 5 @ 4
|
||||
|
||||
|
@ -5,9 +5,12 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
> CHANGE 5 : 12 @ 5 : 11
|
||||
~ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
~
|
||||
|
||||
> CHANGE 5 : 15 @ 5 : 11
|
||||
|
||||
~
|
||||
~ import com.google.common.collect.Lists;
|
||||
@ -16,13 +19,17 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
~ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 6 @ 6 : 8
|
||||
|
||||
> CHANGE 13 : 21 @ 13 : 18
|
||||
> CHANGE 13 : 22 @ 13 : 18
|
||||
|
||||
~ int glTex;
|
||||
~ if (resource.cachedPointer != null) {
|
||||
~ TextureUtil.bindTexture(((ITextureObject) resource.cachedPointer).getGlTextureId()); // unsafe, lol
|
||||
~ TextureUtil.bindTexture(glTex = ((ITextureObject) resource.cachedPointer).getGlTextureId()); // unsafe, lol
|
||||
~ } else {
|
||||
~ Object object = (ITextureObject) this.mapTextureObjects.get(resource);
|
||||
~ if (object == null) {
|
||||
@ -30,10 +37,21 @@
|
||||
~ this.loadTexture(resource, (ITextureObject) object);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 2
|
||||
> CHANGE 1 : 15 @ 1 : 2
|
||||
|
||||
~ resource.cachedPointer = object;
|
||||
~ TextureUtil.bindTexture(((ITextureObject) object).getGlTextureId());
|
||||
~ TextureUtil.bindTexture(glTex = ((ITextureObject) object).getGlTextureId());
|
||||
~ }
|
||||
~ if (DeferredStateManager.isInDeferredPass()) {
|
||||
~ TextureMap blocksTex = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||
~ if (blocksTex != null) {
|
||||
~ if (blocksTex.getGlTextureId() == glTex) {
|
||||
~ DeferredStateManager.enableMaterialTexture();
|
||||
~ GlStateManager.quickBindTexture(GL_TEXTURE2, blocksTex.eaglerPBRMaterialTexture);
|
||||
~ } else {
|
||||
~ DeferredStateManager.disableMaterialTexture();
|
||||
~ }
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
@ -11,49 +11,260 @@
|
||||
|
||||
+ import java.util.Collection;
|
||||
|
||||
> INSERT 6 : 15 @ 6
|
||||
> INSERT 6 : 20 @ 6
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.EaglerTextureAtlasSpritePBR;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.PBRTextureMapUtils;
|
||||
|
||||
> DELETE 2 @ 2 : 8
|
||||
|
||||
> DELETE 9 @ 9 : 11
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 8
|
||||
> INSERT 1 : 3 @ 1
|
||||
|
||||
+ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*;
|
||||
+
|
||||
|
||||
> CHANGE 4 : 7 @ 4 : 7
|
||||
|
||||
~ private final List<EaglerTextureAtlasSprite> listAnimatedSprites;
|
||||
~ private final Map<String, EaglerTextureAtlasSprite> mapRegisteredSprites;
|
||||
~ private final Map<String, EaglerTextureAtlasSprite> mapUploadedSprites;
|
||||
|
||||
> CHANGE 3 : 6 @ 3 : 4
|
||||
> CHANGE 3 : 9 @ 3 : 4
|
||||
|
||||
~ private final EaglerTextureAtlasSprite missingImage;
|
||||
~ private final EaglerTextureAtlasSpritePBR missingImagePBR;
|
||||
~ private int width;
|
||||
~ private int height;
|
||||
~ private boolean isEaglerPBRMode = false;
|
||||
~ public int eaglerPBRMaterialTexture = -1;
|
||||
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
> INSERT 1 : 7 @ 1
|
||||
|
||||
+ public static final int _GL_FRAMEBUFFER = 0x8D40;
|
||||
+ public static final int _GL_COLOR_ATTACHMENT0 = 0x8CE0;
|
||||
+
|
||||
+ private IFramebufferGL[] copyColorFramebuffer = null;
|
||||
+ private IFramebufferGL[] copyMaterialFramebuffer = null;
|
||||
+
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ this.missingImage = new EaglerTextureAtlasSprite("missingno");
|
||||
~ this.missingImagePBR = new EaglerTextureAtlasSpritePBR("missingno");
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
> INSERT 11 : 27 @ 11
|
||||
|
||||
+ this.missingImagePBR.setIconWidth(16);
|
||||
+ this.missingImagePBR.setIconHeight(16);
|
||||
+ int[][][] aint2 = new int[3][this.mipmapLevels + 1][];
|
||||
+ aint2[0][0] = aint;
|
||||
+ int[] missingNormals = new int[256];
|
||||
+ for (int i = 0; i < missingNormals.length; ++i) {
|
||||
+ missingNormals[i] = 0xFF7F7F;
|
||||
+ }
|
||||
+ aint2[1][0] = missingNormals;
|
||||
+ int[] missingMaterial = new int[256];
|
||||
+ for (int i = 0; i < missingMaterial.length; ++i) {
|
||||
+ missingMaterial[i] = 0x00000077;
|
||||
+ }
|
||||
+ aint2[2][0] = missingMaterial;
|
||||
+ this.missingImagePBR.setFramesTextureDataPBR(new List[] { Lists.newArrayList(new int[][][] { aint2[0] }),
|
||||
+ Lists.newArrayList(new int[][][] { aint2[1] }), Lists.newArrayList(new int[][][] { aint2[2] }) });
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ destroyAnimationCaches();
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
> INSERT 7 : 27 @ 7
|
||||
|
||||
+ public void deleteGlTexture() {
|
||||
+ super.deleteGlTexture();
|
||||
+ if (eaglerPBRMaterialTexture != -1) {
|
||||
+ GlStateManager.deleteTexture(eaglerPBRMaterialTexture);
|
||||
+ eaglerPBRMaterialTexture = -1;
|
||||
+ }
|
||||
+ if (copyColorFramebuffer != null) {
|
||||
+ for (int i = 0; i < copyColorFramebuffer.length; ++i) {
|
||||
+ _wglDeleteFramebuffer(copyColorFramebuffer[i]);
|
||||
+ }
|
||||
+ copyColorFramebuffer = null;
|
||||
+ }
|
||||
+ if (copyMaterialFramebuffer != null) {
|
||||
+ for (int i = 0; i < copyMaterialFramebuffer.length; ++i) {
|
||||
+ _wglDeleteFramebuffer(copyMaterialFramebuffer[i]);
|
||||
+ }
|
||||
+ copyMaterialFramebuffer = null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 8 : 43 @ 8
|
||||
|
||||
+ if (copyColorFramebuffer != null) {
|
||||
+ for (int l = 0; l < copyColorFramebuffer.length; ++l) {
|
||||
+ _wglDeleteFramebuffer(copyColorFramebuffer[l]);
|
||||
+ }
|
||||
+ copyColorFramebuffer = null;
|
||||
+ }
|
||||
+
|
||||
+ if (isEaglerPBRMode) {
|
||||
+ if (eaglerPBRMaterialTexture == -1) {
|
||||
+ eaglerPBRMaterialTexture = GlStateManager.generateTexture();
|
||||
+ }
|
||||
+ if (copyMaterialFramebuffer == null) {
|
||||
+ GlStateManager.bindTexture(eaglerPBRMaterialTexture);
|
||||
+ copyMaterialFramebuffer = new IFramebufferGL[this.mipmapLevels + 1];
|
||||
+ for (int l = 0; l < copyMaterialFramebuffer.length; ++l) {
|
||||
+ copyMaterialFramebuffer[l] = _wglCreateFramebuffer();
|
||||
+ _wglBindFramebuffer(_GL_FRAMEBUFFER, copyMaterialFramebuffer[l]);
|
||||
+ _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
|
||||
+ EaglercraftGPU.getNativeTexture(eaglerPBRMaterialTexture), l);
|
||||
+ }
|
||||
+ _wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (eaglerPBRMaterialTexture != -1) {
|
||||
+ GlStateManager.deleteTexture(eaglerPBRMaterialTexture);
|
||||
+ eaglerPBRMaterialTexture = -1;
|
||||
+ }
|
||||
+ if (copyMaterialFramebuffer != null) {
|
||||
+ for (int l = 0; l < copyMaterialFramebuffer.length; ++l) {
|
||||
+ _wglDeleteFramebuffer(copyMaterialFramebuffer[l]);
|
||||
+ }
|
||||
+ copyMaterialFramebuffer = null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = (EaglerTextureAtlasSprite) entry.getValue();
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
> INSERT 3 : 108 @ 3
|
||||
|
||||
+ if (isEaglerPBRMode) {
|
||||
+ try {
|
||||
+ IResource iresource = resourceManager.getResource(resourcelocation1);
|
||||
+ ImageData[] abufferedimageColor = new ImageData[1 + this.mipmapLevels];
|
||||
+ ImageData[] abufferedimageNormal = new ImageData[1 + this.mipmapLevels];
|
||||
+ ImageData[] abufferedimageMaterial = new ImageData[1 + this.mipmapLevels];
|
||||
+ abufferedimageColor[0] = TextureUtil.readBufferedImage(iresource.getInputStream());
|
||||
+ abufferedimageNormal[0] = PBRTextureMapUtils.locateCompanionTexture(resourceManager, iresource,
|
||||
+ "_n");
|
||||
+ abufferedimageMaterial[0] = PBRTextureMapUtils.locateCompanionTexture(resourceManager, iresource,
|
||||
+ "_s");
|
||||
+ boolean dontAnimateNormals = false;
|
||||
+ boolean dontAnimateMaterial = false;
|
||||
+ if (abufferedimageNormal[0] == null) {
|
||||
+ abufferedimageNormal[0] = PBRTextureMapUtils.defaultNormalsTexture;
|
||||
+ dontAnimateNormals = true;
|
||||
+ }
|
||||
+ if (abufferedimageMaterial[0] == null) {
|
||||
+ abufferedimageMaterial[0] = PBRTextureMapUtils.generateMaterialTextureFor(
|
||||
+ ((EaglerTextureAtlasSprite) (entry.getValue())).getIconName());
|
||||
+ dontAnimateMaterial = true;
|
||||
+ }
|
||||
+ PBRTextureMapUtils.unifySizes(0, abufferedimageColor, abufferedimageNormal, abufferedimageMaterial);
|
||||
+
|
||||
+ TextureMetadataSection texturemetadatasection = (TextureMetadataSection) iresource
|
||||
+ .getMetadata("texture");
|
||||
+ if (texturemetadatasection != null) {
|
||||
+ List list = texturemetadatasection.getListMipmaps();
|
||||
+ if (!list.isEmpty()) {
|
||||
+ int l = abufferedimageColor[0].width;
|
||||
+ int i1 = abufferedimageColor[0].height;
|
||||
+ if (MathHelper.roundUpToPowerOfTwo(l) != l || MathHelper.roundUpToPowerOfTwo(i1) != i1) {
|
||||
+ throw new RuntimeException(
|
||||
+ "Unable to load extra miplevels, source-texture is not power of two");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ Iterator iterator = list.iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ int i2 = ((Integer) iterator.next()).intValue();
|
||||
+ if (i2 > 0 && i2 < abufferedimageColor.length - 1 && abufferedimageColor[i2] == null) {
|
||||
+ ResourceLocation resourcelocation2 = this.completeResourceLocation(resourcelocation,
|
||||
+ i2);
|
||||
+
|
||||
+ try {
|
||||
+ IResource mipLevelResource = resourceManager.getResource(resourcelocation2);
|
||||
+ abufferedimageColor[i2] = TextureUtil
|
||||
+ .readBufferedImage(mipLevelResource.getInputStream());
|
||||
+ abufferedimageNormal[i2] = PBRTextureMapUtils
|
||||
+ .locateCompanionTexture(resourceManager, mipLevelResource, "_n");
|
||||
+ abufferedimageMaterial[i2] = PBRTextureMapUtils
|
||||
+ .locateCompanionTexture(resourceManager, mipLevelResource, "_s");
|
||||
+ if (abufferedimageNormal[i2] == null) {
|
||||
+ abufferedimageNormal[i2] = PBRTextureMapUtils.defaultNormalsTexture;
|
||||
+ }
|
||||
+ if (abufferedimageMaterial[i2] == null) {
|
||||
+ abufferedimageMaterial[i2] = PBRTextureMapUtils.generateMaterialTextureFor(
|
||||
+ ((EaglerTextureAtlasSprite) (entry.getValue())).getIconName());
|
||||
+ }
|
||||
+ PBRTextureMapUtils.unifySizes(i2, abufferedimageColor, abufferedimageNormal,
|
||||
+ abufferedimageMaterial);
|
||||
+ if ((abufferedimageColor[0].width >> i2) != abufferedimageColor[i2].width) {
|
||||
+ throw new IOException("Mipmap level " + i2 + " is the wrong size, should be "
|
||||
+ + (abufferedimageColor[0].width >> i2) + " pixels");
|
||||
+ }
|
||||
+ } catch (Throwable exc) {
|
||||
+ logger.error("Unable to load miplevel {} from: {}", i2, resourcelocation2);
|
||||
+ logger.error(exc);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ AnimationMetadataSection animationmetadatasection = (AnimationMetadataSection) iresource
|
||||
+ .getMetadata("animation");
|
||||
+ textureatlassprite.loadSpritePBR(
|
||||
+ new ImageData[][] { abufferedimageColor, abufferedimageNormal, abufferedimageMaterial },
|
||||
+ animationmetadatasection, dontAnimateNormals, dontAnimateMaterial);
|
||||
+ } catch (RuntimeException runtimeexception) {
|
||||
+ logger.error("Unable to parse metadata from " + resourcelocation1);
|
||||
+ logger.error(runtimeexception);
|
||||
+ continue;
|
||||
+ } catch (IOException ioexception1) {
|
||||
+ logger.error("Using missing texture, unable to load " + resourcelocation1);
|
||||
+ logger.error(ioexception1);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ j = Math.min(j, Math.min(textureatlassprite.getIconWidth(), textureatlassprite.getIconHeight()));
|
||||
+ int l1 = Math.min(Integer.lowestOneBit(textureatlassprite.getIconWidth()),
|
||||
+ Integer.lowestOneBit(textureatlassprite.getIconHeight()));
|
||||
+ if (l1 < k) {
|
||||
+ logger.warn("Texture {} with size {}x{} limits mip level from {} to {}",
|
||||
+ new Object[] { resourcelocation1, Integer.valueOf(textureatlassprite.getIconWidth()),
|
||||
+ Integer.valueOf(textureatlassprite.getIconHeight()),
|
||||
+ Integer.valueOf(MathHelper.calculateLogBaseTwo(k)),
|
||||
+ Integer.valueOf(MathHelper.calculateLogBaseTwo(l1)) });
|
||||
+ k = l1;
|
||||
+ }
|
||||
+
|
||||
+ stitcher.addSprite(textureatlassprite);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ ImageData[] abufferedimage = new ImageData[1 + this.mipmapLevels];
|
||||
|
||||
@ -81,18 +292,70 @@
|
||||
|
||||
~ for (final EaglerTextureAtlasSprite textureatlassprite1 : this.mapRegisteredSprites.values()) {
|
||||
|
||||
> CHANGE 40 : 44 @ 40 : 41
|
||||
> CHANGE 25 : 32 @ 25 : 27
|
||||
|
||||
~ if (isEaglerPBRMode) {
|
||||
~ this.missingImagePBR.generateMipmaps(this.mipmapLevels);
|
||||
~ stitcher.addSprite(this.missingImagePBR);
|
||||
~ } else {
|
||||
~ this.missingImage.generateMipmaps(this.mipmapLevels);
|
||||
~ stitcher.addSprite(this.missingImage);
|
||||
~ }
|
||||
|
||||
> INSERT 11 : 28 @ 11
|
||||
|
||||
+ if (isEaglerPBRMode) {
|
||||
+ TextureUtil.allocateTextureImpl(eaglerPBRMaterialTexture, this.mipmapLevels, stitcher.getCurrentWidth(),
|
||||
+ stitcher.getCurrentHeight() * 2);
|
||||
+ }
|
||||
+
|
||||
+ TextureUtil.bindTexture(this.glTextureId);
|
||||
+
|
||||
+ copyColorFramebuffer = new IFramebufferGL[this.mipmapLevels + 1];
|
||||
+ for (int l = 0; l < copyColorFramebuffer.length; ++l) {
|
||||
+ copyColorFramebuffer[l] = _wglCreateFramebuffer();
|
||||
+ _wglBindFramebuffer(_GL_FRAMEBUFFER, copyColorFramebuffer[l]);
|
||||
+ _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
|
||||
+ EaglercraftGPU.getNativeTexture(this.glTextureId), l);
|
||||
+ }
|
||||
+
|
||||
+ _wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||
+
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 3
|
||||
|
||||
~ width = stitcher.getCurrentWidth();
|
||||
~ height = stitcher.getCurrentHeight();
|
||||
~
|
||||
~ for (EaglerTextureAtlasSprite textureatlassprite2 : stitcher.getStichSlots()) {
|
||||
~ List<EaglerTextureAtlasSprite> spriteList = stitcher.getStichSlots();
|
||||
~ for (EaglerTextureAtlasSprite textureatlassprite2 : spriteList) {
|
||||
|
||||
> CHANGE 21 : 22 @ 21 : 22
|
||||
> INSERT 5 : 6 @ 5
|
||||
|
||||
+ TextureUtil.bindTexture(this.glTextureId);
|
||||
|
||||
> INSERT 3 : 13 @ 3
|
||||
|
||||
+ if (isEaglerPBRMode) {
|
||||
+ TextureUtil.bindTexture(eaglerPBRMaterialTexture);
|
||||
+ int[][][] pixels = ((EaglerTextureAtlasSpritePBR) textureatlassprite2).getFramePBRTextureData(0);
|
||||
+ TextureUtil.uploadTextureMipmap(pixels[1], textureatlassprite2.getIconWidth(),
|
||||
+ textureatlassprite2.getIconHeight(), textureatlassprite2.getOriginX(),
|
||||
+ textureatlassprite2.getOriginY(), false, false);
|
||||
+ TextureUtil.uploadTextureMipmap(pixels[2], textureatlassprite2.getIconWidth(),
|
||||
+ textureatlassprite2.getIconHeight(), textureatlassprite2.getOriginX(),
|
||||
+ textureatlassprite2.getOriginY() + height, false, false);
|
||||
+ }
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 14
|
||||
|
||||
~ for (EaglerTextureAtlasSprite textureatlassprite3 : (Collection<EaglerTextureAtlasSprite>) hashmap.values()) {
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 10
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ _wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||
|
||||
> CHANGE 5 : 7 @ 5 : 7
|
||||
|
||||
~ HString.format("%s/%s%s", new Object[] { this.basePath, location.getResourcePath(), ".png" }))
|
||||
~ : new ResourceLocation(location.getResourceDomain(), HString.format("%s/mipmaps/%s.%d%s",
|
||||
@ -102,11 +365,30 @@
|
||||
~ public EaglerTextureAtlasSprite getAtlasSprite(String iconName) {
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = (EaglerTextureAtlasSprite) this.mapUploadedSprites.get(iconName);
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ textureatlassprite = isEaglerPBRMode ? missingImagePBR : missingImage;
|
||||
|
||||
> CHANGE 6 : 13 @ 6 : 7
|
||||
|
||||
~ if (isEaglerPBRMode) {
|
||||
~ for (EaglerTextureAtlasSprite textureatlassprite : this.listAnimatedSprites) {
|
||||
~ textureatlassprite.updateAnimationPBR(copyColorFramebuffer, copyMaterialFramebuffer, height);
|
||||
~ }
|
||||
~ _wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||
~ return;
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
|
||||
~ for (EaglerTextureAtlasSprite textureatlassprite : this.listAnimatedSprites) {
|
||||
~ textureatlassprite.updateAnimation(copyColorFramebuffer);
|
||||
|
||||
> CHANGE 5 : 12 @ 5 : 6
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ _wglBindFramebuffer(_GL_FRAMEBUFFER, null);
|
||||
|
||||
> CHANGE 2 : 9 @ 2 : 3
|
||||
|
||||
~ private void destroyAnimationCaches() {
|
||||
~ for (EaglerTextureAtlasSprite textureatlassprite : this.listAnimatedSprites) {
|
||||
@ -121,15 +403,20 @@
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = (EaglerTextureAtlasSprite) this.mapRegisteredSprites
|
||||
~ .get(location);
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
|
||||
~ textureatlassprite = EaglerTextureAtlasSprite.makeAtlasSprite(location);
|
||||
~ if (isEaglerPBRMode) {
|
||||
~ textureatlassprite = EaglerTextureAtlasSpritePBR.makeAtlasSprite(location);
|
||||
~ } else {
|
||||
~ textureatlassprite = EaglerTextureAtlasSprite.makeAtlasSprite(location);
|
||||
~ }
|
||||
|
||||
> CHANGE 15 : 16 @ 15 : 16
|
||||
> CHANGE 15 : 17 @ 15 : 17
|
||||
|
||||
~ public EaglerTextureAtlasSprite getMissingSprite() {
|
||||
~ return isEaglerPBRMode ? missingImagePBR : missingImage;
|
||||
|
||||
> INSERT 2 : 11 @ 2
|
||||
> INSERT 1 : 23 @ 1
|
||||
|
||||
+
|
||||
+ public int getWidth() {
|
||||
@ -140,5 +427,18 @@
|
||||
+ return height;
|
||||
+ }
|
||||
+
|
||||
+ public void setEnablePBREagler(boolean enable) {
|
||||
+ isEaglerPBRMode = enable;
|
||||
+ }
|
||||
+
|
||||
+ public void setBlurMipmapDirect0(boolean parFlag, boolean parFlag2) {
|
||||
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
|
||||
+ if (isEaglerPBRMode && eaglerPBRMaterialTexture != -1) {
|
||||
+ GlStateManager.setActiveTexture(33986);
|
||||
+ GlStateManager.bindTexture(eaglerPBRMaterialTexture);
|
||||
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
|
||||
+ GlStateManager.setActiveTexture(33984);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -53,12 +53,11 @@
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813b', (float) parInt2);
|
||||
~ // EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u8501', 0.0F);
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
> CHANGE 1 : 2 @ 1 : 6
|
||||
|
||||
~ EaglercraftGPU.glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA, parInt3 >> i, parInt4 >> i, 0, GL_RGBA,
|
||||
~ GL_UNSIGNED_BYTE, (IntBuffer) null);
|
||||
~ EaglercraftGPU.glTexStorage2D(GL_TEXTURE_2D, parInt2 + 1, GL_RGBA8, parInt3, parInt4);
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ public static int uploadTextureImageSub(int textureId, ImageData parBufferedImage, int parInt2, int parInt3,
|
||||
|
||||
|
@ -5,20 +5,23 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
> INSERT 2 : 7 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ 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.NameTagRenderer;
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> DELETE 16 @ 16 : 17
|
||||
> DELETE 12 @ 12 : 13
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 36 : 38 @ 36
|
||||
|
||||
@ -30,17 +33,33 @@
|
||||
+ GlStateManager.enableLighting();
|
||||
+ GlStateManager.enableColorMaterial();
|
||||
|
||||
> DELETE 33 @ 33 : 54
|
||||
> CHANGE 33 : 37 @ 33 : 52
|
||||
|
||||
~ boolean emissive = itemFrame.eaglerEmissiveFlag;
|
||||
~ itemFrame.eaglerEmissiveFlag = false;
|
||||
~ if (emissive) {
|
||||
~ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ GlStateManager.pushLightCoords();
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 7
|
||||
> CHANGE 3 : 6 @ 3 : 6
|
||||
|
||||
~ GlStateManager.popLightCoords();
|
||||
~ if (emissive) {
|
||||
~ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
|
||||
> CHANGE 21 : 22 @ 21 : 22
|
||||
> INSERT 19 : 23 @ 19
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ NameTagRenderer.renderNameTag(entityitemframe, null, d0, d1, d2, -69);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ EaglercraftGPU.glNormal3f(0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
@ -5,20 +5,173 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 7 @ 3 : 4
|
||||
> CHANGE 3 : 11 @ 3 : 4
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
~ 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.ShadersRenderPassFuture;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
~ import net.minecraft.client.renderer.EntityRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> CHANGE 19 : 21 @ 19 : 21
|
||||
> INSERT 6 : 8 @ 6
|
||||
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
+ if (DeferredStateManager.isEnableShadowRender())
|
||||
+ return;
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ boolean deferred = DeferredStateManager.isInDeferredPass();
|
||||
|
||||
> CHANGE 10 : 18 @ 10 : 12
|
||||
|
||||
~ if (deferred) {
|
||||
~ DeferredStateManager.setDefaultMaterialConstants();
|
||||
~ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
~ DeferredStateManager.setMetalnessConstant(0.3f);
|
||||
~ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
~ }
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 10497);
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 10497);
|
||||
|
||||
> CHANGE 24 : 26 @ 24 : 25
|
||||
|
||||
~ worldrenderer.begin(7, deferred ? DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL
|
||||
~ : DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
|
||||
> INSERT 6 : 8 @ 6
|
||||
|
||||
+ if (deferred)
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
|
||||
> INSERT 8 : 10 @ 8
|
||||
|
||||
+ if (deferred)
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
|
||||
> INSERT 8 : 10 @ 8
|
||||
|
||||
+ if (deferred)
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
|
||||
> INSERT 6 : 8 @ 6
|
||||
|
||||
+ if (deferred)
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
|
||||
> INSERT 1 : 10 @ 1
|
||||
|
||||
+
|
||||
+ if (deferred) {
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ GlStateManager.enableLighting();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ i = k;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 55 : 149 @ 55
|
||||
|
||||
+ if (deferred && list.size() > 0) {
|
||||
+ if (DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
+ final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
+ DeferredStateManager.forwardCallbackHandler
|
||||
+ .push(new ShadersRenderPassFuture((float) d0, (float) d1, (float) d2, f) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ TileEntityBeaconRenderer.this.bindTexture(beaconBeam);
|
||||
+ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 10497);
|
||||
+ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 10497);
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.2f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.6f);
|
||||
+ GlStateManager.depthMask(false);
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.loadMatrix(mat);
|
||||
+ GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
+ EntityRenderer.enableLightmapStatic();
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ List list = tileentitybeacon.getBeamSegments();
|
||||
+ int i = 0;
|
||||
+
|
||||
+ for (int j = 0; j < list.size(); ++j) {
|
||||
+ TileEntityBeacon.BeamSegment tileentitybeacon$beamsegment = (TileEntityBeacon.BeamSegment) list
|
||||
+ .get(j);
|
||||
+ int k = i + tileentitybeacon$beamsegment.getHeight();
|
||||
+
|
||||
+ double d3 = (double) tileentitybeacon.getWorld().getTotalWorldTime()
|
||||
+ + (double) f;
|
||||
+ double d4 = MathHelper.func_181162_h(
|
||||
+ -d3 * 0.2D - (double) MathHelper.floor_double(-d3 * 0.1D));
|
||||
+ float f2 = tileentitybeacon$beamsegment.getColors()[0];
|
||||
+ float f3 = tileentitybeacon$beamsegment.getColors()[1];
|
||||
+ float f4 = tileentitybeacon$beamsegment.getColors()[2];
|
||||
+
|
||||
+ double d15 = 0.0D;
|
||||
+ double d16 = 1.0D;
|
||||
+ double d17 = -1.0D + d4;
|
||||
+
|
||||
+ d15 = -1.0D + d4;
|
||||
+ d16 = (double) ((float) tileentitybeacon$beamsegment.getHeight() * f1) + d15;
|
||||
+ worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) k, d2 + 0.2D).tex(1.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) i, d2 + 0.2D).tex(1.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) i, d2 + 0.2D).tex(0.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) k, d2 + 0.2D).tex(0.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) k, d2 + 0.8D).tex(1.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) i, d2 + 0.8D).tex(1.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) i, d2 + 0.8D).tex(0.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) k, d2 + 0.8D).tex(0.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) k, d2 + 0.2D).tex(1.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) i, d2 + 0.2D).tex(1.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) i, d2 + 0.8D).tex(0.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.8D, d1 + (double) k, d2 + 0.8D).tex(0.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) k, d2 + 0.8D).tex(1.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) i, d2 + 0.8D).tex(1.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) i, d2 + 0.2D).tex(0.0D, d15)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.pos(d0 + 0.2D, d1 + (double) k, d2 + 0.2D).tex(0.0D, d16)
|
||||
+ .color(f2, f3, f4, 0.125F).endVertex();
|
||||
+ worldrenderer.genNormals(true, 0);
|
||||
+ tessellator.draw();
|
||||
+ i = k;
|
||||
+ }
|
||||
+ GlStateManager.popMatrix();
|
||||
+ EntityRenderer.disableLightmapStatic();
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -12,11 +12,7 @@
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> INSERT 49 : 50 @ 49
|
||||
|
||||
+
|
||||
|
||||
> DELETE 7 @ 7 : 9
|
||||
> DELETE 56 @ 56 : 58
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
|
@ -5,13 +5,15 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 4
|
||||
> CHANGE 2 : 9 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ 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.ShadersRenderPassFuture;
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
@ -21,7 +23,54 @@
|
||||
|
||||
~ private static final EaglercraftRandom field_147527_e = new EaglercraftRandom(31100L);
|
||||
|
||||
> CHANGE 34 : 35 @ 34 : 35
|
||||
> INSERT 3 : 31 @ 3
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ if (!DeferredStateManager.isInParaboloidPass() && !DeferredStateManager.isEnableShadowRender()
|
||||
+ && DeferredStateManager.forwardCallbackHandler != null) {
|
||||
+ DeferredStateManager.forwardCallbackHandler
|
||||
+ .push(new ShadersRenderPassFuture((float) d0, (float) d1, (float) d2, var8) {
|
||||
+ @Override
|
||||
+ public void draw(PassType pass) {
|
||||
+ if (pass == PassType.MAIN) {
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(x, y, z);
|
||||
+ }
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setRoughnessConstant(0.3f);
|
||||
+ DeferredStateManager.setMetalnessConstant(0.3f);
|
||||
+ DeferredStateManager.setEmissionConstant(0.9f);
|
||||
+ renderTileEntityAt0(var1, d0, d1, d2, var8, var9);
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ GlStateManager.enableBlend();
|
||||
+ renderTileEntityAt0(var1, d0, d1, d2, var8, var9);
|
||||
+ GlStateManager.disableBlend();
|
||||
+ }
|
||||
+
|
||||
+ private void renderTileEntityAt0(TileEntityEndPortal var1, double d0, double d1, double d2, float var8, int var9) {
|
||||
|
||||
> CHANGE 17 : 22 @ 17 : 19
|
||||
|
||||
~ if (DeferredStateManager.isInDeferredPass()) {
|
||||
~ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
~ } else {
|
||||
~ GlStateManager.blendFunc(770, 771);
|
||||
~ }
|
||||
|
||||
> CHANGE 7 : 12 @ 7 : 9
|
||||
|
||||
~ if (DeferredStateManager.isInDeferredPass()) {
|
||||
~ GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO);
|
||||
~ } else {
|
||||
~ GlStateManager.blendFunc(1, 1);
|
||||
~ }
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ float f7 = (float) (-(d1 + (double) f3 - 1.25));
|
||||
|
||||
@ -29,7 +78,7 @@
|
||||
|
||||
~ GlStateManager.enableTexGen();
|
||||
|
||||
> CHANGE 34 : 35 @ 34 : 38
|
||||
> CHANGE 33 : 34 @ 33 : 38
|
||||
|
||||
~ GlStateManager.disableTexGen();
|
||||
|
||||
|
@ -5,10 +5,12 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 6 @ 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;
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
@ -16,4 +18,14 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 28 : 30 @ 28 : 29
|
||||
|
||||
~ worldrenderer.begin(7, DeferredStateManager.isDeferredRenderer() ? VertexFormat.BLOCK_SHADERS
|
||||
~ : DefaultVertexFormats.BLOCK);
|
||||
|
||||
> INSERT 38 : 40 @ 38
|
||||
|
||||
+ GlStateManager.enableCull();
|
||||
+ GlStateManager.disableBlend();
|
||||
|
||||
> EOF
|
||||
|
@ -5,11 +5,19 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*;
|
||||
+ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*;
|
||||
+
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ 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.deferred.EaglerDeferredPipeline;
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
@ -19,4 +27,19 @@
|
||||
|
||||
~ EaglercraftGPU.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
|
||||
> INSERT 3 : 8 @ 3
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ _wglDrawBuffers(_GL_COLOR_ATTACHMENT0);
|
||||
+ GlStateManager.colorMask(true, true, true, false);
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ }
|
||||
|
||||
> INSERT 15 : 19 @ 15
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ _wglDrawBuffers(EaglerDeferredPipeline.instance.gBufferDrawBuffers);
|
||||
+ GlStateManager.colorMask(true, true, true, true);
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
> DELETE 2 @ 2 : 8
|
||||
|
||||
> INSERT 6 : 7 @ 6
|
||||
> CHANGE 4 : 5 @ 4 : 7
|
||||
|
||||
+ import java.nio.charset.StandardCharsets;
|
||||
~ import java.nio.charset.StandardCharsets;
|
||||
|
||||
> DELETE 8 @ 8 : 9
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
> INSERT 1 : 13 @ 1
|
||||
> INSERT 1 : 17 @ 1
|
||||
|
||||
+ import java.util.Set;
|
||||
+
|
||||
@ -27,6 +27,10 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ 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.deferred.VertexMarkerState;
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 9 @ 9 : 10
|
||||
|
||||
@ -87,7 +91,39 @@
|
||||
~ + Item.itemRegistry.getNameForObject(item) + "\'");
|
||||
~ LOGGER.warn(exception);
|
||||
|
||||
> CHANGE 188 : 189 @ 188 : 189
|
||||
> INSERT 132 : 133 @ 132
|
||||
|
||||
+ boolean deferred = Minecraft.getMinecraft().gameSettings.shaders;
|
||||
|
||||
> INSERT 9 : 34 @ 9
|
||||
|
||||
+ if (deferred) {
|
||||
+ ModelBlock currentBlockModel = modelblock;
|
||||
+ ResourceLocation currentResourceLocation = modelblockdefinition$variant.getModelLocation();
|
||||
+ Integer blockId = null;
|
||||
+ do {
|
||||
+ blockId = BlockVertexIDs.modelToID.get(currentResourceLocation.toString());
|
||||
+ if (blockId != null) {
|
||||
+ break;
|
||||
+ }
|
||||
+ currentResourceLocation = currentBlockModel.getParentLocation();
|
||||
+ currentBlockModel = models.get(currentResourceLocation);
|
||||
+ } while (currentBlockModel != null);
|
||||
+ if (blockId != null) {
|
||||
+ VertexMarkerState.markId = blockId.intValue();
|
||||
+ try {
|
||||
+ weightedbakedmodel$builder.add(
|
||||
+ this.bakeModel(modelblock, modelblockdefinition$variant.getRotation(),
|
||||
+ modelblockdefinition$variant.isUvLocked()),
|
||||
+ modelblockdefinition$variant.getWeight());
|
||||
+ } finally {
|
||||
+ VertexMarkerState.markId = 0;
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> CHANGE 47 : 48 @ 47 : 48
|
||||
|
||||
~ for (ModelResourceLocation modelresourcelocation : (List<ModelResourceLocation>) arraylist) {
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> INSERT 3 : 21 @ 3
|
||||
> INSERT 3 : 22 @ 3
|
||||
|
||||
+
|
||||
+ import org.json.JSONArray;
|
||||
@ -35,6 +35,7 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
||||
|
||||
> DELETE 5 @ 5 : 7
|
||||
|
||||
@ -44,8 +45,9 @@
|
||||
|
||||
> DELETE 1 @ 1 : 9
|
||||
|
||||
> CHANGE 23 : 26 @ 23 : 26
|
||||
> CHANGE 22 : 26 @ 22 : 26
|
||||
|
||||
~ public int limitFramerate = 260;
|
||||
~ public int clouds = 1;
|
||||
~ public boolean fancyGraphics = false;
|
||||
~ public int ambientOcclusion = 0;
|
||||
@ -54,7 +56,9 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 36 : 37 @ 36 : 37
|
||||
> DELETE 17 @ 17 : 28
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ public KeyBinding keyBindSprint = new KeyBinding("key.sprint", KeyboardConstants.KEY_R, "key.categories.movement");
|
||||
|
||||
@ -73,7 +77,7 @@
|
||||
|
||||
~ public int guiScale = 3;
|
||||
|
||||
> INSERT 3 : 12 @ 3
|
||||
> INSERT 3 : 16 @ 3
|
||||
|
||||
+ public boolean hudFps = true;
|
||||
+ public boolean hudCoords = true;
|
||||
@ -84,6 +88,10 @@
|
||||
+ public boolean chunkFix = true;
|
||||
+ public boolean fog = true;
|
||||
+ public int fxaa = 0;
|
||||
+ public boolean shaders = false;
|
||||
+ public boolean shadersAODisable = false;
|
||||
+ public EaglerDeferredConfig deferredShaderConf = new EaglerDeferredConfig();
|
||||
+ public int fastMath = 1;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
@ -113,18 +121,18 @@
|
||||
|
||||
~ : HString.format("%c", new Object[] { Character.valueOf((char) (parInt1 - 256)) })
|
||||
|
||||
> DELETE 83 @ 83 : 84
|
||||
> DELETE 76 @ 76 : 99
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> INSERT 45 : 47 @ 45
|
||||
> INSERT 35 : 37 @ 35
|
||||
|
||||
+ this.mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
|
||||
+ I18n.format("resourcePack.load.pleaseWait"));
|
||||
|
||||
> DELETE 58 @ 58 : 75
|
||||
> DELETE 18 @ 18 : 38
|
||||
|
||||
> INSERT 13 : 53 @ 13
|
||||
> DELETE 20 @ 20 : 37
|
||||
|
||||
> INSERT 13 : 57 @ 13
|
||||
|
||||
+ if (parOptions == GameSettings.Options.HUD_FPS) {
|
||||
+ this.hudFps = !this.hudFps;
|
||||
@ -166,10 +174,20 @@
|
||||
+ this.mc.toggleFullscreen();
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.FAST_MATH) {
|
||||
+ this.fastMath = (this.fastMath + parInt1) % 3;
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 54 @ 54 : 60
|
||||
> CHANGE 23 : 24 @ 23 : 34
|
||||
|
||||
> INSERT 12 : 30 @ 12
|
||||
~ : 0.0F)))))))))));
|
||||
|
||||
> DELETE 20 @ 20 : 26
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> INSERT 8 : 26 @ 8
|
||||
|
||||
+ case HUD_COORDS:
|
||||
+ return this.hudCoords;
|
||||
@ -226,7 +244,9 @@
|
||||
~ + "%")
|
||||
~ : "yee"))))))))))));
|
||||
|
||||
> INSERT 28 : 36 @ 28
|
||||
> DELETE 11 @ 11 : 19
|
||||
|
||||
> INSERT 9 : 19 @ 9
|
||||
|
||||
+ } else if (parOptions == GameSettings.Options.FXAA) {
|
||||
+ if (this.fxaa == 0) {
|
||||
@ -236,6 +256,8 @@
|
||||
+ } else {
|
||||
+ return s + I18n.format("options.off");
|
||||
+ }
|
||||
+ } else if (parOptions == GameSettings.Options.FAST_MATH) {
|
||||
+ return s + I18n.format("options.fastMath." + this.fastMath);
|
||||
|
||||
> CHANGE 7 : 9 @ 7 : 8
|
||||
|
||||
@ -269,52 +291,99 @@
|
||||
|
||||
> DELETE 4 @ 4 : 8
|
||||
|
||||
> INSERT 116 : 153 @ 116
|
||||
> CHANGE 52 : 54 @ 52 : 54
|
||||
|
||||
+ if (astring[0].equals("hudFps")) {
|
||||
+ this.hudFps = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hudWorld")) {
|
||||
+ this.hudWorld = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hudCoords")) {
|
||||
+ this.hudCoords = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hudPlayer")) {
|
||||
+ this.hudPlayer = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hudStats")) {
|
||||
+ this.hudStats = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hud24h")) {
|
||||
+ this.hud24h = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("chunkFix")) {
|
||||
+ this.chunkFix = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("fog")) {
|
||||
+ this.fog = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("fxaa")) {
|
||||
+ this.fxaa = (astring[1].equals("true") || astring[1].equals("false")) ? 0
|
||||
+ : Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
~ if (astring[0].equals("forceUnicodeFont")) {
|
||||
~ this.forceUnicodeFont = astring[1].equals("true");
|
||||
|
||||
> INSERT 6 : 8 @ 6
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("allowBlockAlternatives")) {
|
||||
~ this.allowBlockAlternatives = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("reducedDebugInfo")) {
|
||||
~ this.reducedDebugInfo = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("useNativeTransport")) {
|
||||
~ this.field_181150_U = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("entityShadows")) {
|
||||
~ this.field_181151_V = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("hudFps")) {
|
||||
~ this.hudFps = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("hudWorld")) {
|
||||
~ this.hudWorld = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("hudCoords")) {
|
||||
~ this.hudCoords = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("hudPlayer")) {
|
||||
~ this.hudPlayer = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("hudStats")) {
|
||||
~ this.hudStats = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("hud24h")) {
|
||||
~ this.hud24h = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("chunkFix")) {
|
||||
~ this.chunkFix = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("fog")) {
|
||||
~ this.fog = astring[1].equals("true");
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("fxaa")) {
|
||||
~ this.fxaa = (astring[1].equals("true") || astring[1].equals("false")) ? 0
|
||||
~ : Integer.parseInt(astring[1]);
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (astring[0].equals("fastMath")) {
|
||||
~ this.fastMath = Integer.parseInt(astring[1]);
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
> INSERT 6 : 12 @ 6
|
||||
|
||||
+ if (astring[0].equals("shaders")) {
|
||||
+ this.shaders = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
+
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
> INSERT 11 : 13 @ 11
|
||||
|
||||
+
|
||||
+ deferredShaderConf.readOption(astring[0], astring[1]);
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> CHANGE 12 : 14 @ 12 : 13
|
||||
|
||||
@ -330,7 +399,9 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 29 : 38 @ 29
|
||||
> DELETE 13 @ 13 : 24
|
||||
|
||||
> INSERT 5 : 16 @ 5
|
||||
|
||||
+ printwriter.println("hudFps:" + this.hudFps);
|
||||
+ printwriter.println("hudWorld:" + this.hudWorld);
|
||||
@ -341,13 +412,20 @@
|
||||
+ printwriter.println("chunkFix:" + this.chunkFix);
|
||||
+ printwriter.println("fog:" + this.fog);
|
||||
+ printwriter.println("fxaa:" + this.fxaa);
|
||||
+ printwriter.println("fastMath:" + this.fastMath);
|
||||
+ printwriter.println("shaders:" + this.shaders);
|
||||
|
||||
> INSERT 5 : 7 @ 5
|
||||
|
||||
+ Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
+
|
||||
|
||||
> INSERT 11 : 13 @ 11
|
||||
> INSERT 10 : 12 @ 10
|
||||
|
||||
+ deferredShaderConf.writeOptions(printwriter);
|
||||
+
|
||||
|
||||
> INSERT 1 : 3 @ 1
|
||||
|
||||
+
|
||||
+ EagRuntime.setStorage("g", bao.toByteArray());
|
||||
@ -383,6 +461,6 @@
|
||||
~ HUD_WORLD("options.hud.world", false, true), HUD_PLAYER("options.hud.player", false, true),
|
||||
~ HUD_24H("options.hud.24h", false, true), CHUNK_FIX("options.chunkFix", false, true),
|
||||
~ FOG("options.fog", false, true), FXAA("options.fxaa", false, false),
|
||||
~ FULLSCREEN("options.fullscreen", false, true);
|
||||
~ FULLSCREEN("options.fullscreen", false, true), FAST_MATH("options.fastMath", false, false);
|
||||
|
||||
> EOF
|
||||
|
@ -5,17 +5,21 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 6 @ 3 : 5
|
||||
> CHANGE 3 : 8 @ 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;
|
||||
~
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+
|
||||
|
||||
> DELETE 7 @ 7 : 10
|
||||
> CHANGE 7 : 8 @ 7 : 10
|
||||
|
||||
~ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
> DELETE 4 @ 4 : 7
|
||||
|
||||
@ -146,4 +150,33 @@
|
||||
|
||||
> DELETE 51 @ 51 : 63
|
||||
|
||||
> INSERT 22 : 48 @ 22
|
||||
|
||||
+
|
||||
+ public void renderDynamicLightsEagler(float partialTicks, boolean isInFrustum) {
|
||||
+ double entityX = prevPosX + (posX - prevPosX) * (double) partialTicks;
|
||||
+ double entityY = prevPosY + (posY - prevPosY) * (double) partialTicks;
|
||||
+ double entityZ = prevPosZ + (posZ - prevPosZ) * (double) partialTicks;
|
||||
+ 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) {
|
||||
+ renderDynamicLightsEaglerAt(entityX, entityY, entityZ, entityX2, entityY2, entityZ2, partialTicks,
|
||||
+ isInFrustum);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
+ double renderY, double renderZ, float partialTicks, boolean isInFrustum) {
|
||||
+ 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);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -17,7 +17,9 @@
|
||||
~ import com.google.common.collect.Maps;
|
||||
~
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 1 @ 1 : 5
|
||||
|
||||
@ -108,4 +110,18 @@
|
||||
|
||||
~ return false;
|
||||
|
||||
> INSERT 60 : 71 @ 60
|
||||
|
||||
+
|
||||
+ 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);
|
||||
+ Minecraft mc = Minecraft.getMinecraft();
|
||||
+ if (mc.gameSettings.thirdPersonView != 0 || !(mc.getRenderViewEntity() == this)) {
|
||||
+ Minecraft.getMinecraft().entityRenderer.renderHeldItemLight(this, 1.0f);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -10,7 +10,11 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
@ -26,4 +30,16 @@
|
||||
|
||||
> DELETE 11 @ 11 : 19
|
||||
|
||||
> INSERT 66 : 75 @ 66
|
||||
|
||||
+
|
||||
+ public boolean eaglerEmissiveFlag = false;
|
||||
+
|
||||
+ 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);
|
||||
+ eaglerEmissiveFlag = Minecraft.getMinecraft().entityRenderer.renderItemEntityLight(this, 0.1f);
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,8 +5,24 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 41 @ 41 : 46
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> DELETE 39 @ 39 : 44
|
||||
|
||||
> DELETE 126 @ 126 : 139
|
||||
|
||||
> INSERT 6 : 15 @ 6
|
||||
|
||||
+
|
||||
+ public boolean eaglerEmissiveFlag = false;
|
||||
+
|
||||
+ 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);
|
||||
+ eaglerEmissiveFlag = Minecraft.getMinecraft().entityRenderer.renderItemEntityLight(this, 0.1f);
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,8 +5,26 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 61 @ 61 : 64
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
|
||||
> DELETE 59 @ 59 : 62
|
||||
|
||||
> DELETE 8 @ 8 : 13
|
||||
|
||||
> INSERT 15 : 26 @ 15
|
||||
|
||||
+
|
||||
+ 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 (fuse / 5 % 2 == 0) {
|
||||
+ float dynamicLightMag = 10.0f;
|
||||
+ DynamicLightManager.renderDynamicLight("entity_" + getEntityId() + "_tnt_flash", entityX, entityY + 0.5,
|
||||
+ entityZ, dynamicLightMag, dynamicLightMag * 0.7792f, dynamicLightMag * 0.618f, false);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,6 +5,24 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 160 @ 160 : 174
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
|
||||
> DELETE 158 @ 158 : 172
|
||||
|
||||
> INSERT 33 : 44 @ 33
|
||||
|
||||
+
|
||||
+ 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.025f;
|
||||
+ DynamicLightManager.renderDynamicLight("entity_" + getEntityId() + "_xp", entityX, entityY + 0.2, entityZ,
|
||||
+ mag * 0.3f, mag, mag * 0.2f, false);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,7 +5,11 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 4 @ 4 : 14
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
|
||||
> DELETE 2 @ 2 : 12
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
@ -28,6 +32,12 @@
|
||||
~ this.posY + this.rand.nextDouble() * (double) this.height,
|
||||
~ this.posZ + (this.rand.nextDouble() - 0.5D) * (double) this.width, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
|
||||
> DELETE 67 @ 67 : 145
|
||||
> CHANGE 67 : 72 @ 67 : 144
|
||||
|
||||
~ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
~ double renderY, double renderZ, float partialTicks, boolean isInFrustum) {
|
||||
~ float mag = 5.0f;
|
||||
~ DynamicLightManager.renderDynamicLight("entity_" + getEntityId() + "_blaze", entityX, entityY + 0.75, entityZ,
|
||||
~ mag, 0.487f * mag, 0.1411f * mag, false);
|
||||
|
||||
> EOF
|
||||
|
@ -5,7 +5,13 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 4 @ 4 : 13
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
+ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
> DELETE 2 @ 2 : 11
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
@ -17,4 +23,20 @@
|
||||
|
||||
> DELETE 5 @ 5 : 16
|
||||
|
||||
> INSERT 15 : 28 @ 15
|
||||
|
||||
+
|
||||
+ 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);
|
||||
+ float ff = getCreeperFlashIntensity(partialTicks);
|
||||
+ if ((int) (ff * 10.0F) % 2 != 0) {
|
||||
+ float dynamicLightMag = 7.0f;
|
||||
+ DynamicLightManager.renderDynamicLight("entity_" + getEntityId() + "_creeper_flash", entityX, entityY + 1.0,
|
||||
+ entityZ, dynamicLightMag, dynamicLightMag * 0.7792f, dynamicLightMag * 0.618f, false);
|
||||
+ DeferredStateManager.setEmissionConstant(1.0f);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,16 +7,21 @@
|
||||
|
||||
> DELETE 2 @ 2 : 7
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
~
|
||||
~ import com.google.common.collect.Sets;
|
||||
~
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 4 @ 4 : 12
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
> DELETE 3 @ 3 : 11
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
|
@ -15,9 +15,87 @@
|
||||
|
||||
> DELETE 1 @ 1 : 5
|
||||
|
||||
> INSERT 103 : 120 @ 103
|
||||
> INSERT 55 : 65 @ 55
|
||||
|
||||
+ public BlockPos offsetFaster(EnumFacing facing, MutableBlockPos ret) {
|
||||
+ /**
|
||||
+ * eagler
|
||||
+ */
|
||||
+ public BlockPos up(BlockPos dst) {
|
||||
+ dst.x = x;
|
||||
+ dst.y = y + 1;
|
||||
+ dst.z = z;
|
||||
+ return dst;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 8 : 18 @ 8
|
||||
|
||||
+ /**
|
||||
+ * eagler
|
||||
+ */
|
||||
+ public BlockPos down(BlockPos dst) {
|
||||
+ dst.x = x;
|
||||
+ dst.y = y - 1;
|
||||
+ dst.z = z;
|
||||
+ return dst;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 8 : 18 @ 8
|
||||
|
||||
+ /**
|
||||
+ * eagler
|
||||
+ */
|
||||
+ public BlockPos north(BlockPos dst) {
|
||||
+ dst.x = x;
|
||||
+ dst.y = y;
|
||||
+ dst.z = z - 1;
|
||||
+ return dst;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 8 : 18 @ 8
|
||||
|
||||
+ /**
|
||||
+ * eagler
|
||||
+ */
|
||||
+ public BlockPos south(BlockPos dst) {
|
||||
+ dst.x = x;
|
||||
+ dst.y = y;
|
||||
+ dst.z = z + 1;
|
||||
+ return dst;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 12 : 22 @ 12
|
||||
|
||||
+ /**
|
||||
+ * eagler
|
||||
+ */
|
||||
+ public BlockPos west(BlockPos dst) {
|
||||
+ dst.x = x - 1;
|
||||
+ dst.y = y;
|
||||
+ dst.z = z;
|
||||
+ return dst;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 8 : 18 @ 8
|
||||
|
||||
+ /**
|
||||
+ * eagler
|
||||
+ */
|
||||
+ public BlockPos east(BlockPos dst) {
|
||||
+ dst.x = x + 1;
|
||||
+ dst.y = y;
|
||||
+ dst.z = z;
|
||||
+ return dst;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 4 : 21 @ 4
|
||||
|
||||
+ public BlockPos offsetFaster(EnumFacing facing, BlockPos ret) {
|
||||
+ ret.x = this.getX() + facing.getFrontOffsetX();
|
||||
+ ret.y = this.getY() + facing.getFrontOffsetY();
|
||||
+ ret.z = this.getZ() + facing.getFrontOffsetZ();
|
||||
@ -27,7 +105,7 @@
|
||||
+ /**
|
||||
+ * only use with a regular "net.minecraft.util.BlockPos"!
|
||||
+ */
|
||||
+ public BlockPos offsetEvenFaster(EnumFacing facing, MutableBlockPos ret) {
|
||||
+ public BlockPos offsetEvenFaster(EnumFacing facing, BlockPos ret) {
|
||||
+ ret.x = this.x + facing.getFrontOffsetX();
|
||||
+ ret.y = this.y + facing.getFrontOffsetY();
|
||||
+ ret.z = this.z + facing.getFrontOffsetZ();
|
||||
@ -35,7 +113,12 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 108 @ 108 : 111
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ : new BlockPos(this.x + facing.getFrontOffsetX() * n, this.y + facing.getFrontOffsetY() * n,
|
||||
~ this.z + facing.getFrontOffsetZ() * n);
|
||||
|
||||
> DELETE 104 @ 104 : 107
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 10
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
|
||||
# Eagler Context Redacted Diff
|
||||
# Copyright (c) 2023 lax1dude. All rights reserved.
|
||||
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
|
||||
~ SOLID("Solid"), CUTOUT_MIPPED("Mipped Cutout"), CUTOUT("Cutout"), TRANSLUCENT("Translucent"),
|
||||
~ REALISTIC_WATER("EaglerShaderWater"), GLASS_HIGHLIGHTS("EaglerShaderGlassHighlights");
|
||||
|
||||
> EOF
|
@ -7,4 +7,14 @@
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> CHANGE 53 : 60 @ 53 : 54
|
||||
|
||||
~ int fastMathSetting = Minecraft.getMinecraft().gameSettings.fastMath;
|
||||
~ if (fastMathSetting > 0) {
|
||||
~ float f = fastMathSetting == 2 ? 16.0f : 64.0f;
|
||||
~ this.renderPartialTicks = ((int) (this.elapsedPartialTicks * f) / f);
|
||||
~ } else {
|
||||
~ this.renderPartialTicks = this.elapsedPartialTicks;
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,4 +7,8 @@
|
||||
|
||||
> DELETE 8 @ 8 : 12
|
||||
|
||||
> CHANGE 77 : 78 @ 77 : 78
|
||||
|
||||
~ return Chunk.getNoSkyLightValue();
|
||||
|
||||
> EOF
|
||||
|
@ -23,7 +23,15 @@
|
||||
+ import com.google.common.collect.Sets;
|
||||
+
|
||||
|
||||
> DELETE 18 @ 18 : 19
|
||||
> INSERT 8 : 9 @ 8
|
||||
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> INSERT 4 : 5 @ 4
|
||||
|
||||
+ import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> DELETE 12 @ 12 : 27
|
||||
|
||||
@ -79,7 +87,45 @@
|
||||
|
||||
> DELETE 1 @ 1 : 21
|
||||
|
||||
> DELETE 1404 @ 1404 : 1462
|
||||
> CHANGE 117 : 118 @ 117 : 118
|
||||
|
||||
~ return Chunk.getNoSkyLightValue();
|
||||
|
||||
> INSERT 896 : 927 @ 896
|
||||
|
||||
+ int fastMathSetting = Minecraft.getMinecraft().gameSettings.fastMath;
|
||||
+ if (fastMathSetting > 0) {
|
||||
+ double posPrec = fastMathSetting == 2 ? 256.0 : 1024.0;
|
||||
+ float rotPrec = fastMathSetting == 2 ? 64.0f : 128.0f;
|
||||
+ double velPrec = fastMathSetting == 2 ? 2048.0 : 4096.0;
|
||||
+ entityIn.lastTickPosX = (long) (entityIn.lastTickPosX * posPrec) / posPrec;
|
||||
+ entityIn.lastTickPosY = (long) (entityIn.lastTickPosY * posPrec) / posPrec;
|
||||
+ entityIn.lastTickPosZ = (long) (entityIn.lastTickPosZ * posPrec) / posPrec;
|
||||
+ entityIn.prevPosX = (int) (entityIn.prevPosX * posPrec) / posPrec;
|
||||
+ entityIn.prevPosY = (int) (entityIn.prevPosY * posPrec) / posPrec;
|
||||
+ entityIn.prevPosZ = (int) (entityIn.prevPosZ * posPrec) / posPrec;
|
||||
+ entityIn.posX = (int) (entityIn.posX * posPrec) / posPrec;
|
||||
+ entityIn.posY = (int) (entityIn.posY * posPrec) / posPrec;
|
||||
+ entityIn.posZ = (int) (entityIn.posZ * posPrec) / posPrec;
|
||||
+ entityIn.prevRotationPitch = (int) (entityIn.prevRotationPitch * rotPrec) / rotPrec;
|
||||
+ entityIn.prevRotationYaw = (int) (entityIn.prevRotationYaw * rotPrec) / rotPrec;
|
||||
+ entityIn.rotationPitch = (int) (entityIn.rotationPitch * rotPrec) / rotPrec;
|
||||
+ entityIn.rotationYaw = (int) (entityIn.rotationYaw * rotPrec) / rotPrec;
|
||||
+ if (entityIn instanceof EntityLivingBase) {
|
||||
+ EntityLivingBase l = (EntityLivingBase) entityIn;
|
||||
+ l.prevRotationYawHead = (int) (l.prevRotationYawHead * rotPrec) / rotPrec;
|
||||
+ l.rotationYawHead = (int) (l.rotationYawHead * rotPrec) / rotPrec;
|
||||
+ l.prevRenderYawOffset = (int) (l.prevRenderYawOffset * rotPrec) / rotPrec;
|
||||
+ l.renderYawOffset = (int) (l.renderYawOffset * rotPrec) / rotPrec;
|
||||
+ l.prevRotationPitch = (int) (l.prevRotationPitch * rotPrec) / rotPrec;
|
||||
+ l.rotationPitch = (int) (l.rotationPitch * rotPrec) / rotPrec;
|
||||
+ }
|
||||
+ entityIn.motionX = (int) (entityIn.motionX * velPrec) / velPrec;
|
||||
+ entityIn.motionY = (int) (entityIn.motionY * velPrec) / velPrec;
|
||||
+ entityIn.motionZ = (int) (entityIn.motionZ * velPrec) / velPrec;
|
||||
+ }
|
||||
|
||||
> DELETE 390 @ 390 : 448
|
||||
|
||||
> DELETE 40 @ 40 : 64
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
|
||||
> CHANGE 1 : 7 @ 1 : 2
|
||||
> CHANGE 1 : 8 @ 1 : 2
|
||||
|
||||
~
|
||||
~ import com.google.common.base.Predicate;
|
||||
@ -21,6 +21,7 @@
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
|
||||
> DELETE 18 @ 18 : 19
|
||||
|
||||
@ -101,7 +102,32 @@
|
||||
|
||||
> DELETE 33 @ 33 : 37
|
||||
|
||||
> CHANGE 251 : 253 @ 251 : 253
|
||||
> CHANGE 24 : 26 @ 24 : 25
|
||||
|
||||
~ return extendedblockstorage == null
|
||||
~ ? (this.canSeeSky(blockpos) ? enumskyblock.defaultLightValue : getNoSkyLightValue())
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ ? (this.worldObj.provider.getHasNoSky() ? getNoSkyLightValue()
|
||||
|
||||
> CHANGE 35 : 36 @ 35 : 36
|
||||
|
||||
~ : getNoSkyLightValue();
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 2
|
||||
|
||||
~ int i1 = this.worldObj.provider.getHasNoSky() ? getNoSkyLightValue()
|
||||
~ : extendedblockstorage.getExtSkylightValue(j, k & 15, l);
|
||||
|
||||
> INSERT 10 : 14 @ 10
|
||||
|
||||
+ public static int getNoSkyLightValue() {
|
||||
+ return DeferredStateManager.isDeferredRenderer() ? 5 : 0;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 176 : 178 @ 176 : 178
|
||||
|
||||
~ && (predicate == null || predicate.apply((T) entity))) {
|
||||
~ list.add((T) entity);
|
||||
|
Reference in New Issue
Block a user