Update #37 - Touch support without userscript, many other feats

This commit is contained in:
lax1dude
2024-09-21 20:17:42 -07:00
parent 173727c8c4
commit ec1ab8ece3
683 changed files with 62074 additions and 8996 deletions

View File

@ -1,4 +1,4 @@
# 144 files to delete:
# 145 files to delete:
net/minecraft/client/renderer/VertexBufferUploader.java
net/minecraft/realms/DisconnectedRealmsScreen.java
net/minecraft/client/stream/Metadata.java
@ -45,6 +45,7 @@ net/minecraft/network/NettyEncryptingDecoder.java
net/minecraft/server/integrated/IntegratedPlayerList.java
net/minecraft/client/renderer/WorldVertexBufferUploader.java
net/minecraft/network/PingResponseHandler.java
net/minecraft/profiler/Profiler.java
net/minecraft/client/stream/NullStream.java
net/minecraft/network/NetworkSystem.java
net/minecraft/client/shader/Shader.java

View File

@ -18,15 +18,14 @@
~ import net.minecraft.client.resources.I18n;
> DELETE 10 @ 10 : 11
> DELETE 9 @ 9 : 11
> DELETE 4 @ 4 : 6
> DELETE 3 @ 3 : 6
> CHANGE 22 : 25 @ 22 : 32
> CHANGE 22 : 24 @ 22 : 32
~ ScaledResolution scaledresolution = new ScaledResolution(this.mc);
~ GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth_double(),
~ scaledresolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
~ GlStateManager.ortho(0.0D, mc.scaledResolution.getScaledWidth_double(),
~ mc.scaledResolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
> INSERT 19 : 37 @ 19
@ -49,7 +48,11 @@
+ }
+
> CHANGE 13 : 14 @ 13 : 20
> CHANGE 9 : 10 @ 9 : 10
~ ScaledResolution scaledresolution = mc.scaledResolution;
> CHANGE 3 : 4 @ 3 : 10
~ GlStateManager.clear(256);
@ -58,6 +61,13 @@
~ GlStateManager.clear(16640);
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
> DELETE 44 @ 44 : 49
> CHANGE 41 : 45 @ 41 : 47
~ if (this.message != null) {
~ this.mc.fontRendererObj.drawStringWithShadow(this.message,
~ (float) ((k - this.mc.fontRendererObj.getStringWidth(this.message)) / 2),
~ (float) (l / 2 - 4 + 8), 16777215);
> DELETE 1 @ 1 : 2
> EOF

File diff suppressed because it is too large Load Diff

View File

@ -12,11 +12,7 @@
+ import com.google.common.collect.Maps;
+
> CHANGE 2 : 3 @ 2 : 3
~ MOBS("hostile", 5), ANIMALS("neutral", 6), PLAYERS("player", 7), AMBIENT("ambient", 8), VOICE("voice", 9);
> INSERT 1 : 3 @ 1
> INSERT 4 : 6 @ 4
+ public static final SoundCategory[] _VALUES = values();
+

View File

@ -13,12 +13,10 @@
> DELETE 2 @ 2 : 3
> CHANGE 1 : 13 @ 1 : 11
> CHANGE 1 : 11 @ 1 : 11
~ import java.util.Set;
~
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformAudio;
~
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftSoundManager;
@ -77,14 +75,7 @@
~ } catch (IOException e) {
~ throw new RuntimeException("Exception caught reading JSON", e);
> INSERT 122 : 126 @ 122
+ if (category == SoundCategory.VOICE) {
+ PlatformAudio.setMicVol(volume);
+ }
+
> CHANGE 13 : 19 @ 13 : 15
> CHANGE 135 : 141 @ 135 : 137
~ SoundCategory cat = soundeventaccessorcomposite.getSoundCategory();
~ for (int i = 0; i < categories.length; ++i) {

View File

@ -5,24 +5,39 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 4
> CHANGE 2 : 7 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
~ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
> DELETE 2 @ 2 : 6
> DELETE 6 @ 6 : 7
> INSERT 4 : 5 @ 4
> INSERT 6 : 14 @ 6
+ import net.minecraft.event.ClickEvent;
+ public long eaglerHighPolyAnimationTick = System.currentTimeMillis();
> INSERT 1 : 4 @ 1
+ import net.minecraft.scoreboard.ScorePlayerTeam;
+ import net.minecraft.util.ChatComponentText;
+ import net.minecraft.util.IChatComponent;
> DELETE 1 @ 1 : 2
> INSERT 6 : 16 @ 6
+ public long eaglerHighPolyAnimationTick = EagRuntime.steadyTimeMillis();
+ public float eaglerHighPolyAnimationFloat1 = 0.0f;
+ public float eaglerHighPolyAnimationFloat2 = 0.0f;
+ public float eaglerHighPolyAnimationFloat3 = 0.0f;
+ public float eaglerHighPolyAnimationFloat4 = 0.0f;
+ public float eaglerHighPolyAnimationFloat5 = 0.0f;
+ public float eaglerHighPolyAnimationFloat6 = 0.0f;
+ public EaglercraftUUID clientBrandUUIDCache = null;
+ private String nameProfanityFilter = null;
+
> DELETE 38 @ 38 : 56
@ -35,4 +50,29 @@
+ }
+
> INSERT 27 : 49 @ 27
+
+ public String getNameProfanityFilter() {
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
+ if (nameProfanityFilter == null) {
+ nameProfanityFilter = ProfanityFilter.getInstance()
+ .profanityFilterString(this.getGameProfile().getName());
+ }
+ return nameProfanityFilter;
+ } else {
+ return this.getGameProfile().getName();
+ }
+ }
+
+ public IChatComponent getDisplayNameProfanityFilter() {
+ ChatComponentText chatcomponenttext = new ChatComponentText(
+ ScorePlayerTeam.formatPlayerName(this.getTeam(), this.getNameProfanityFilter()));
+ chatcomponenttext.getChatStyle()
+ .setChatClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.getName() + " "));
+ chatcomponenttext.getChatStyle().setChatHoverEvent(this.getHoverEvent());
+ chatcomponenttext.getChatStyle().setInsertion(this.getName());
+ return chatcomponenttext;
+ }
> EOF

View File

@ -5,8 +5,9 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 4 @ 2
> INSERT 2 : 5 @ 2
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
+ import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
@ -22,7 +23,11 @@
~ public EntityPlayerSP(Minecraft mcIn, World worldIn, NetHandlerPlayClient netHandler, StatFileWriter statWriter) {
> DELETE 2 @ 2 : 3
> INSERT 1 : 2 @ 1
+ this.clientBrandUUIDCache = EaglercraftVersion.clientBrandUUID;
> DELETE 1 @ 1 : 2
> INSERT 2 : 3 @ 2

View File

@ -0,0 +1,28 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 4 @ 2
+ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
+ import net.minecraft.client.Minecraft;
> INSERT 5 : 6 @ 5
+ private IChatComponent lineStringProfanityFilter;
> CHANGE 9 : 17 @ 9 : 10
~ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
~ if (lineStringProfanityFilter == null) {
~ lineStringProfanityFilter = ProfanityFilter.getInstance().profanityFilterChatComponent(lineString);
~ }
~ return lineStringProfanityFilter;
~ } else {
~ return lineString;
~ }
> EOF

View File

@ -7,12 +7,13 @@
> DELETE 2 @ 2 : 6
> CHANGE 4 : 11 @ 4 : 6
> CHANGE 4 : 12 @ 4 : 6
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.IOUtils;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.FontMappingHelper;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
@ -50,7 +51,24 @@
~ protected boolean underlineStyle;
~ protected boolean strikethroughStyle;
> CHANGE 43 : 44 @ 43 : 44
> INSERT 1 : 15 @ 1
+ protected static char[] codepointLookup = new char[] { 192, 193, 194, 200, 202, 203, 205, 211, 212, 213, 218, 223,
+ 227, 245, 287, 304, 305, 338, 339, 350, 351, 372, 373, 382, 519, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 0, 199, 252, 233, 226, 228, 224, 229, 231,
+ 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163,
+ 216, 215, 402, 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, 9617, 9618,
+ 9619, 9474, 9508, 9569, 9570, 9558, 9557, 9571, 9553, 9559, 9565, 9564, 9563, 9488, 9492, 9524, 9516, 9500,
+ 9472, 9532, 9566, 9567, 9562, 9556, 9577, 9574, 9568, 9552, 9580, 9575, 9576, 9572, 9573, 9561, 9560, 9554,
+ 9555, 9579, 9578, 9496, 9484, 9608, 9604, 9612, 9616, 9600, 945, 946, 915, 960, 931, 963, 956, 964, 934,
+ 920, 937, 948, 8734, 8709, 8712, 8745, 8801, 177, 8805, 8804, 8992, 8993, 247, 8776, 176, 8729, 183, 8730,
+ 8319, 178, 9632, 0 };
+
> CHANGE 42 : 43 @ 42 : 43
~ ImageData bufferedimage;
@ -60,7 +78,11 @@
~ int j = bufferedimage.height;
~ int[] aint = bufferedimage.pixels;
> CHANGE 68 : 87 @ 68 : 78
> CHANGE 54 : 55 @ 54 : 56
~ int i = FontMappingHelper.lookupChar(parChar1, false);
> CHANGE 12 : 31 @ 12 : 22
~ Tessellator tessellator = Tessellator.getInstance();
~ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
@ -130,7 +152,20 @@
~ int i1 = "0123456789abcdefklmnor".indexOf(Character.toLowerCase(parString1.charAt(i + 1)));
> CHANGE 133 : 134 @ 133 : 134
> CHANGE 39 : 40 @ 39 : 41
~ int j = FontMappingHelper.lookupChar(c0, false);
> INSERT 2 : 3 @ 2
+ char[] chars = FontRenderer.codepointLookup;
> CHANGE 3 : 5 @ 3 : 8
~ j = this.fontRandom.nextInt(chars.length);
~ c1 = chars[j];
> CHANGE 82 : 83 @ 82 : 83
~ private int renderStringAligned(String text, int x, int y, int wrapWidth, int color, boolean parFlag) {
@ -153,7 +188,11 @@
+ return (int) this.posX;
> INSERT 119 : 122 @ 119
> CHANGE 42 : 43 @ 42 : 44
~ int i = FontMappingHelper.lookupChar(character, false);
> INSERT 75 : 78 @ 75
+ if ((textColor & -67108864) == 0) {
+ textColor |= -16777216;

View File

@ -46,4 +46,12 @@
~ GlStateManager.popMatrix();
~ }
> INSERT 32 : 37 @ 32
+
+ public boolean isSliderTouchEvents() {
+ return false;
+ }
+
> EOF

View File

@ -7,7 +7,7 @@
> DELETE 2 @ 2 : 3
> CHANGE 2 : 13 @ 2 : 4
> CHANGE 2 : 18 @ 2 : 4
~
~ import org.apache.commons.lang3.StringUtils;
@ -16,25 +16,50 @@
~
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVisualViewport;
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiButtonNotifBell;
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiScreenNotifications;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.minecraft.client.resources.I18n;
> DELETE 6 @ 6 : 11
> INSERT 12 : 14 @ 12
> CHANGE 1 : 2 @ 1 : 2
~ public class GuiChat extends GuiScreenVisualViewport {
> INSERT 10 : 13 @ 10
+ private GuiButton exitButton;
+ private GuiButtonNotifBell notifBellButton;
+
> INSERT 9 : 12 @ 9
> INSERT 9 : 17 @ 9
+ if (!(this instanceof GuiSleepMP)) {
+ this.buttonList.add(exitButton = new GuiButton(69, this.width - 100, 3, 97, 20, I18n.format("chat.exit")));
+ if (!this.mc.isIntegratedServerRunning() && this.mc.thePlayer != null
+ && this.mc.thePlayer.sendQueue.getEaglerMessageProtocol().ver >= 4) {
+ this.buttonList.add(notifBellButton = new GuiButtonNotifBell(70, this.width - 122, 3));
+ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
+ }
+ }
> CHANGE 18 : 20 @ 18 : 27
> CHANGE 14 : 15 @ 14 : 15
~ public void updateScreen0() {
> INSERT 1 : 4 @ 1
+ if (notifBellButton != null && mc.thePlayer != null) {
+ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
+ }
> CHANGE 2 : 4 @ 2 : 11
~ protected void keyTyped(char parChar1, int parInt1) {
~ if (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked())) {
@ -77,13 +102,30 @@
> CHANGE 25 : 26 @ 25 : 26
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
~ protected void mouseClicked0(int parInt1, int parInt2, int parInt3) {
> INSERT 11 : 17 @ 11
> CHANGE 1 : 3 @ 1 : 2
~ IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI()
~ .getChatComponent(PointerInputAbstraction.getVCursorX(), PointerInputAbstraction.getVCursorY());
> INSERT 3 : 6 @ 3
+ if (mc.notifRenderer.handleClicked(this, parInt1, parInt2)) {
+ return;
+ }
> CHANGE 3 : 4 @ 3 : 4
~ super.mouseClicked0(parInt1, parInt2, parInt3);
> INSERT 2 : 10 @ 2
+ protected void actionPerformed(GuiButton par1GuiButton) {
+ if (par1GuiButton.id == 69) {
+ this.mc.displayGuiScreen(null);
+ } else if (par1GuiButton.id == 70) {
+ this.mc.displayGuiScreen(new GuiScreenNotifications(this));
+ }
+ }
+
@ -101,27 +143,43 @@
~ stringbuilder.append(this.foundPlayerNames.get(i));
> INSERT 44 : 45 @ 44
> CHANGE 41 : 42 @ 41 : 42
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
~ public void drawScreen0(int i, int j, float f) {
> INSERT 5 : 9 @ 5
> CHANGE 2 : 5 @ 2 : 3
+ if (exitButton != null) {
+ exitButton.yPosition = 3 + mc.guiAchievement.getHeight();
+ }
+
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
~ IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI()
~ .getChatComponent(PointerInputAbstraction.getVCursorX(), PointerInputAbstraction.getVCursorY());
> CHANGE 8 : 10 @ 8 : 9
> CHANGE 4 : 9 @ 4 : 5
~ if (exitButton != null) {
~ exitButton.yPosition = 3 + mc.guiAchievement.getHeight();
~ }
~
~ super.drawScreen0(i, j, f);
> CHANGE 7 : 9 @ 7 : 8
~ for (int i = 0; i < parArrayOfString.length; ++i) {
~ String s = parArrayOfString[i];
> INSERT 24 : 28 @ 24
> INSERT 24 : 37 @ 24
+
+ public boolean blockPTTKey() {
+ return true;
+ }
+
+ public boolean showCopyPasteButtons() {
+ return true;
+ }
+
+ public void fireInputEvent(EnumInputEvent event, String str) {
+ inputField.fireInputEvent(event, str);
+ }
+
> EOF

View File

@ -5,12 +5,13 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 6 @ 2 : 7
> CHANGE 2 : 7 @ 2 : 7
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
> DELETE 5 @ 5 : 8
@ -26,11 +27,23 @@
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 46 : 50 @ 46
> INSERT 46 : 62 @ 46
+
+ public boolean blockPTTKey() {
+ return commandTextField.isFocused();
+ return commandTextField.isFocused() || previousOutputTextField.isFocused();
+ }
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return commandTextField.isFocused() || previousOutputTextField.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ commandTextField.fireInputEvent(event, param);
+ previousOutputTextField.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -11,8 +11,18 @@
> DELETE 1 @ 1 : 6
> CHANGE 49 : 50 @ 49 : 50
> CHANGE 6 : 8 @ 6 : 7
~ GameSettings.Options.INVERT_MOUSE, GameSettings.Options.SENSITIVITY,
~ GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY };
> CHANGE 42 : 48 @ 42 : 43
~ public void handleTouchInput() throws IOException {
~ super.handleTouchInput();
~ this.keyBindingList.handleTouchInput();
~ }
~
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 3 : 6 @ 3 : 5

View File

@ -15,8 +15,13 @@
> DELETE 2 @ 2 : 3
> CHANGE 61 : 62 @ 61 : 62
> CHANGE 61 : 67 @ 61 : 62
~ public void handleTouchInput() throws IOException {
~ super.handleTouchInput();
~ this.createFlatWorldListSlotGui.handleTouchInput();
~ }
~
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF

View File

@ -7,10 +7,11 @@
> DELETE 2 @ 2 : 3
> CHANGE 1 : 3 @ 1 : 6
> CHANGE 1 : 4 @ 1 : 6
~
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
> DELETE 7 @ 7 : 8
@ -42,4 +43,19 @@
~ StringUtils.isNotEmpty(field_146335_h.text) ? "createWorld.seedNote" : "selectWorld.seedInfo",
~ new Object[0]), this.width / 2 - 100, 85, -6250336);
> INSERT 47 : 59 @ 47
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return field_146333_g.isFocused() || field_146335_h.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ field_146333_g.fireInputEvent(event, param);
+ field_146335_h.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -5,16 +5,25 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 6 : 10 @ 6 : 16
> CHANGE 6 : 11 @ 6 : 16
~
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 2
> CHANGE 347 : 348 @ 347 : 348
> INSERT 89 : 94 @ 89
+ public void handleTouchInput() throws IOException {
+ super.handleTouchInput();
+ this.field_175349_r.handleTouchInput();
+ }
+
> CHANGE 258 : 259 @ 258 : 259
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.mainNoiseScaleX) }),
@ -106,4 +115,18 @@
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 59 : 70 @ 59
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return field_175349_r.isTextFieldFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ field_175349_r.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -11,11 +11,16 @@
~ protected void keyTyped(char parChar1, int parInt1) {
> INSERT 24 : 28 @ 24
> INSERT 24 : 33 @ 24
+
+ public boolean shouldHangupIntegratedServer() {
+ return false;
+ }
+
+ public boolean canCloseGui() {
+ return false;
+ }
+
> EOF

View File

@ -29,8 +29,9 @@
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 25 : 28 @ 25 : 28
> CHANGE 24 : 28 @ 24 : 28
~ ScaledResolution scaledresolution = mc.scaledResolution;
~ GlStateManager.viewport((scaledresolution.getScaledWidth() - 290 - 12) / 2 * scaledresolution.getScaleFactor(),
~ (scaledresolution.getScaledHeight() - 220 + 10) / 2 * scaledresolution.getScaleFactor(),
~ 290 * scaledresolution.getScaleFactor(), 220 * scaledresolution.getScaleFactor());

View File

@ -5,10 +5,11 @@
# Version: 1.0
# Author: lax1dude
> INSERT 7 : 11 @ 7
> INSERT 7 : 12 @ 7
+
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
@ -18,7 +19,15 @@
> DELETE 9 @ 9 : 10
> CHANGE 41 : 42 @ 41 : 42
> INSERT 37 : 42 @ 37
+ public void handleTouchInput() throws IOException {
+ super.handleTouchInput();
+ this.field_146435_s.handleTouchInput();
+ }
+
> CHANGE 4 : 5 @ 4 : 5
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
@ -35,4 +44,18 @@
~ for (int i = 0, l = parList.size(); i < l; ++i) {
~ flatgeneratorinfo.getWorldFeatures().put(parList.get(i), Maps.newHashMap());
> INSERT 132 : 143 @ 132
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return field_146433_u.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ field_146433_u.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -5,22 +5,31 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 7 @ 2
> INSERT 2 : 12 @ 2
+ import java.util.ArrayList;
+ import java.util.Collection;
+
+ import net.lax1dude.eaglercraft.v1_8.Display;
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
+ import net.lax1dude.eaglercraft.v1_8.Touch;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
+
> CHANGE 3 : 7 @ 3 : 6
> CHANGE 3 : 9 @ 3 : 6
~
~ 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.touch_gui.TouchControls;
~ import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchOverlayRenderer;
> DELETE 2 @ 2 : 11
> CHANGE 2 : 3 @ 2 : 11
~ import net.minecraft.client.gui.inventory.GuiInventory;
> DELETE 2 @ 2 : 3
@ -28,7 +37,15 @@
~ import net.minecraft.client.renderer.entity.RenderManager;
> CHANGE 32 : 33 @ 32 : 33
> INSERT 13 : 14 @ 13
+ import net.minecraft.network.play.client.C16PacketClientStatus;
> INSERT 11 : 12 @ 11
+ import net.minecraft.util.MovingObjectPosition.MovingObjectType;
> CHANGE 8 : 9 @ 8 : 9
~ private final EaglercraftRandom rand = new EaglercraftRandom();
@ -40,34 +57,110 @@
> DELETE 19 @ 19 : 20
> CHANGE 16 : 19 @ 16 : 21
> CHANGE 11 : 12 @ 11 : 12
~ ScaledResolution scaledresolution = mc.scaledResolution;
> CHANGE 4 : 7 @ 4 : 9
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
~ GlStateManager.enableDepth();
~ GlStateManager.disableLighting();
> DELETE 21 @ 21 : 22
> INSERT 15 : 17 @ 15
+ onBeginHotbarDraw();
+
> DELETE 6 @ 6 : 7
> DELETE 1 @ 1 : 8
> CHANGE 44 : 45 @ 44 : 47
> DELETE 1 @ 1 : 2
~ this.overlayDebug.renderDebugInfo(scaledresolution);
> DELETE 1 @ 1 : 2
> INSERT 83 : 87 @ 83
> DELETE 4 @ 4 : 22
> INSERT 1 : 2 @ 1
+ GlStateManager.disableBlend();
> INSERT 7 : 9 @ 7
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ GlStateManager.disableBlend();
> CHANGE 6 : 8 @ 6 : 14
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
~ GlStateManager.disableBlend();
> DELETE 1 @ 1 : 2
> INSERT 21 : 22 @ 21
+ }
> CHANGE 1 : 20 @ 1 : 2
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
~ drawEaglerInteractButton(scaledresolution);
~
~ onEndHotbarDraw();
~
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
~ if (this.mc.thePlayer.getSleepTimer() > 0) {
~ GlStateManager.disableDepth();
~ GlStateManager.disableAlpha();
~ int j1 = this.mc.thePlayer.getSleepTimer();
~ float f1 = (float) j1 / 100.0F;
~ if (f1 > 1.0F) {
~ f1 = 1.0F - (float) (j1 - 100) / 10.0F;
~ }
~
~ int k = (int) (220.0F * f1) << 24 | 1052704;
~ drawRect(0, 0, i, j, k);
~ GlStateManager.enableAlpha();
~ GlStateManager.enableDepth();
> INSERT 2 : 8 @ 2
+ if (this.mc.isDemo()) {
+ this.renderDemo(scaledresolution);
+ }
+
+ this.overlayDebug.renderDebugInfo(scaledresolution);
+
> DELETE 1 @ 1 : 2
> DELETE 33 @ 33 : 35
> INSERT 18 : 22 @ 18
+ if (this.mc.currentScreen == null) {
+ this.mc.voiceOverlay.drawOverlay();
+ }
+
> INSERT 4 : 7 @ 4
> INSERT 4 : 9 @ 4
+ if (this.mc.gameSettings.hudWorld && (mc.currentScreen == null || !(mc.currentScreen instanceof GuiChat))) {
+ j -= 10;
+ }
+ j -= (this.mc.displayHeight - (Display.getVisualViewportX() + Display.getVisualViewportH())) * j
+ / this.mc.displayHeight;
> INSERT 19 : 30 @ 19
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> INSERT 11 : 12 @ 11
+
> INSERT 4 : 15 @ 4
+ public void renderGameOverlayCrosshairs(int scaledResWidth, int scaledResHeight) {
+ if (this.showCrosshair()) {
@ -81,7 +174,55 @@
+ }
+
> DELETE 147 @ 147 : 151
> INSERT 9 : 26 @ 9
+
+ if (PointerInputAbstraction.isTouchMode()) {
+ this.mc.getTextureManager().bindTexture(TouchOverlayRenderer.spriteSheet);
+ this.drawTexturedModalRect(i + 89, sr.getScaledHeight() - 22, 234, 0, 22, 22);
+ int areaHAdd = 12;
+ hotbarAreaX = (i - 91) * mc.displayWidth / sr.getScaledWidth();
+ hotbarAreaY = (sr.getScaledHeight() - 22 - areaHAdd) * mc.displayHeight / sr.getScaledHeight();
+ hotbarAreaW = 203 * mc.displayWidth / sr.getScaledWidth();
+ hotbarAreaH = (22 + areaHAdd) * mc.displayHeight / sr.getScaledHeight();
+ } else {
+ hotbarAreaX = -1;
+ hotbarAreaY = -1;
+ hotbarAreaW = -1;
+ hotbarAreaH = -1;
+ }
+
+ this.mc.getTextureManager().bindTexture(widgetsTexPath);
> INSERT 16 : 17 @ 16
+
> DELETE 5 @ 5 : 6
> DELETE 9 @ 9 : 11
> DELETE 3 @ 3 : 4
> DELETE 12 @ 12 : 13
> DELETE 1 @ 1 : 2
> DELETE 10 @ 10 : 11
> DELETE 5 @ 5 : 6
> CHANGE 1 : 2 @ 1 : 2
~ String s = this.highlightingItemStack.getDisplayNameProfanityFilter();
> DELETE 25 @ 25 : 26
> DELETE 3 @ 3 : 4
> DELETE 11 @ 11 : 12
> DELETE 25 @ 25 : 29
> CHANGE 17 : 19 @ 17 : 18
@ -107,7 +248,23 @@
+ GlStateManager.enableBlend();
+ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
> CHANGE 248 : 249 @ 248 : 249
> DELETE 23 @ 23 : 25
> DELETE 17 @ 17 : 19
> DELETE 61 @ 61 : 63
> DELETE 39 @ 39 : 40
> DELETE 36 @ 36 : 37
> DELETE 14 @ 14 : 15
> CHANGE 6 : 7 @ 6 : 9
~ int i = mc.scaledResolution.getScaledWidth();
> CHANGE 40 : 41 @ 40 : 41
~ public void renderVignette(float parFloat1, int scaledWidth, int scaledHeight) {
@ -179,4 +336,223 @@
+ }
+
> INSERT 27 : 243 @ 27
+
+ private int hotbarAreaX = -1;
+ private int hotbarAreaY = -1;
+ private int hotbarAreaW = -1;
+ private int hotbarAreaH = -1;
+ private int currentHotbarSlotTouch = -1;
+ private long hotbarSlotTouchStart = -1l;
+ private boolean hotbarSlotTouchAlreadySelected = false;
+ private int interactButtonX = -1;
+ private int interactButtonY = -1;
+ private int interactButtonW = -1;
+ private int interactButtonH = -1;
+ private int touchVPosX = -1;
+ private int touchVPosY = -1;
+ private int touchEventUID = -1;
+
+ private void drawEaglerInteractButton(ScaledResolution parScaledResolution) {
+ if (PointerInputAbstraction.isTouchMode() && mc.objectMouseOver != null
+ && mc.objectMouseOver.typeOfHit == MovingObjectType.ENTITY) {
+ int scale = parScaledResolution.getScaleFactor();
+ interactButtonW = 118 * scale;
+ interactButtonH = 20 * scale;
+ int xx = (parScaledResolution.getScaledWidth() - 118) / 2;
+ int yy = parScaledResolution.getScaledHeight() - 70;
+ interactButtonX = xx * scale;
+ interactButtonY = yy * scale;
+ mc.getTextureManager().bindTexture(TouchOverlayRenderer.spriteSheet);
+ boolean hover = touchVPosX >= interactButtonX && touchVPosY >= interactButtonY
+ && touchVPosX < interactButtonX + interactButtonW && touchVPosY < interactButtonY + interactButtonH;
+ float f = MathHelper.clamp_float(mc.gameSettings.touchControlOpacity, 0.0f, 1.0f);
+ if (f > 0.0f) {
+ GlStateManager.color(1.0f, 1.0f, 1.0f, f);
+ drawTexturedModalRect(xx, yy, 0, hover ? 216 : 236, 118, 20);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+ drawCenteredString(mc.fontRendererObj, I18n.format("touch.interact.entity"),
+ parScaledResolution.getScaledWidth() / 2, yy + 6,
+ (hover ? 16777120 : 14737632) | ((int) (f * 255.0f) << 24));
+ }
+ } else {
+ interactButtonX = -1;
+ interactButtonY = -1;
+ interactButtonW = -1;
+ interactButtonH = -1;
+ }
+ }
+
+ private int applyTouchHotbarTransformX(int posX, boolean scaled) {
+ if (scaled) {
+ return (posX + mc.scaledResolution.getScaledWidth() / 4) * 2 / 3;
+ } else {
+ return (posX + mc.displayWidth / 4) * 2 / 3;
+ }
+ }
+
+ private int applyTouchHotbarTransformY(int posY, boolean scaled) {
+ if (scaled) {
+ return (posY + mc.scaledResolution.getScaledHeight() / 2) * 2 / 3;
+ } else {
+ return (posY + mc.displayHeight / 2) * 2 / 3;
+ }
+ }
+
+ private void onBeginHotbarDraw() {
+ if (PointerInputAbstraction.isTouchMode()) {
+ GlStateManager.pushMatrix();
+ ScaledResolution res = mc.scaledResolution;
+ GlStateManager.translate(res.getScaledWidth() / -4, res.getScaledHeight() / -2, field_175199_z);
+ GlStateManager.scale(1.5f, 1.5f, 1.5f);
+ }
+ }
+
+ private void onEndHotbarDraw() {
+ if (PointerInputAbstraction.isTouchMode()) {
+ GlStateManager.popMatrix();
+ }
+ }
+
+ private int getHotbarSlotTouched(int pointX) {
+ int xx = pointX - hotbarAreaX - 2;
+ xx /= 20 * mc.scaledResolution.getScaleFactor();
+ if (xx < 0)
+ xx = 0;
+ if (xx > 9)
+ xx = 9;
+ return xx;
+ }
+
+ public boolean handleTouchBeginEagler(int uid, int pointX, int pointY) {
+ if (mc.thePlayer == null) {
+ return false;
+ }
+ if (touchEventUID == -1) {
+ pointX = applyTouchHotbarTransformX(pointX, false);
+ pointY = applyTouchHotbarTransformY(pointY, false);
+ if (pointX >= hotbarAreaX && pointY >= hotbarAreaY && pointX < hotbarAreaX + hotbarAreaW
+ && pointY < hotbarAreaY + hotbarAreaH) {
+ touchEventUID = uid;
+ currentHotbarSlotTouch = getHotbarSlotTouched(pointX);
+ hotbarSlotTouchStart = EagRuntime.steadyTimeMillis();
+ if (currentHotbarSlotTouch >= 0 && currentHotbarSlotTouch < 9) {
+ if (mc.thePlayer.isSpectator()) {
+ hotbarSlotTouchAlreadySelected = false;
+ mc.ingameGUI.getSpectatorGui().func_175260_a(currentHotbarSlotTouch);
+ } else {
+ hotbarSlotTouchAlreadySelected = (mc.thePlayer.inventory.currentItem == currentHotbarSlotTouch);
+ mc.thePlayer.inventory.currentItem = currentHotbarSlotTouch;
+ }
+ } else if (currentHotbarSlotTouch == 9) {
+ hotbarSlotTouchAlreadySelected = false;
+ currentHotbarSlotTouch = 69;
+ if (mc.playerController.isRidingHorse()) {
+ mc.thePlayer.sendHorseInventory();
+ } else {
+ mc.getNetHandler().addToSendQueue(
+ new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
+ mc.displayGuiScreen(new GuiInventory(mc.thePlayer));
+ }
+ }
+ return true;
+ }
+ if (pointX >= interactButtonX && pointY >= interactButtonY && pointX < interactButtonX + interactButtonW
+ && pointY < interactButtonY + interactButtonH) {
+ touchEventUID = uid;
+ mc.rightClickMouse();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean handleTouchEndEagler(int uid, int pointX, int pointY) {
+ if (uid == touchEventUID) {
+ if (hotbarSlotTouchStart != -1l && currentHotbarSlotTouch != 69) {
+ if (EagRuntime.steadyTimeMillis() - hotbarSlotTouchStart < 350l) {
+ if (hotbarSlotTouchAlreadySelected) {
+ if (mc.thePlayer != null) {
+ mc.thePlayer.dropOneItem(false);
+ }
+ }
+ }
+ }
+ touchVPosX = -1;
+ touchVPosY = -1;
+ touchEventUID = -1;
+ currentHotbarSlotTouch = -1;
+ hotbarSlotTouchStart = -1l;
+ hotbarSlotTouchAlreadySelected = false;
+ return true;
+ }
+ return false;
+ }
+
+ public void updateTouchEagler(boolean screenTouched) {
+ if (screenTouched) {
+ int pointCount = Touch.touchPointCount();
+ for (int i = 0; i < pointCount; ++i) {
+ int uid = Touch.touchPointUID(i);
+ if (TouchControls.touchControls.containsKey(uid)) {
+ continue;
+ }
+ if (touchEventUID == -1 || touchEventUID == uid) {
+ touchVPosX = applyTouchHotbarTransformX(Touch.touchPointX(i), false);
+ touchVPosY = applyTouchHotbarTransformY(mc.displayHeight - Touch.touchPointY(i) - 1, false);
+ long millis = EagRuntime.steadyTimeMillis();
+ if (touchEventUID != -1 && hotbarSlotTouchStart != -1l) {
+ if (currentHotbarSlotTouch != 69) {
+ int slot = getHotbarSlotTouched(touchVPosX);
+ if (slot != currentHotbarSlotTouch) {
+ hotbarSlotTouchAlreadySelected = false;
+ currentHotbarSlotTouch = slot;
+ hotbarSlotTouchStart = millis;
+ if (slot >= 0 && slot < 9) {
+ if (mc.thePlayer.isSpectator()) {
+ mc.ingameGUI.getSpectatorGui().func_175260_a(slot);
+ } else {
+ mc.thePlayer.inventory.currentItem = slot;
+ }
+ }
+ } else {
+ if (millis - hotbarSlotTouchStart > 1200l) {
+ if (!mc.thePlayer.isSpectator()) {
+ hotbarSlotTouchStart = millis;
+ this.mc.thePlayer.dropOneItem(true);
+ }
+ }
+ }
+ }
+ }
+ return;
+ }
+ }
+ }
+ if (touchEventUID != -1) {
+ handleTouchEndEagler(touchEventUID, touchVPosX, touchVPosY);
+ }
+ touchVPosX = -1;
+ touchVPosY = -1;
+ touchEventUID = -1;
+ currentHotbarSlotTouch = -1;
+ hotbarSlotTouchStart = -1l;
+ hotbarSlotTouchAlreadySelected = false;
+ }
+
+ public boolean isTouchOverlapEagler(int uid, int tx, int ty) {
+ if (touchEventUID == uid) {
+ return true;
+ }
+ ty = mc.displayHeight - ty - 1;
+ tx = applyTouchHotbarTransformX(tx, false);
+ ty = applyTouchHotbarTransformY(ty, false);
+ return (tx >= hotbarAreaX && ty >= hotbarAreaY && tx < hotbarAreaX + hotbarAreaW
+ && ty < hotbarAreaY + hotbarAreaH)
+ || (tx >= interactButtonX && ty >= interactButtonY && tx < interactButtonX + interactButtonW
+ && ty < interactButtonY + interactButtonH);
+ }
+
> EOF

View File

@ -5,10 +5,14 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 14 @ 2 : 9
> CHANGE 2 : 21 @ 2 : 9
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiButtonWithStupidIcons;
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiButtonNotifBell;
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiScreenNotifications;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANInfo;
@ -17,6 +21,9 @@
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
~ import net.lax1dude.eaglercraft.v1_8.update.GuiUpdateCheckerOverlay;
~ import net.lax1dude.eaglercraft.v1_8.voice.GuiVoiceMenu;
~ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenPhishingWaring;
~ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenRecieveServerInfo;
~ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenServerInfo;
~ import net.minecraft.client.Minecraft;
~ import net.minecraft.client.audio.PositionedSoundRecord;
@ -28,7 +35,7 @@
> DELETE 2 @ 2 : 4
> INSERT 1 : 15 @ 1
> INSERT 1 : 16 @ 1
+ private GuiButton lanButton;
+
@ -36,6 +43,7 @@
+
+ private GuiUpdateCheckerOverlay updateCheckerOverlay;
+ private GuiVoiceMenu voiceMenu;
+ private GuiButtonNotifBell notifBellButton;
+
+ public GuiIngameMenu() {
+ updateCheckerOverlay = new GuiUpdateCheckerOverlay(true, this);
@ -51,14 +59,56 @@
+ this.updateCheckerOverlay.setResolution(mc, width, height);
> CHANGE 12 : 14 @ 12 : 15
> CHANGE 2 : 6 @ 2 : 4
~ this.buttonList.add(lanButton = new GuiButton(7, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20,
~ I18n.format(LANServerController.isLANOpen() ? "menu.closeLan" : "menu.openToLan", new Object[0])));
~ this.buttonList.add(new GuiButtonWithStupidIcons(1, this.width / 2 - 100, this.height / 4 + 120 + b0,
~ I18n.format("menu.returnToMenu", new Object[0]), PauseMenuCustomizeState.icon_disconnect_L,
~ PauseMenuCustomizeState.icon_disconnect_L_aspect, PauseMenuCustomizeState.icon_disconnect_R,
~ PauseMenuCustomizeState.icon_disconnect_R_aspect));
> CHANGE 4 : 9 @ 4 : 5
> INSERT 2 : 6 @ 2
+ if (this.mc.thePlayer != null && this.mc.thePlayer.sendQueue.getEaglerMessageProtocol().ver >= 4) {
+ this.buttonList.add(notifBellButton = new GuiButtonNotifBell(11, width - 22, height - 22));
+ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
+ }
> CHANGE 2 : 40 @ 2 : 14
~ this.buttonList.add(new GuiButtonWithStupidIcons(4, this.width / 2 - 100, this.height / 4 + 24 + b0,
~ I18n.format("menu.returnToGame", new Object[0]), PauseMenuCustomizeState.icon_backToGame_L,
~ PauseMenuCustomizeState.icon_backToGame_L_aspect, PauseMenuCustomizeState.icon_backToGame_R,
~ PauseMenuCustomizeState.icon_backToGame_R_aspect));
~ this.buttonList.add(new GuiButtonWithStupidIcons(0, this.width / 2 - 100, this.height / 4 + 96 + b0, 98, 20,
~ I18n.format("menu.options", new Object[0]), PauseMenuCustomizeState.icon_options_L,
~ PauseMenuCustomizeState.icon_options_L_aspect, PauseMenuCustomizeState.icon_options_R,
~ PauseMenuCustomizeState.icon_options_R_aspect));
~ this.buttonList
~ .add(lanButton = new GuiButtonWithStupidIcons(7, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20,
~ I18n.format(LANServerController.isLANOpen() ? "menu.closeLan" : "menu.openToLan",
~ new Object[0]),
~ PauseMenuCustomizeState.icon_discord_L, PauseMenuCustomizeState.icon_discord_L_aspect,
~ PauseMenuCustomizeState.icon_discord_R, PauseMenuCustomizeState.icon_discord_R_aspect));
~ this.buttonList.add(new GuiButtonWithStupidIcons(5, this.width / 2 - 100, this.height / 4 + 48 + b0, 98, 20,
~ I18n.format("gui.achievements", new Object[0]), PauseMenuCustomizeState.icon_achievements_L,
~ PauseMenuCustomizeState.icon_achievements_L_aspect, PauseMenuCustomizeState.icon_achievements_R,
~ PauseMenuCustomizeState.icon_achievements_R_aspect));
~ this.buttonList.add(new GuiButtonWithStupidIcons(6, this.width / 2 + 2, this.height / 4 + 48 + b0, 98, 20,
~ I18n.format("gui.stats", new Object[0]), PauseMenuCustomizeState.icon_statistics_L,
~ PauseMenuCustomizeState.icon_statistics_L_aspect, PauseMenuCustomizeState.icon_statistics_R,
~ PauseMenuCustomizeState.icon_statistics_R_aspect));
~ lanButton.enabled = SingleplayerServerController.isWorldRunning();
~ if (PauseMenuCustomizeState.discordButtonMode != PauseMenuCustomizeState.DISCORD_MODE_NONE) {
~ lanButton.enabled = true;
~ lanButton.id = 8;
~ lanButton.displayString = "" + PauseMenuCustomizeState.discordButtonText;
~ }
~ if (PauseMenuCustomizeState.serverInfoMode != PauseMenuCustomizeState.DISCORD_MODE_NONE) {
~ this.buttonList.add(new GuiButtonWithStupidIcons(9, this.width / 2 - 100, this.height / 4 + 72 + b0,
~ PauseMenuCustomizeState.serverInfoButtonText, PauseMenuCustomizeState.icon_serverInfo_L,
~ PauseMenuCustomizeState.icon_serverInfo_L_aspect, PauseMenuCustomizeState.icon_serverInfo_R,
~ PauseMenuCustomizeState.icon_serverInfo_R_aspect));
~ }
~ if (!hasSentAutoSave) {
~ hasSentAutoSave = true;
~ SingleplayerServerController.autoSave();
@ -80,7 +130,7 @@
~ this.mc.shutdownIntegratedServer(new GuiMultiplayer(new GuiMainMenu()));
> CHANGE 16 : 30 @ 16 : 17
> CHANGE 16 : 69 @ 16 : 17
~ if (!LANServerController.supported()) {
~ mc.displayGuiScreen(new GuiScreenLANNotSupported(this));
@ -96,8 +146,47 @@
~ new GuiShareToLan(this, this.mc.playerController.getCurrentGameType().getName())));
~ }
~ break;
~ case 8:
~ if (PauseMenuCustomizeState.discordButtonMode == PauseMenuCustomizeState.DISCORD_MODE_INVITE_URL
~ && PauseMenuCustomizeState.discordInviteURL != null) {
~ EagRuntime.openLink(PauseMenuCustomizeState.discordInviteURL);
~ }
~ break;
~ case 9:
~ switch (PauseMenuCustomizeState.serverInfoMode) {
~ case PauseMenuCustomizeState.SERVER_INFO_MODE_EXTERNAL_URL:
~ if (PauseMenuCustomizeState.serverInfoURL != null) {
~ EagRuntime.openLink(PauseMenuCustomizeState.serverInfoURL);
~ }
~ break;
~ case PauseMenuCustomizeState.SERVER_INFO_MODE_SHOW_EMBED_OVER_HTTP:
~ if (PauseMenuCustomizeState.serverInfoURL != null) {
~ GuiScreen screen = GuiScreenServerInfo.createForCurrentState(this,
~ PauseMenuCustomizeState.serverInfoURL);
~ if (!this.mc.gameSettings.hasHiddenPhishWarning && !GuiScreenPhishingWaring.hasShownMessage) {
~ screen = new GuiScreenPhishingWaring(screen);
~ }
~ this.mc.displayGuiScreen(screen);
~ }
~ break;
~ case PauseMenuCustomizeState.SERVER_INFO_MODE_SHOW_EMBED_OVER_WS:
~ if (PauseMenuCustomizeState.serverInfoHash != null) {
~ GuiScreen screen = new GuiScreenRecieveServerInfo(this, PauseMenuCustomizeState.serverInfoHash);
~ if (!this.mc.gameSettings.hasHiddenPhishWarning && !GuiScreenPhishingWaring.hasShownMessage) {
~ screen = new GuiScreenPhishingWaring(screen);
~ }
~ this.mc.displayGuiScreen(screen);
~ }
~ break;
~ default:
~ break;
~ }
~ break;
~ case 11:
~ this.mc.displayGuiScreen(new GuiScreenNotifications(this));
~ break;
> CHANGE 6 : 13 @ 6 : 7
> CHANGE 6 : 16 @ 6 : 7
~ if (EagRuntime.getConfiguration().isAllowVoiceClient()
~ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
@ -106,13 +195,34 @@
~ if (Mouse.isActuallyGrabbed()) {
~ Mouse.setGrabbed(false);
~ }
~ if (notifBellButton != null && mc.thePlayer != null) {
~ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
~ }
> CHANGE 4 : 5 @ 4 : 5
~ this.drawCenteredString(this.fontRendererObj, I18n.format("menu.game", new Object[0]), this.width / 2, 20,
> CHANGE 1 : 55 @ 1 : 2
> CHANGE 4 : 80 @ 4 : 7
~ String titleStr = I18n.format("menu.game", new Object[0]);
~ int titleStrWidth = fontRendererObj.getStringWidth(titleStr);
~ this.drawString(this.fontRendererObj, titleStr, (this.width - titleStrWidth) / 2, 20, 16777215);
~ if (PauseMenuCustomizeState.icon_title_L != null) {
~ mc.getTextureManager().bindTexture(PauseMenuCustomizeState.icon_title_L);
~ GlStateManager.pushMatrix();
~ GlStateManager.translate(
~ (this.width - titleStrWidth) / 2 - 6 - 16 * PauseMenuCustomizeState.icon_title_L_aspect, 16, 0.0f);
~ float f2 = 16.0f / 256.0f;
~ GlStateManager.scale(f2 * PauseMenuCustomizeState.icon_title_L_aspect, f2, f2);
~ this.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
~ GlStateManager.popMatrix();
~ }
~ if (PauseMenuCustomizeState.icon_title_R != null) {
~ mc.getTextureManager().bindTexture(PauseMenuCustomizeState.icon_title_L);
~ GlStateManager.pushMatrix();
~ GlStateManager.translate((this.width - titleStrWidth) / 2 + titleStrWidth + 6, 16, 0.0f);
~ float f2 = 16.0f / 256.0f;
~ GlStateManager.scale(f2 * PauseMenuCustomizeState.icon_title_R_aspect, f2, f2);
~ this.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
~ GlStateManager.popMatrix();
~ }
~
~ this.updateCheckerOverlay.drawScreen(i, j, f);
~
@ -168,7 +278,7 @@
~ } catch (GuiVoiceMenu.AbortedException ex) {
~ }
> INSERT 1 : 80 @ 1
> INSERT 1 : 84 @ 1
+
+ protected void keyTyped(char par1, int par2) {
@ -249,5 +359,9 @@
+ } catch (GuiVoiceMenu.AbortedException ex) {
+ }
+ }
+
+ protected boolean isPartOfPauseMenu() {
+ return true;
+ }
> EOF

View File

@ -5,16 +5,21 @@
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 5 @ 3
> INSERT 3 : 6 @ 3
+
+ import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
> DELETE 1 @ 1 : 4
> DELETE 4 @ 4 : 5
> CHANGE 17 : 19 @ 17 : 18
> CHANGE 8 : 9 @ 8 : 9
~ super(mcIn, controls.width, controls.height, 66, controls.height - 32, 20);
> CHANGE 8 : 10 @ 8 : 9
~ for (int l = 0; l < akeybinding.length; ++l) {
~ KeyBinding keybinding = akeybinding[l];
@ -25,4 +30,27 @@
~ for (int m = 0; m < kb.length; ++m) {
~ KeyBinding keybindingx = kb[m];
> CHANGE 19 : 24 @ 19 : 20
~ if (var4 != 0 && var4 != 12345)
~ return false;
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ if ((!touchMode || (this.btnChangeKeyBinding.isSliderTouchEvents() == (var4 == 12345)))
~ && this.btnChangeKeyBinding.mousePressed(GuiKeyBindingList.this.mc, i, j)) {
> CHANGE 2 : 4 @ 2 : 3
~ } else if ((!touchMode || (this.btnReset.isSliderTouchEvents() == (var4 == 12345)))
~ && this.btnReset.mousePressed(GuiKeyBindingList.this.mc, i, j)) {
> CHANGE 10 : 17 @ 10 : 12
~ if (var4 != 0 && var4 != 12345)
~ return;
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ if (!touchMode || (this.btnChangeKeyBinding.isSliderTouchEvents() == (var4 == 12345)))
~ this.btnChangeKeyBinding.mouseReleased(i, j);
~ if (!touchMode || (this.btnReset.isSliderTouchEvents() == (var4 == 12345)))
~ this.btnReset.mouseReleased(i, j);
> EOF

View File

@ -16,11 +16,20 @@
> DELETE 1 @ 1 : 6
> CHANGE 34 : 35 @ 34 : 35
> CHANGE 34 : 40 @ 34 : 35
~ public void handleTouchInput() throws IOException {
~ super.handleTouchInput();
~ this.list.handleTouchInput();
~ }
~
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 56 : 57 @ 56
> CHANGE 12 : 13 @ 12 : 13
~ ScaledResolution scaledresolution = this.mc.scaledResolution;
> INSERT 43 : 44 @ 43
+ this.mc.loadingScreen.eaglerShowRefreshResources();

View File

@ -182,16 +182,15 @@
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 3 : 9 @ 3 : 7
> CHANGE 3 : 8 @ 3 : 6
~ if (viewportTexture == null) {
~ viewportTexture = new DynamicTexture(256, 256);
~ backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation("background", viewportTexture);
~ }
~ this.updateCheckerOverlay.setResolution(mc, width, height);
~ Calendar calendar = EagRuntime.getLocaleCalendar();
> DELETE 9 @ 9 : 10
> DELETE 10 @ 10 : 11
> INSERT 1 : 8 @ 1

View File

@ -10,12 +10,14 @@
+ import java.io.IOException;
+
> CHANGE 2 : 16 @ 2 : 15
> CHANGE 2 : 18 @ 2 : 15
~
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
@ -80,7 +82,15 @@
+ lanServerList.forceRefresh();
+ }
> CHANGE 32 : 35 @ 32 : 36
> INSERT 12 : 17 @ 12
+ public void handleTouchInput() throws IOException {
+ super.handleTouchInput();
+ this.serverListSelector.handleTouchInput();
+ }
+
> CHANGE 20 : 23 @ 20 : 24
~ this.savedServerList.updateServerPing();
~ if (lanServerList.update()) {
@ -111,7 +121,7 @@
> CHANGE 3 : 8 @ 3 : 4
~ long millis = System.currentTimeMillis();
~ long millis = EagRuntime.steadyTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
@ -123,23 +133,35 @@
> CHANGE 14 : 19 @ 14 : 16
~ long millis = System.currentTimeMillis();
~ long millis = EagRuntime.steadyTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
~ }
> CHANGE 15 : 20 @ 15 : 17
> INSERT 10 : 13 @ 10
~ long millis = System.currentTimeMillis();
+ if (!this.selectedServer.enableCookies) {
+ ServerCookieDataStore.clearCookie(this.selectedServer.serverIP);
+ }
> CHANGE 5 : 10 @ 5 : 7
~ long millis = EagRuntime.steadyTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
~ }
> CHANGE 10 : 15 @ 10 : 12
> INSERT 6 : 9 @ 6
~ long millis = System.currentTimeMillis();
+ if (serverdata.enableCookies && !this.selectedServer.enableCookies) {
+ ServerCookieDataStore.clearCookie(this.selectedServer.serverIP);
+ }
> CHANGE 4 : 9 @ 4 : 6
~ long millis = EagRuntime.steadyTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
@ -171,7 +193,11 @@
+ relaysButton.drawScreen(i, j);
+ drawPluginDownloadLink(i, j);
> INSERT 3 : 4 @ 3
> INSERT 2 : 3 @ 2
+ GlStateManager.disableLighting();
> INSERT 1 : 2 @ 1
+ }

View File

@ -28,4 +28,8 @@
~ this.field_146253_i.add(0, new ChatLine(parInt2, (IChatComponent) list.get(j), parInt1));
> CHANGE 62 : 63 @ 62 : 63
~ ScaledResolution scaledresolution = mc.scaledResolution;
> EOF

View File

@ -11,4 +11,22 @@
> DELETE 1 @ 1 : 3
> CHANGE 4 : 5 @ 4 : 5
~ public float sliderValue;
> INSERT 21 : 25 @ 21
+ public GameSettings.Options getEnumOptions() {
+ return options;
+ }
+
> INSERT 40 : 44 @ 40
+
+ public boolean isSliderTouchEvents() {
+ return true;
+ }
> EOF

View File

@ -5,18 +5,26 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 13 @ 2 : 3
> CHANGE 2 : 21 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.boot_menu.GuiScreenEnterBootMenu;
~ import net.lax1dude.eaglercraft.v1_8.cookie.GuiScreenRevokeSessionToken;
~ import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
~ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ 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.profile.GuiScreenImportExportProfile;
~ import net.lax1dude.eaglercraft.v1_8.recording.GuiScreenRecordingNote;
~ import net.lax1dude.eaglercraft.v1_8.recording.GuiScreenRecordingSettings;
~ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
> DELETE 1 @ 1 : 21
@ -41,11 +49,12 @@
~ I18n.format("shaders.gui.optionsButton")));
> CHANGE 2 : 5 @ 2 : 4
> CHANGE 2 : 6 @ 2 : 4
~ boolean support = ScreenRecordingController.isSupported();
~ 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])));
~ broadcastSettings.enabled = EagRuntime.recSupported();
~ 20, I18n.format(support ? "options.screenRecording.button" : "options.screenRecording.unsupported")));
~ broadcastSettings.enabled = support;
> CHANGE 8 : 10 @ 8 : 9
@ -87,24 +96,29 @@
> DELETE 22 @ 22 : 27
> CHANGE 16 : 18 @ 16 : 23
> CHANGE 16 : 22 @ 16 : 22
~ EagRuntime.toggleRec();
~ broadcastSettings.displayString = I18n.format(EagRuntime.getRecText(), new Object[0]);
~ if (ScreenRecordingController.isSupported()) {
~ GuiScreen screen = new GuiScreenRecordingSettings(this);
~ if (!GuiScreenRecordingNote.hasShown) {
~ screen = new GuiScreenRecordingNote(screen);
~ }
~ this.mc.displayGuiScreen(screen);
> INSERT 2 : 5 @ 2
> INSERT 3 : 6 @ 3
+ if (parGuiButton.id == 104) {
+ EagRuntime.showDebugConsole();
+ }
> INSERT 6 : 24 @ 6
> INSERT 6 : 49 @ 6
+
+ if (mc.theWorld == null && !EagRuntime.getConfiguration().isDemo()) {
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+
+ String text = I18n.format("editProfile.importExport");
+
+ int w = mc.fontRendererObj.getStringWidth(text);
@ -118,9 +132,43 @@
+ GlStateManager.popMatrix();
+ }
+
+ if (mc.theWorld == null && EagRuntime.getConfiguration().isAllowBootMenu()) {
+ drawCenteredString(mc.fontRendererObj, I18n.format("options.pressDeleteText"), width / 2, height / 6 + 22,
+ 11184810);
+ }
+
+ if (EagRuntime.getConfiguration().isEnableServerCookies() && mc.thePlayer == null) {
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+
+ String text = I18n.format("revokeSessionToken.button");
+
+ int w = mc.fontRendererObj.getStringWidth(text);
+ boolean hover = i > width - 5 - (w + 5) * 3 / 4 && j > 1 && i < width - 2 && j < 12;
+ if (hover) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
+
+ drawString(mc.fontRendererObj, EnumChatFormatting.UNDERLINE + text, (width - 1) * 4 / 3 - w - 5, 5,
+ hover ? 0xFFEEEE22 : 0xFFCCCCCC);
+
+ GlStateManager.popMatrix();
+ }
+
> INSERT 2 : 14 @ 2
> INSERT 2 : 35 @ 2
+
+ @Override
+ protected void keyTyped(char parChar1, int parInt1) {
+ super.keyTyped(parChar1, parInt1);
+ if (parInt1 == KeyboardConstants.KEY_DELETE || parInt1 == KeyboardConstants.KEY_BACK) {
+ if (mc.theWorld == null && EagRuntime.getConfiguration().isAllowBootMenu()) {
+ mc.displayGuiScreen(new GuiScreenEnterBootMenu(this));
+ }
+ }
+ }
+
+ protected void mouseClicked(int mx, int my, int button) {
+ super.mouseClicked(mx, my, button);
@ -132,6 +180,17 @@
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ }
+ }
+ if (EagRuntime.getConfiguration().isEnableServerCookies() && mc.thePlayer == null) {
+ int w = mc.fontRendererObj.getStringWidth(I18n.format("revokeSessionToken.button"));
+ if (mx > width - 5 - (w + 5) * 3 / 4 && my > 1 && mx < width - 2 && my < 12) {
+ ServerCookieDataStore.flush();
+ mc.displayGuiScreen(ServerCookieDataStore.numRevokable() == 0
+ ? new GuiScreenGenericErrorMessage("errorNoSessions.title", "errorNoSessions.desc", this)
+ : new GuiScreenRevokeSessionToken(this));
+ mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ }
+ }
+ }
> EOF

View File

@ -7,12 +7,88 @@
> DELETE 2 @ 2 : 3
> INSERT 1 : 4 @ 1
> INSERT 1 : 5 @ 1
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
> DELETE 1 @ 1 : 5
> CHANGE 72 : 77 @ 72 : 73
~ if (var4 != 0 && var4 != 12345)
~ return false;
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ if ((!touchMode || (this.field_148323_b.isSliderTouchEvents() == (var4 == 12345)))
~ && this.field_148323_b.mousePressed(this.field_148325_a, i, j)) {
> CHANGE 8 : 11 @ 8 : 9
~ } else if (this.field_148324_c != null
~ && (!touchMode || (this.field_148324_c.isSliderTouchEvents() == (var4 == 12345)))
~ && this.field_148324_c.mousePressed(this.field_148325_a, i, j)) {
> CHANGE 14 : 19 @ 14 : 15
~ if (var4 != 0 && var4 != 12345)
~ return;
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ if (this.field_148323_b != null
~ && (!touchMode || (this.field_148323_b.isSliderTouchEvents() == (var4 == 12345)))) {
> CHANGE 3 : 5 @ 3 : 4
~ if (this.field_148324_c != null
~ && (!touchMode || (this.field_148324_c.isSliderTouchEvents() == (var4 == 12345)))) {
> INSERT 8 : 53 @ 8
+
+ public GuiOptionButton getButtonFor(GameSettings.Options enumOption) {
+ for (Row r : field_148184_k) {
+ if (r.field_148323_b != null) {
+ if (r.field_148323_b instanceof GuiOptionButton) {
+ GuiOptionButton btn = (GuiOptionButton) r.field_148323_b;
+ if (btn.returnEnumOptions() == enumOption) {
+ return btn;
+ }
+ }
+ }
+ if (r.field_148324_c != null) {
+ if (r.field_148324_c instanceof GuiOptionButton) {
+ GuiOptionButton btn = (GuiOptionButton) r.field_148324_c;
+ if (btn.returnEnumOptions() == enumOption) {
+ return btn;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public GuiOptionSlider getSliderFor(GameSettings.Options enumOption) {
+ for (Row r : field_148184_k) {
+ if (r.field_148323_b != null) {
+ if (r.field_148323_b instanceof GuiOptionSlider) {
+ GuiOptionSlider btn = (GuiOptionSlider) r.field_148323_b;
+ if (btn.getEnumOptions() == enumOption) {
+ return btn;
+ }
+ }
+ }
+ if (r.field_148324_c != null) {
+ if (r.field_148324_c instanceof GuiOptionSlider) {
+ GuiOptionSlider btn = (GuiOptionSlider) r.field_148324_c;
+ if (btn.getEnumOptions() == enumOption) {
+ return btn;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
> EOF

View File

@ -18,8 +18,11 @@
+ import java.util.Locale;
> INSERT 1 : 14 @ 1
> INSERT 1 : 17 @ 1
+
+ import org.apache.commons.lang3.StringUtils;
+
+ import java.util.TimeZone;
+
+ import com.google.common.base.Strings;
@ -52,14 +55,11 @@
+ public int playerOffset = 0;
> INSERT 7 : 10 @ 7
+ playerOffset = 0;
+ int ww = scaledResolutionIn.getScaledWidth();
+ int hh = scaledResolutionIn.getScaledHeight();
> CHANGE 1 : 22 @ 1 : 7
> CHANGE 7 : 31 @ 7 : 14
~ playerOffset = 0;
~ int ww = scaledResolutionIn.getScaledWidth();
~ int hh = scaledResolutionIn.getScaledHeight();
~ if (this.mc.gameSettings.showDebugInfo) {
~ GlStateManager.pushMatrix();
~ this.renderDebugInfoLeft();
@ -82,34 +82,33 @@
~ }
~
> INSERT 2 : 26 @ 2
> CHANGE 2 : 25 @ 2 : 3
+ if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
+ if (this.mc.gameSettings.hudStats) {
+ drawStatsHUD(ww - 2, hh - 2);
+ }
+
+ if (this.mc.gameSettings.hudWorld) {
+ drawWorldHUD(2, hh - 2);
+ }
+ }
+
+ if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
+ if (this.mc.joinWorldTickCounter > 70) {
+ GlStateManager.enableBlend();
+ GlStateManager.blendFunc(770, 771);
+ }
+ int i = this.mc.joinWorldTickCounter - 70;
+ if (i < 0)
+ i = 0;
+ drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
+ if (this.mc.joinWorldTickCounter > 70) {
+ GlStateManager.disableBlend();
+ }
+ }
+
~ if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
~ if (this.mc.gameSettings.hudStats) {
~ drawStatsHUD(ww - 2, hh - 2);
~ }
~
~ if (this.mc.gameSettings.hudWorld) {
~ drawWorldHUD(2, hh - 2);
~ }
~ }
~
~ if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
~ if (this.mc.joinWorldTickCounter > 70) {
~ GlStateManager.enableBlend();
~ GlStateManager.blendFunc(770, 771);
~ }
~ int i = this.mc.joinWorldTickCounter - 70;
~ if (i < 0)
~ i = 0;
~ drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
~ if (this.mc.joinWorldTickCounter > 70) {
~ GlStateManager.disableBlend();
~ }
~ }
> INSERT 3 : 142 @ 3
> INSERT 2 : 140 @ 2
+ private void drawFPS(int x, int y) {
+ this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
@ -205,7 +204,6 @@
+ final double dticks = ticks - minutes * ticksPerMinute;
+ final long seconds = (long) Math.floor(dticks / ticksPerSecond);
+
+ // TODO: why does desktop JRE not apply "GMT" correctly?
+ final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
+
+ cal.setLenient(true);
@ -215,10 +213,10 @@
+ cal.add(Calendar.MINUTE, (int) minutes);
+ cal.add(Calendar.SECOND, (int) seconds + 1);
+
+ SimpleDateFormat fmt = this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve;
+ fmt.setCalendar(cal);
+ String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " ("
+ + EnumChatFormatting.YELLOW
+ + (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime())
+ + EnumChatFormatting.WHITE + ")";
+ + EnumChatFormatting.YELLOW + fmt.format(cal.getTime()) + EnumChatFormatting.WHITE + ")";
+
+ Entity e = mc.getRenderViewEntity();
+ BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D),
@ -251,7 +249,7 @@
+ }
+
> INSERT 4 : 37 @ 4
> INSERT 4 : 44 @ 4
+ private int drawSingleplayerStats(ScaledResolution parScaledResolution) {
+ if (mc.isDemo()) {
@ -263,23 +261,30 @@
+ if (tpsAge < 20000l) {
+ int color = tpsAge > 2000l ? 0x777777 : 0xFFFFFF;
+ List<String> strs = SingleplayerServerController.getTPS();
+ if (SingleplayerServerController.isRunningSingleThreadMode()) {
+ strs = Lists.newArrayList(strs);
+ strs.add("");
+ strs.add(I18n.format("singleplayer.tpscounter.singleThreadMode"));
+ }
+ int l;
+ boolean first = true;
+ for (int j = 0, m = strs.size(); j < m; ++j) {
+ String str = strs.get(j);
+ l = (int) (this.fontRenderer.getStringWidth(str) * (!first ? 0.5f : 1.0f));
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(parScaledResolution.getScaledWidth() - 2 - l, i + 2, 0.0f);
+ if (!first) {
+ GlStateManager.scale(0.5f, 0.5f, 0.5f);
+ if (!StringUtils.isAllEmpty(str)) {
+ l = (int) (this.fontRenderer.getStringWidth(str) * (!first ? 0.5f : 1.0f));
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(parScaledResolution.getScaledWidth() - 2 - l, i + 2, 0.0f);
+ if (!first) {
+ GlStateManager.scale(0.5f, 0.5f, 0.5f);
+ }
+ this.fontRenderer.drawStringWithShadow(str, 0, 0, color);
+ GlStateManager.popMatrix();
+ if (color == 0xFFFFFF) {
+ color = 14737632;
+ }
+ }
+ this.fontRenderer.drawStringWithShadow(str, 0, 0, color);
+ GlStateManager.popMatrix();
+ i += (int) (this.fontRenderer.FONT_HEIGHT * (!first ? 0.5f : 1.0f));
+ first = false;
+ if (color == 0xFFFFFF) {
+ color = 14737632;
+ }
+ }
+ }
+ }
@ -370,4 +375,8 @@
> DELETE 8 @ 8 : 12
> CHANGE 25 : 26 @ 25 : 26
~ ScaledResolution scaledresolution = this.mc.scaledResolution;
> EOF

View File

@ -10,9 +10,11 @@
+ import java.util.List;
+
> CHANGE 4 : 5 @ 4 : 5
> CHANGE 4 : 7 @ 4 : 5
~
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
> DELETE 1 @ 1 : 9
@ -46,4 +48,53 @@
~ for (int k = 0; k < astring.length; ++k) {
~ ((GuiTextField) this.field_178072_w.get(j)).setText(astring[k]);
> INSERT 31 : 46 @ 31
+ public boolean isTextFieldFocused() {
+ for (GuiTextField txt : field_178072_w) {
+ if (txt.isFocused()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ for (GuiTextField txt : field_178072_w) {
+ txt.fireInputEvent(event, param);
+ }
+ }
+
> CHANGE 93 : 100 @ 93 : 95
~ if (k != 0 && k != 12345)
~ return false;
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ boolean flag = this.field_178029_b != null && (!touchMode || stupidCheck(this.field_178029_b, k))
~ && this.func_178026_a(this.field_178029_b, i, j, k);
~ boolean flag1 = this.field_178030_c != null && (!touchMode || stupidCheck(this.field_178030_c, k))
~ && this.func_178026_a(this.field_178030_c, i, j, k);
> INSERT 3 : 11 @ 3
+ private static boolean stupidCheck(Gui gui, int k) {
+ if (gui instanceof GuiButton) {
+ return ((GuiButton) gui).isSliderTouchEvents() == (k == 12345);
+ } else {
+ return k != 12345;
+ }
+ }
+
> CHANGE 32 : 39 @ 32 : 34
~ if (k != 0 && k != 12345)
~ return;
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ if (!touchMode || stupidCheck(field_178029_b, k))
~ this.func_178016_b(this.field_178029_b, i, j, k);
~ if (!touchMode || stupidCheck(field_178030_c, k))
~ this.func_178016_b(this.field_178030_c, i, j, k);
> EOF

View File

@ -20,7 +20,16 @@
> DELETE 2 @ 2 : 3
> CHANGE 46 : 48 @ 46 : 47
> CHANGE 27 : 29 @ 27 : 28
~ IChatComponent dname = networkPlayerInfoIn.getDisplayNameProfanityFilter();
~ return dname != null ? dname.getFormattedText()
> CHANGE 1 : 2 @ 1 : 2
~ networkPlayerInfoIn.getGameProfileNameProfanityFilter());
> CHANGE 16 : 18 @ 16 : 17
~ for (int m = 0, n = list.size(); m < n; ++m) {
~ NetworkPlayerInfo networkplayerinfo = (NetworkPlayerInfo) list.get(m);

View File

@ -5,9 +5,10 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 5 @ 2 : 6
> CHANGE 2 : 6 @ 2 : 6
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
@ -74,4 +75,18 @@
~ this.drawCenteredString(this.fontRendererObj,
~ I18n.format(duplicate ? "selectWorld.duplicate" : "selectWorld.renameTitle", new Object[0]),
> INSERT 6 : 17 @ 6
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return field_146583_f.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ field_146583_f.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -7,11 +7,12 @@
> DELETE 2 @ 2 : 4
> INSERT 1 : 5 @ 1
> INSERT 1 : 6 @ 1
+
+ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 2
@ -28,11 +29,22 @@
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 46 : 50 @ 46
> INSERT 46 : 61 @ 46
+
+ public boolean blockPTTKey() {
+ return nameField.isFocused();
+ }
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return nameField.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ nameField.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -9,9 +9,18 @@
> DELETE 1 @ 1 : 3
> INSERT 4 : 20 @ 4
> INSERT 2 : 3 @ 2
+ import java.util.HashMap;
> INSERT 1 : 2 @ 1
+ import java.util.Map;
> INSERT 1 : 24 @ 1
+
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent;
+ import org.apache.commons.lang3.StringUtils;
+
+ import com.google.common.base.Splitter;
@ -22,11 +31,17 @@
+ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
+ import net.lax1dude.eaglercraft.v1_8.Touch;
+ 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.minecraft.EnumInputEvent;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
+ import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchControls;
+ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenServerInfo;
> CHANGE 1 : 2 @ 1 : 9
@ -38,14 +53,27 @@
+ import net.minecraft.client.resources.I18n;
> DELETE 13 @ 13 : 19
> CHANGE 13 : 14 @ 13 : 19
> CHANGE 17 : 19 @ 17 : 18
~ import net.minecraft.util.ResourceLocation;
> CHANGE 13 : 14 @ 13 : 14
~ protected GuiButton selectedButton;
> CHANGE 3 : 5 @ 3 : 4
~ private String clickedLinkURI;
~ protected long showingCloseKey = 0;
> CHANGE 2 : 3 @ 2 : 3
> INSERT 1 : 5 @ 1
+ protected int touchModeCursorPosX = -1;
+ protected int touchModeCursorPosY = -1;
+ private long lastTouchEvent;
+
> CHANGE 1 : 2 @ 1 : 2
~ for (int k = 0, l = this.buttonList.size(); k < l; ++k) {
@ -55,7 +83,7 @@
> INSERT 3 : 33 @ 3
+ long millis = System.currentTimeMillis();
+ long millis = EagRuntime.steadyTimeMillis();
+ long closeKeyTimeout = millis - showingCloseKey;
+ if (closeKeyTimeout < 3000l) {
+ int alpha1 = 0xC0000000;
@ -86,7 +114,7 @@
+ }
+
> CHANGE 2 : 14 @ 2 : 4
> CHANGE 2 : 16 @ 2 : 4
~ protected int getCloseKey() {
~ if (this instanceof GuiContainer) {
@ -97,6 +125,8 @@
~ }
~
~ protected void keyTyped(char parChar1, int parInt1) {
~ if (!canCloseGui())
~ return;
~ if (((this.mc.theWorld == null || this.mc.thePlayer.getHealth() <= 0.0F) && parInt1 == 1)
~ || parInt1 == this.mc.gameSettings.keyBindClose.getKeyCode()
~ || (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked()))) {
@ -104,7 +134,7 @@
> INSERT 4 : 6 @ 4
+ } else if (parInt1 == 1) {
+ showingCloseKey = System.currentTimeMillis();
+ showingCloseKey = EagRuntime.steadyTimeMillis();
> DELETE 1 @ 1 : 2
@ -116,22 +146,72 @@
~ EagRuntime.setClipboard(copyText);
> CHANGE 6 : 7 @ 6 : 7
> CHANGE 4 : 6 @ 4 : 5
~ renderToolTip0(itemstack, i, j, false);
~ }
> CHANGE 1 : 5 @ 1 : 2
~ protected void renderToolTip0(ItemStack itemstack, int i, int j, boolean eagler) {
~ List list = itemstack.getTooltipProfanityFilter(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
~
~ for (int k = 0, l = list.size(); k < l; ++k) {
> CHANGE 22 : 24 @ 22 : 24
> CHANGE 7 : 8 @ 7 : 8
~ this.drawHoveringText0(list, i, j, eagler);
> INSERT 7 : 11 @ 7
+ drawHoveringText0(list, i, j, false);
+ }
+
+ protected void drawHoveringText0(List<String> list, int i, int j, boolean eagler) {
> CHANGE 7 : 9 @ 7 : 9
~ for (int m = 0, n = list.size(); m < n; ++m) {
~ int l = this.fontRendererObj.getStringWidth(list.get(m));
> CHANGE 37 : 40 @ 37 : 38
> CHANGE 5 : 7 @ 5 : 7
~ int j2 = i;
~ int k2 = j;
> CHANGE 5 : 8 @ 5 : 8
~ if (!eagler) {
~ j2 += 12;
~ k2 -= 12;
> CHANGE 1 : 10 @ 1 : 3
~ if (j2 + k > this.width) {
~ j2 -= 28 + k;
~ }
~
~ if (k2 + i1 + 6 > this.height) {
~ k2 = this.height - i1 - 6;
~ }
~ } else {
~ j2 -= (k + 3) >> 1;
> CHANGE 19 : 22 @ 19 : 20
~ if (s1.length() > 0) {
~ this.fontRendererObj.drawStringWithShadow(s1, (float) j2, (float) k2, -1);
~ }
> INSERT 107 : 108 @ 107
> CHANGE 16 : 17 @ 16 : 17
~ public void handleComponentHover(IChatComponent parIChatComponent, int parInt1, int parInt2) {
> CHANGE 76 : 77 @ 76 : 77
~ public boolean handleComponentClick(IChatComponent parIChatComponent) {
> INSERT 13 : 14 @ 13
+ String uri = clickevent.getValue();
@ -165,20 +245,229 @@
~ LOGGER.error("Invalid plugin download from EPK was blocked: {}",
~ EaglerXBungeeVersion.pluginFileEPK);
> CHANGE 24 : 25 @ 24 : 25
> CHANGE 24 : 49 @ 24 : 26
~ protected void touchStarted(int parInt1, int parInt2, int parInt3) {
~ if (shouldTouchGenerateMouseEvents()) {
~ this.mouseClicked(parInt1, parInt2, 12345);
~ }
~ }
~
~ protected void touchTapped(int parInt1, int parInt2, int parInt3) {
~ if (shouldTouchGenerateMouseEvents()) {
~ this.mouseClicked(parInt1, parInt2, 0);
~ this.mouseReleased(parInt1, parInt2, 0);
~ }
~ }
~
~ protected void touchMoved(int parInt1, int parInt2, int parInt3) {
~ }
~
~ protected void touchEndMove(int parInt1, int parInt2, int parInt3) {
~ if (shouldTouchGenerateMouseEvents()) {
~ this.mouseReleased(parInt1, parInt2, 12345);
~ }
~ }
~
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
~ if (parInt3 == 0 || parInt3 == 12345) {
> CHANGE 24 : 25 @ 24 : 25
> INSERT 2 : 4 @ 2
+ if (touchMode && (parInt3 == 12345) != guibutton.isSliderTouchEvents())
+ continue;
> CHANGE 11 : 13 @ 11 : 12
~ if (this.selectedButton != null && (k == 0 || k == 12345)
~ && (!PointerInputAbstraction.isTouchMode() || (k == 12345) == selectedButton.isSliderTouchEvents())) {
> CHANGE 9 : 10 @ 9 : 10
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 119 : 121 @ 119 : 128
> INSERT 16 : 23 @ 16
+ boolean noTouch = true;
+ while (Touch.next()) {
+ noTouch = false;
+ this.handleTouchInput();
+ TouchControls.handleInput();
+ }
+
> CHANGE 2 : 5 @ 2 : 3
~ if (noTouch) {
~ this.handleMouseInput();
~ }
> INSERT 11 : 95 @ 11
+ public final Map<Integer, int[]> touchStarts = new HashMap<>();
+
+ /**
+ * Handles touch input.
+ */
+ public void handleTouchInput() throws IOException {
+ EnumTouchEvent et = Touch.getEventType();
+ if (et == EnumTouchEvent.TOUCHSTART) {
+ PointerInputAbstraction.enterTouchModeHook();
+ }
+ float scaleFac = getEaglerScale();
+ for (int t = 0, c = Touch.getEventTouchPointCount(); t < c; ++t) {
+ int u = Touch.getEventTouchPointUID(t);
+ int i = Touch.getEventTouchX(t);
+ int j = Touch.getEventTouchY(t);
+ if (et == EnumTouchEvent.TOUCHSTART) {
+ if (TouchControls.handleTouchBegin(u, i, j)) {
+ continue;
+ }
+ } else if (et == EnumTouchEvent.TOUCHEND) {
+ if (TouchControls.handleTouchEnd(u, i, j)) {
+ continue;
+ }
+ }
+ i = applyEaglerScale(scaleFac, i * this.width / this.mc.displayWidth, this.width);
+ j = applyEaglerScale(scaleFac, this.height - j * this.height / this.mc.displayHeight - 1, this.height);
+ float si = Touch.getEventTouchRadiusX(t) * this.width / this.mc.displayWidth / scaleFac;
+ if (si < 1.0f)
+ si = 1.0f;
+ float sj = Touch.getEventTouchRadiusY(t) * this.height / this.mc.displayHeight / scaleFac;
+ if (sj < 1.0f)
+ sj = 1.0f;
+ int[] ck = touchStarts.remove(u);
+ switch (et) {
+ case TOUCHSTART:
+ if (t == 0) {
+ touchModeCursorPosX = i;
+ touchModeCursorPosY = j;
+ }
+ lastTouchEvent = EagRuntime.steadyTimeMillis();
+ touchStarts.put(u, new int[] { i, j, 0 });
+ this.touchStarted(i, j, u);
+ break;
+ case TOUCHMOVE:
+ if (t == 0) {
+ touchModeCursorPosX = i;
+ touchModeCursorPosY = j;
+ }
+ if (ck != null && Math.abs(ck[0] - i) < si && Math.abs(ck[1] - j) < sj) {
+ touchStarts.put(u, ck);
+ break;
+ }
+ touchStarts.put(u, new int[] { i, j, (ck != null && isTouchDraggingStateLocked(u)) ? ck[2] : 1 });
+ this.touchMoved(i, j, u);
+ if (t == 0 && shouldTouchGenerateMouseEvents()) {
+ this.mouseClickMove(i, j, 0, EagRuntime.steadyTimeMillis() - lastTouchEvent);
+ }
+ break;
+ case TOUCHEND:
+ if (ck == null)
+ break;
+ if (t == 0) {
+ touchModeCursorPosX = -1;
+ touchModeCursorPosY = -1;
+ }
+ if (ck != null && ck[2] == 1) {
+ this.touchEndMove(i, j, u);
+ } else {
+ if (ck != null) {
+ i = ck[0];
+ j = ck[1];
+ }
+ this.touchTapped(i, j, u);
+ }
+ break;
+ }
+ }
+ }
+
+ public boolean isTouchPointDragging(int uid) {
+ int[] ret = touchStarts.get(uid);
+ return ret != null && ret[2] == 1;
+ }
+
> CHANGE 1 : 5 @ 1 : 3
~ float f = getEaglerScale();
~ int i = applyEaglerScale(f, Mouse.getEventX() * this.width / this.mc.displayWidth, this.width);
~ int j = applyEaglerScale(f, this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1,
~ this.height);
> INSERT 2 : 3 @ 2
+ PointerInputAbstraction.enterMouseModeHook();
> INSERT 39 : 43 @ 39
+ protected boolean isPartOfPauseMenu() {
+ return false;
+ }
+
> CHANGE 2 : 53 @ 2 : 3
~ boolean ingame = isPartOfPauseMenu();
~ ResourceLocation loc = (ingame && PauseMenuCustomizeState.icon_background_pause != null)
~ ? PauseMenuCustomizeState.icon_background_pause
~ : PauseMenuCustomizeState.icon_background_all;
~ float aspect = (ingame && PauseMenuCustomizeState.icon_background_pause != null)
~ ? 1.0f / PauseMenuCustomizeState.icon_background_pause_aspect
~ : 1.0f / PauseMenuCustomizeState.icon_background_all_aspect;
~ if (loc != null) {
~ GlStateManager.disableLighting();
~ GlStateManager.disableFog();
~ GlStateManager.enableBlend();
~ GlStateManager.disableAlpha();
~ GlStateManager.enableTexture2D();
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
~ Tessellator tessellator = Tessellator.getInstance();
~ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
~ this.mc.getTextureManager().bindTexture(loc);
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
~ float f = 64.0F;
~ worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
~ worldrenderer.pos(0.0D, (double) this.height, 0.0D).tex(0.0D, (double) ((float) this.height / f))
~ .color(64, 64, 64, 192).endVertex();
~ worldrenderer.pos((double) this.width, (double) this.height, 0.0D)
~ .tex((double) ((float) this.width / f * aspect), (double) ((float) this.height / f))
~ .color(64, 64, 64, 192).endVertex();
~ worldrenderer.pos((double) this.width, 0.0D, 0.0D)
~ .tex((double) ((float) this.width / f * aspect), (double) 0).color(64, 64, 64, 192).endVertex();
~ worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double) 0).color(64, 64, 64, 192).endVertex();
~ tessellator.draw();
~ GlStateManager.enableAlpha();
~ } else {
~ this.drawGradientRect(0, 0, this.width, this.height, -1072689136, -804253680);
~ }
~ if (!(this instanceof GuiScreenServerInfo)) {
~ loc = (ingame && PauseMenuCustomizeState.icon_watermark_pause != null)
~ ? PauseMenuCustomizeState.icon_watermark_pause
~ : PauseMenuCustomizeState.icon_watermark_all;
~ aspect = (ingame && PauseMenuCustomizeState.icon_watermark_pause != null)
~ ? PauseMenuCustomizeState.icon_watermark_pause_aspect
~ : PauseMenuCustomizeState.icon_watermark_all_aspect;
~ if (loc != null) {
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
~ mc.getTextureManager().bindTexture(loc);
~ GlStateManager.pushMatrix();
~ GlStateManager.translate(8, height - 72, 0.0f);
~ float f2 = 64.0f / 256.0f;
~ GlStateManager.scale(f2 * aspect, f2, f2);
~ this.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
~ GlStateManager.popMatrix();
~ }
~ }
> CHANGE 42 : 44 @ 42 : 51
~ private void openWebLink(String parURI) {
~ EagRuntime.openLink(parURI);
> INSERT 34 : 42 @ 34
> INSERT 34 : 75 @ 34
+
+ public boolean shouldHangupIntegratedServer() {
@ -188,5 +477,38 @@
+ public boolean blockPTTKey() {
+ return false;
+ }
+
+ public void fireInputEvent(EnumInputEvent event, String param) {
+
+ }
+
+ public boolean showCopyPasteButtons() {
+ return false;
+ }
+
+ public static int applyEaglerScale(float scaleFac, int coord, int screenDim) {
+ return (int) ((coord - (1.0f - scaleFac) * screenDim * 0.5f) / scaleFac);
+ }
+
+ public float getEaglerScale() {
+ return PointerInputAbstraction.isTouchMode() ? getTouchModeScale() : 1.0f;
+ }
+
+ protected float getTouchModeScale() {
+ return 1.0f;
+ }
+
+ public boolean canCloseGui() {
+ return true;
+ }
+
+ protected boolean isTouchDraggingStateLocked(int uid) {
+ return false;
+ }
+
+ protected boolean shouldTouchGenerateMouseEvents() {
+ return true;
+ }
+
> EOF

View File

@ -5,16 +5,18 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 8
> CHANGE 2 : 5 @ 2 : 8
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
> DELETE 2 @ 2 : 3
> CHANGE 7 : 8 @ 7 : 26
> CHANGE 7 : 9 @ 7 : 26
~ private GuiButton hideAddress;
~ private GuiButton enableCookies;
> INSERT 13 : 14 @ 13
@ -40,11 +42,21 @@
~ }
~ this.buttonList.add(this.serverResourcePacks = new GuiButton(2, this.width / 2 - 100, i + 54,
> INSERT 2 : 5 @ 2
> INSERT 2 : 15 @ 2
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 - 100, i + 78,
+ I18n.format("addServer.hideAddress", new Object[0]) + ": "
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
+ if (EagRuntime.getConfiguration().isEnableServerCookies()) {
+ this.buttonList.add(this.enableCookies = new GuiButton(4, this.width / 2 - 100, i + 78, 99, 20,
+ I18n.format("addServer.enableCookies") + ": "
+ + I18n.format(this.serverData.enableCookies ? "addServer.enableCookies.enabled"
+ : "addServer.enableCookies.disabled")));
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 + 1, i + 78, 99, 20,
+ I18n.format("addServer.hideAddr", new Object[0]) + ": "
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
+ } else {
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 - 100, i + 78,
+ I18n.format("addServer.hideAddress", new Object[0]) + ": "
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
+ }
> CHANGE 6 : 7 @ 6 : 9
@ -54,12 +66,19 @@
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 1 : 6 @ 1 : 2
> CHANGE 1 : 13 @ 1 : 2
~ if (parGuiButton.id == 3) {
~ this.serverData.hideAddress = !this.serverData.hideAddress;
~ this.hideAddress.displayString = I18n.format("addServer.hideAddress", new Object[0]) + ": "
~ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0]);
~ this.hideAddress.displayString = I18n
~ .format(EagRuntime.getConfiguration().isEnableServerCookies() ? "addServer.hideAddr"
~ : "addServer.hideAddress", new Object[0])
~ + ": " + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0]);
~ } else if (parGuiButton.id == 4) {
~ this.serverData.enableCookies = !this.serverData.enableCookies;
~ this.enableCookies.displayString = I18n.format("addServer.enableCookies") + ": "
~ + I18n.format(this.serverData.enableCookies ? "addServer.enableCookies.enabled"
~ : "addServer.enableCookies.disabled");
~ } else if (parGuiButton.id == 2) {
> CHANGE 1 : 3 @ 1 : 3
@ -93,4 +112,19 @@
+ 0xccccff);
+ }
> INSERT 4 : 16 @ 4
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return serverNameField.isFocused() || serverIPField.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ serverNameField.fireInputEvent(event, param);
+ serverIPField.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -7,7 +7,7 @@
> DELETE 2 @ 2 : 6
> INSERT 1 : 11 @ 1
> INSERT 1 : 12 @ 1
+
+ import org.json.JSONException;
@ -18,13 +18,23 @@
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVisualViewport;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 5
> DELETE 16 @ 16 : 19
> CHANGE 139 : 140 @ 139 : 140
> CHANGE 1 : 2 @ 1 : 2
~ public class GuiScreenBook extends GuiScreenVisualViewport {
> CHANGE 47 : 49 @ 47 : 49
~ public void updateScreen0() {
~ super.updateScreen0();
> CHANGE 88 : 89 @ 88 : 89
~ protected void actionPerformed(GuiButton parGuiButton) {
@ -34,15 +44,31 @@
> DELETE 6 @ 6 : 7
> CHANGE 129 : 130 @ 129 : 130
> CHANGE 78 : 79 @ 78 : 79
~ public void drawScreen0(int i, int j, float f) {
> CHANGE 50 : 51 @ 50 : 51
~ } catch (JSONException var13) {
> CHANGE 34 : 35 @ 34 : 35
> CHANGE 31 : 32 @ 31 : 32
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
~ super.drawScreen0(i, j, f);
> INSERT 102 : 106 @ 102
> CHANGE 2 : 3 @ 2 : 3
~ protected void mouseClicked0(int parInt1, int parInt2, int parInt3) {
> CHANGE 7 : 8 @ 7 : 8
~ super.mouseClicked0(parInt1, parInt2, parInt3);
> CHANGE 2 : 3 @ 2 : 3
~ public boolean handleComponentClick(IChatComponent ichatcomponent) {
> INSERT 91 : 95 @ 91
+
+ public boolean blockPTTKey() {

View File

@ -5,10 +5,11 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 5 : 9 @ 5 : 11
> CHANGE 5 : 10 @ 5 : 11
~
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
@ -16,7 +17,15 @@
> DELETE 4 @ 4 : 5
> CHANGE 41 : 42 @ 41 : 42
> INSERT 37 : 42 @ 37
+ public void handleTouchInput() throws IOException {
+ super.handleTouchInput();
+ this.field_175311_g.handleTouchInput();
+ }
+
> CHANGE 4 : 5 @ 4 : 5
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
@ -28,4 +37,17 @@
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 35 : 45 @ 35
+ @Override
+ public boolean showCopyPasteButtons() {
+ return field_175317_i.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ field_175317_i.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -21,4 +21,11 @@
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 90 : 94 @ 90
+
+ public boolean isSliderTouchEvents() {
+ return true;
+ }
> EOF

View File

@ -40,7 +40,16 @@
~ this.selectedResourcePacks
~ .add(new ResourcePackListEntryFound(this, (ResourcePackRepository.Entry) arraylist.get(i)));
> CHANGE 38 : 39 @ 38 : 39
> INSERT 21 : 27 @ 21
+ public void handleTouchInput() throws IOException {
+ super.handleTouchInput();
+ this.selectedResourcePacksList.handleTouchInput();
+ this.availableResourcePacksList.handleTouchInput();
+ }
+
> CHANGE 17 : 18 @ 17 : 18
~ protected void actionPerformed(GuiButton parGuiButton) {

View File

@ -5,10 +5,11 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 6
> CHANGE 2 : 5 @ 2 : 6
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
> DELETE 2 @ 2 : 3
@ -59,4 +60,18 @@
~ 100, 10526880);
~ }
> INSERT 3 : 14 @ 3
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return field_146302_g.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ field_146302_g.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -9,12 +9,13 @@
+ import java.util.ArrayList;
> CHANGE 2 : 7 @ 2 : 3
> CHANGE 2 : 8 @ 2 : 3
~
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANConnect;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANNotSupported;
~ import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket1CIssueDetected;
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
> CHANGE 1 : 2 @ 1 : 9
@ -44,18 +45,27 @@
+ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANInfo;
+
> INSERT 17 : 19 @ 17
> INSERT 17 : 20 @ 17
+ private boolean hasRequestedWorlds = false;
+ private boolean waitingForWorlds = false;
+ private boolean ramdiskMode = false;
> INSERT 3 : 4 @ 3
+ this.field_146639_s = new ArrayList();
> DELETE 4 @ 4 : 13
> INSERT 3 : 4 @ 3
> INSERT 13 : 30 @ 13
+ this.ramdiskMode = SingleplayerServerController.isIssueDetected(IPCPacket1CIssueDetected.ISSUE_RAMDISK_MODE);
> DELETE 1 @ 1 : 10
> CHANGE 8 : 9 @ 8 : 9
~ this.field_146638_t = new GuiSelectWorld.List(this.mc, ramdiskMode ? -10 : 0);
> INSERT 4 : 21 @ 4
+ public void updateScreen() {
+ if (!hasRequestedWorlds && SingleplayerServerController.isReady()) {
@ -75,8 +85,13 @@
+ }
+
> CHANGE 5 : 6 @ 5 : 6
> CHANGE 5 : 11 @ 5 : 6
~ public void handleTouchInput() throws IOException {
~ super.handleTouchInput();
~ this.field_146638_t.handleTouchInput();
~ }
~
~ private void func_146627_h() {
> CHANGE 29 : 30 @ 29 : 30
@ -118,8 +133,13 @@
> DELETE 1 @ 1 : 3
> INSERT 7 : 22 @ 7
> INSERT 7 : 27 @ 7
+
+ if (ramdiskMode) {
+ this.drawCenteredString(this.fontRendererObj, I18n.format("selectWorld.ramdiskWarning"), this.width / 2,
+ height - 68, 11184810);
+ }
+
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
@ -155,4 +175,10 @@
+ }
+
> CHANGE 10 : 13 @ 10 : 12
~ public List(Minecraft mcIn, int i) {
~ super(mcIn, GuiSelectWorld.this.width, GuiSelectWorld.this.height, 32, GuiSelectWorld.this.height - 64 + i,
~ 36);
> EOF

View File

@ -11,4 +11,11 @@
> DELETE 1 @ 1 : 4
> INSERT 106 : 110 @ 106
+
+ public boolean isSliderTouchEvents() {
+ return true;
+ }
> EOF

View File

@ -5,10 +5,13 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 8 @ 2
> INSERT 2 : 11 @ 2
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
+ import net.lax1dude.eaglercraft.v1_8.Touch;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
@ -34,17 +37,44 @@
~ this.drawSelectionBox(k, l, mouseXIn, mouseYIn, this.getSize());
> CHANGE 168 : 169 @ 168 : 170
> INSERT 74 : 84 @ 74
+ handleInput(Mouse.getEventButton(), Mouse.getEventButtonState(), Mouse.getDWheel());
+ }
+
+ public void handleTouchInput() {
+ mouseX = PointerInputAbstraction.getVCursorX() * width / mc.displayWidth;
+ mouseY = height - PointerInputAbstraction.getVCursorY() * height / mc.displayHeight - 1;
+ handleInput(0, Touch.getEventType() == EnumTouchEvent.TOUCHSTART, 0);
+ }
+
+ protected void handleInput(int eventButton, boolean eventState, int dWheel) {
> CHANGE 1 : 2 @ 1 : 3
~ if (eventButton == 0 && eventState && this.mouseY >= this.top && this.mouseY <= this.bottom) {
> CHANGE 12 : 13 @ 12 : 13
~ if (PointerInputAbstraction.getVCursorButtonDown(0) && this.getEnabled()) {
> CHANGE 52 : 57 @ 52 : 58
~ if (dWheel != 0) {
~ if (dWheel > 0) {
~ dWheel = -1;
~ } else if (dWheel < 0) {
~ dWheel = 1;
> CHANGE 2 : 3 @ 2 : 3
~ this.amountScrolled += (float) (dWheel * this.slotHeight / 2);
> CHANGE 17 : 18 @ 17 : 19
~ protected void drawSelectionBox(int mouseXIn, int mouseYIn, int parInt3, int parInt4, int i) {
> INSERT 3 : 6 @ 3
+ int mx = Mouse.getX();
+ int my = Mouse.getY();
+
> INSERT 31 : 34 @ 31
> INSERT 34 : 37 @ 34
+ if (parInt3 >= i1 && parInt3 <= j1 && parInt4 >= k - 2 && parInt4 <= k + l + 1) {
+ Mouse.showCursor(EnumCursorType.HAND);

View File

@ -5,9 +5,10 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 4 : 7 @ 4 : 9
> CHANGE 4 : 8 @ 4 : 9
~
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
@ -44,4 +45,25 @@
~ GlStateManager.disableBlend();
> INSERT 104 : 122 @ 104
+
+ public void fireInputEvent(EnumInputEvent clipboardPaste, String param) {
+ if (!isFocused)
+ return;
+ switch (clipboardPaste) {
+ case CLIPBOARD_COPY:
+ GuiScreen.setClipboardString(this.getSelectedText());
+ break;
+ case CLIPBOARD_PASTE:
+ if (this.isEnabled) {
+ this.writeText(param != null ? param : GuiScreen.getClipboardString());
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
> EOF

View File

@ -15,4 +15,11 @@
> DELETE 1 @ 1 : 2
> INSERT 11 : 15 @ 11
+ /**
+ * This function is like the FontRenderer wrap function, except for chat
+ * components
+ */
> EOF

View File

@ -5,12 +5,17 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 3 : 4 @ 3 : 9
> CHANGE 3 : 8 @ 3 : 9
~
~ import net.lax1dude.eaglercraft.v1_8.Display;
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
~ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
> INSERT 8 : 11 @ 8
> INSERT 8 : 12 @ 8
+ private boolean vsyncLock = false;
+ /**
+ * + An array of all of GameSettings.Options's video options.
+ */
@ -26,21 +31,77 @@
~ GameSettings.Options.HUD_COORDS, GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS,
~ GameSettings.Options.HUD_WORLD, GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
> CHANGE 11 : 13 @ 11 : 31
> CHANGE 11 : 18 @ 11 : 22
~ this.optionsRowList = new GuiOptionsRowList(this.mc, this.width, this.height, 32, this.height - 32, 25,
~ videoOptions);
~ if (!DynamicLightsStateManager.isSupported()) {
~ GuiOptionButton btn = ((GuiOptionsRowList) optionsRowList)
~ .getButtonFor(GameSettings.Options.EAGLER_DYNAMIC_LIGHTS);
~ if (btn != null) {
~ btn.enabled = false;
> CHANGE 7 : 8 @ 7 : 8
> DELETE 1 @ 1 : 7
> CHANGE 1 : 17 @ 1 : 2
~ if (EaglercraftGPU.checkOpenGLESVersion() < 300) {
~ GuiOptionSlider btn = ((GuiOptionsRowList) optionsRowList).getSliderFor(GameSettings.Options.MIPMAP_LEVELS);
~ if (btn != null) {
~ btn.displayString = I18n.format(GameSettings.Options.MIPMAP_LEVELS.getEnumString()) + ": N/A";
~ btn.sliderValue = 0.0f;
~ btn.enabled = false;
~ }
~ }
~ if (!Display.supportsFullscreen()) {
~ GuiOptionButton btn = ((GuiOptionsRowList) optionsRowList).getButtonFor(GameSettings.Options.FULLSCREEN);
~ if (btn != null) {
~ btn.displayString = I18n.format(GameSettings.Options.FULLSCREEN.getEnumString()) + ": "
~ + I18n.format("options.off");
~ btn.enabled = false;
~ }
~ }
> CHANGE 7 : 13 @ 7 : 8
~ public void handleTouchInput() throws IOException {
~ super.handleTouchInput();
~ this.optionsRowList.handleTouchInput();
~ }
~
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 9 : 10 @ 9 : 10
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 8 : 9 @ 8
> CHANGE 4 : 5 @ 4 : 5
~ ScaledResolution scaledresolution = mc.scaledResolution = new ScaledResolution(mc);
> INSERT 3 : 5 @ 3
+ this.mc.voiceOverlay.setResolution(j, k);
+ this.mc.notifRenderer.setResolution(this.mc, j, k, scaledresolution.getScaleFactor());
> CHANGE 9 : 10 @ 9 : 10
~ ScaledResolution scaledresolution = mc.scaledResolution = new ScaledResolution(mc);
> INSERT 13 : 26 @ 13
+
+ @Override
+ public void updateScreen() {
+ boolean vsyncLockEn = ScreenRecordingController.isVSyncLocked();
+ if (vsyncLockEn != vsyncLock) {
+ vsyncLock = vsyncLockEn;
+ GuiOptionButton btn = ((GuiOptionsRowList) optionsRowList).getButtonFor(GameSettings.Options.EAGLER_VSYNC);
+ if (btn != null) {
+ btn.enabled = !vsyncLockEn;
+ }
+ }
+ }
+
> EOF

View File

@ -0,0 +1,20 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 12 : 16 @ 12
+ /**
+ * EAGLER NOTE: This constructor is deprecated! Use
+ * Minecraft.getMinecraft().scaledResolution
+ */
> INSERT 10 : 12 @ 10
+ i = Math.round(i * Math.max(parMinecraft.displayDPI, 0.5f));
+
> EOF

View File

@ -5,14 +5,32 @@
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 7
> CHANGE 2 : 3 @ 2 : 7
> CHANGE 22 : 24 @ 22 : 23
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ for (int j = 0; j < field_146399_a.length; ++j) {
~ GameSettings.Options gamesettings$options = field_146399_a[j];
> INSERT 8 : 14 @ 8
> CHANGE 16 : 17 @ 16 : 17
+ GameSettings.Options.CHAT_WIDTH, GameSettings.Options.REDUCED_DEBUG_INFO,
+ GameSettings.Options.EAGLER_PROFANITY_FILTER };
+ private static final GameSettings.Options[] no_profanity_filter = new GameSettings.Options[] {
+ GameSettings.Options.CHAT_VISIBILITY, GameSettings.Options.CHAT_COLOR, GameSettings.Options.CHAT_LINKS,
+ GameSettings.Options.CHAT_OPACITY, GameSettings.Options.CHAT_LINKS_PROMPT, GameSettings.Options.CHAT_SCALE,
+ GameSettings.Options.CHAT_HEIGHT_FOCUSED, GameSettings.Options.CHAT_HEIGHT_UNFOCUSED,
> CHANGE 14 : 18 @ 14 : 15
~ boolean profanityFilterForce = EagRuntime.getConfiguration().isForceProfanityFilter();
~ GameSettings.Options[] opts = profanityFilterForce ? no_profanity_filter : field_146399_a;
~ for (int j = 0; j < opts.length; ++j) {
~ GameSettings.Options gamesettings$options = opts[j];
> CHANGE 12 : 14 @ 12 : 14
~ this.buttonList.add(new GuiButton(200, this.width / 2 - 100,
~ this.height / 6 + (profanityFilterForce ? 130 : 154), I18n.format("gui.done", new Object[0])));
> CHANGE 2 : 3 @ 2 : 3
~ protected void actionPerformed(GuiButton parGuiButton) {

View File

@ -11,7 +11,11 @@
> DELETE 3 @ 3 : 4
> INSERT 114 : 146 @ 114
> CHANGE 48 : 49 @ 48 : 49
~ ScaledResolution scaledresolution = mc.scaledResolution;
> INSERT 65 : 97 @ 65
+ public int getHeight() {
+ if (this.theAchievement != null && this.notificationTime != 0L && Minecraft.getMinecraft().thePlayer != null) {

View File

@ -5,11 +5,12 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 7 @ 2 : 4
> CHANGE 2 : 8 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
@ -28,7 +29,11 @@
~ protected int getCloseKey() {
~ return this.mc.gameSettings.keyBindInventory.getKeyCode();
> CHANGE 76 : 77 @ 76 : 77
> CHANGE 11 : 12 @ 11 : 12
~ if (PointerInputAbstraction.getVCursorButtonDown(0)) {
> CHANGE 64 : 65 @ 64 : 65
~ GlStateManager.disableLighting();

View File

@ -12,7 +12,7 @@
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
@ -22,11 +22,25 @@
> DELETE 11 @ 11 : 12
> CHANGE 71 : 72 @ 71 : 72
> INSERT 32 : 39 @ 32
+ public void handleTouchInput() throws IOException {
+ super.handleTouchInput();
+ if (this.displaySlot != null) {
+ this.displaySlot.handleTouchInput();
+ }
+ }
+
> CHANGE 39 : 40 @ 39 : 40
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 270 : 272 @ 270 : 271
> CHANGE 111 : 112 @ 111 : 112
~ if (!PointerInputAbstraction.getVCursorButtonDown(0)) {
> CHANGE 158 : 160 @ 158 : 159
~ for (int m = 0, l = StatList.objectMineStats.size(); m < l; ++m) {
~ StatCrafting statcrafting = StatList.objectMineStats.get(m);

View File

@ -9,12 +9,14 @@
~ import java.util.List;
> INSERT 1 : 8 @ 1
> INSERT 1 : 10 @ 1
+
+ import com.google.common.collect.Sets;
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.Touch;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
@ -25,11 +27,29 @@
> DELETE 8 @ 8 : 9
> INSERT 81 : 82 @ 81
> INSERT 39 : 43 @ 39
+ if (primaryTouchPoint != -1 && Touch.fetchPointIdx(primaryTouchPoint) == -1) {
+ primaryTouchPoint = -1;
+ mouseReleased(lastTouchX, lastTouchY, 0);
+ }
> CHANGE 30 : 31 @ 30 : 31
~ if (!this.mc.gameSettings.touchscreen && slot.canBeHovered() && this.isMouseOverSlot(slot, i, j)) {
> INSERT 11 : 12 @ 11
+ GlStateManager.enableAlpha();
> CHANGE 107 : 108 @ 107 : 108
> DELETE 21 @ 21 : 22
> CHANGE 18 : 20 @ 18 : 19
~ if (!this.mc.gameSettings.touchscreen && inventoryplayer.getItemStack() == null && this.theSlot != null
~ && this.theSlot.getHasStack()) {
> CHANGE 66 : 67 @ 66 : 67
~ EaglerTextureAtlasSprite textureatlassprite = this.mc.getTextureMapBlocks().getAtlasSprite(s1);
@ -37,7 +57,14 @@
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 126 : 129 @ 126 : 127
> CHANGE 20 : 24 @ 20 : 24
~ // if (this.mc.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null) {
~ // this.mc.displayGuiScreen((GuiScreen) null);
~ // return;
~ // }
> CHANGE 102 : 105 @ 102 : 103
~ List<Slot> lst = this.inventorySlots.inventorySlots;
~ for (int n = 0, m = lst.size(); n < m; ++n) {
@ -58,7 +85,7 @@
> INSERT 1 : 12 @ 1
+ } else if (parInt1 == 1) {
+ showingCloseKey = System.currentTimeMillis();
+ showingCloseKey = EagRuntime.steadyTimeMillis();
+ } else {
+ this.checkHotbarKeys(parInt1);
+ if (this.theSlot != null && this.theSlot.getHasStack()) {
@ -71,4 +98,67 @@
> DELETE 1 @ 1 : 2
> INSERT 29 : 30 @ 29
+ return;
> INSERT 1 : 6 @ 1
+ if (primaryTouchPoint != -1 && Touch.fetchPointIdx(primaryTouchPoint) == -1) {
+ primaryTouchPoint = -1;
+ mouseReleased(lastTouchX, lastTouchY, 0);
+ }
+ }
> INSERT 1 : 3 @ 1
+ protected float getTouchModeScale() {
+ return 1.25f;
> INSERT 1 : 44 @ 1
+
+ private int primaryTouchPoint = -1;
+ private int lastTouchX = -1;
+ private int lastTouchY = -1;
+
+ protected void touchStarted(int touchX, int touchY, int uid) {
+ if (primaryTouchPoint == -1) {
+ primaryTouchPoint = uid;
+ lastTouchX = touchX;
+ lastTouchY = touchY;
+ mouseClicked(touchX, touchY, 0);
+ }
+ }
+
+ protected void touchMoved(int touchX, int touchY, int uid) {
+ if (primaryTouchPoint == uid) {
+ lastTouchX = touchX;
+ lastTouchY = touchY;
+ mouseClickMove(touchX, touchY, 0, 0l);
+ }
+ }
+
+ protected void touchEndMove(int touchX, int touchY, int uid) {
+ if (primaryTouchPoint == uid) {
+ primaryTouchPoint = -1;
+ lastTouchX = touchX;
+ lastTouchY = touchY;
+ mouseReleased(touchX, touchY, 0);
+ }
+ }
+
+ protected void touchTapped(int touchX, int touchY, int uid) {
+ if (primaryTouchPoint == uid) {
+ primaryTouchPoint = -1;
+ lastTouchX = touchX;
+ lastTouchY = touchY;
+ mouseReleased(touchX, touchY, 0);
+ }
+ }
+
+ protected boolean shouldTouchGenerateMouseEvents() {
+ return false;
+ }
> EOF

View File

@ -7,14 +7,16 @@
> DELETE 2 @ 2 : 3
> INSERT 4 : 11 @ 4
> INSERT 4 : 13 @ 4
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 4 @ 4 : 7
@ -64,13 +66,41 @@
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ CreativeTabs creativetabs = CreativeTabs.creativeTabArray[m];
> CHANGE 127 : 130 @ 127 : 129
> INSERT 10 : 26 @ 10
+ @Override
+ protected void touchTapped(int touchX, int touchY, int uid) {
+ int l = touchX - this.guiLeft;
+ int i1 = touchY - this.guiTop;
+
+ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
+ CreativeTabs creativetabs = CreativeTabs.creativeTabArray[m];
+ if (this.func_147049_a(creativetabs, l, i1)) {
+ this.setCurrentCreativeTab(creativetabs);
+ break;
+ }
+ }
+
+ super.touchTapped(touchX, touchY, uid);
+ }
+
> CHANGE 93 : 94 @ 93 : 94
~ boolean flag = PointerInputAbstraction.getVCursorButtonDown(0);
> CHANGE 23 : 26 @ 23 : 25
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ if (this.renderCreativeInventoryHoveringText(CreativeTabs.creativeTabArray[m], i, j)) {
~ Mouse.showCursor(EnumCursorType.HAND);
> CHANGE 24 : 26 @ 24 : 25
> CHANGE 16 : 18 @ 16 : 17
~ List list = itemstack.getTooltipProfanityFilter(this.mc.thePlayer,
~ this.mc.gameSettings.advancedItemTooltips);
> CHANGE 7 : 9 @ 7 : 8
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ CreativeTabs creativetabs1 = CreativeTabs.creativeTabArray[m];
@ -84,11 +114,22 @@
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 139 : 143 @ 139
> INSERT 139 : 154 @ 139
+
+ public boolean blockPTTKey() {
+ return searchField.isFocused();
+ }
+
+ @Override
+ public boolean showCopyPasteButtons() {
+ return searchField.isFocused();
+ }
+
+ @Override
+ public void fireInputEvent(EnumInputEvent event, String param) {
+ searchField.fireInputEvent(event, param);
+ }
+
> EOF

View File

@ -5,16 +5,31 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 3
> CHANGE 2 : 7 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.Display;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVisualViewport;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 4 @ 4 : 5
> DELETE 7 @ 7 : 8
> INSERT 1 : 2 @ 1
> CHANGE 34 : 35 @ 34 : 35
+ import net.minecraft.client.renderer.tileentity.TileEntitySignRenderer;
> DELETE 6 @ 6 : 7
> CHANGE 1 : 2 @ 1 : 2
~ public class GuiEditSign extends GuiScreenVisualViewport {
> CHANGE 28 : 29 @ 28 : 29
~ public void updateScreen0() {
> CHANGE 3 : 4 @ 3 : 4
~ protected void actionPerformed(GuiButton parGuiButton) {
@ -22,11 +37,33 @@
~ protected void keyTyped(char parChar1, int parInt1) {
> INSERT 68 : 72 @ 68
> CHANGE 25 : 26 @ 25 : 26
~ public void drawScreen0(int i, int j, float f) {
> CHANGE 37 : 47 @ 37 : 38
~ try {
~ TileEntitySignRenderer.disableProfanityFilter = true;
~ TileEntityRendererDispatcher.instance.renderTileEntityAt(this.tileSign, -0.5D,
~ (PointerInputAbstraction.isTouchMode() && (Display.getVisualViewportH() / mc.displayHeight) < 0.75f)
~ ? -0.25D
~ : -0.75D,
~ -0.5D, 0.0F);
~ } finally {
~ TileEntitySignRenderer.disableProfanityFilter = false;
~ }
> CHANGE 2 : 3 @ 2 : 3
~ super.drawScreen0(i, j, f);
> INSERT 1 : 6 @ 1
+
+ public boolean blockPTTKey() {
+ return true;
+ }
+
> EOF

View File

@ -7,19 +7,32 @@
> DELETE 2 @ 2 : 3
> INSERT 1 : 6 @ 1
> INSERT 1 : 7 @ 1
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
> DELETE 10 @ 10 : 12
> CHANGE 50 : 52 @ 50 : 52
> CHANGE 48 : 49 @ 48 : 49
~ long i = EagRuntime.steadyTimeMillis();
> CHANGE 1 : 3 @ 1 : 3
~ for (int j = 0, k = this.chunkListing.size(); j < k; ++j) {
~ this.chunkListing.get(j).func_150804_b(System.currentTimeMillis() - i > 5L);
~ this.chunkListing.get(j).func_150804_b(EagRuntime.steadyTimeMillis() - i > 5L);
> CHANGE 2 : 3 @ 2 : 3
~ if (EagRuntime.steadyTimeMillis() - i > 100L) {
> CHANGE 1 : 2 @ 1 : 2
~ new Object[] { Long.valueOf(EagRuntime.steadyTimeMillis() - i) });
> EOF

View File

@ -5,11 +5,15 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 3 : 13 @ 3 : 6
> CHANGE 3 : 21 @ 3 : 6
~ import java.util.List;
~
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumServerRateLimit;
~ import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketClient;
~ import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame;
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
@ -17,23 +21,31 @@
~ import net.lax1dude.eaglercraft.v1_8.socket.ConnectionHandshake;
~ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
~ import net.lax1dude.eaglercraft.v1_8.socket.RateLimitTracker;
~ import net.lax1dude.eaglercraft.v1_8.socket.WebSocketNetworkManager;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageConstants;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
> CHANGE 4 : 5 @ 4 : 8
~ import net.minecraft.client.network.NetHandlerPlayClient;
> DELETE 2 @ 2 : 5
> CHANGE 2 : 3 @ 2 : 5
~ import net.minecraft.network.play.client.C17PacketCustomPayload;
> DELETE 1 @ 1 : 4
> DELETE 2 @ 2 : 3
> CHANGE 1 : 5 @ 1 : 2
> CHANGE 1 : 7 @ 1 : 2
~ private IWebSocketClient webSocket;
~ private EaglercraftNetworkManager networkManager;
~ private String currentAddress;
~ private String currentPassword;
~ private boolean allowPlaintext;
~ private boolean allowCookies;
> INSERT 1 : 2 @ 1
@ -63,36 +75,52 @@
~ String serveraddress = AddressResolver.resolveURI(parServerData);
> CHANGE 2 : 7 @ 2 : 3
> CHANGE 2 : 8 @ 2 : 3
~ if (RateLimitTracker.isLockedOut(serveraddress)) {
~ logger.error("Server locked this client out on a previous connection, will not attempt to reconnect");
~ } else {
~ this.connect(serveraddress, password, allowPlaintext);
~ this.connect(serveraddress, password, allowPlaintext,
~ parServerData.enableCookies && EagRuntime.getConfiguration().isEnableServerCookies());
~ }
> INSERT 3 : 16 @ 3
> CHANGE 3 : 4 @ 3 : 7
+ this(parGuiScreen, mcIn, hostName, port, false);
+ }
+
+ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, boolean allowPlaintext) {
+ this(parGuiScreen, mcIn, hostName, port, null, allowPlaintext);
+ }
+
+ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password) {
+ this(parGuiScreen, mcIn, hostName, port, password, false);
+ }
+
+ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password,
+ boolean allowPlaintext) {
> CHANGE 3 : 4 @ 3 : 4
~ this.connect(hostName, password, allowPlaintext);
~ this(parGuiScreen, mcIn, hostName, port, false, EagRuntime.getConfiguration().isEnableServerCookies());
> CHANGE 2 : 5 @ 2 : 7
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, boolean allowCookies) {
~ this(parGuiScreen, mcIn, hostName, port, false, allowCookies);
~ }
> CHANGE 1 : 5 @ 1 : 5
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, boolean allowPlaintext,
~ boolean allowCookies) {
~ this(parGuiScreen, mcIn, hostName, port, null, allowPlaintext, allowCookies);
~ }
> CHANGE 1 : 5 @ 1 : 15
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password,
~ boolean allowCookies) {
~ this(parGuiScreen, mcIn, hostName, port, password, false, allowCookies);
~ }
> CHANGE 1 : 9 @ 1 : 9
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password,
~ boolean allowPlaintext, boolean allowCookies) {
~ this.mc = mcIn;
~ this.previousGuiScreen = parGuiScreen;
~ mcIn.loadWorld((WorldClient) null);
~ this.connect(hostName, password, allowPlaintext,
~ allowCookies && EagRuntime.getConfiguration().isEnableServerCookies());
~ }
> CHANGE 1 : 4 @ 1 : 7
~ public GuiConnecting(GuiConnecting previous, String password) {
~ this(previous, password, false);
~ }
@ -102,73 +130,87 @@
~ public GuiConnecting(GuiConnecting previous, String password, boolean allowPlaintext) {
~ this.mc = previous.mc;
~ this.previousGuiScreen = previous.previousGuiScreen;
~ this.connect(previous.currentAddress, password, allowPlaintext);
~ this.connect(previous.currentAddress, password, allowPlaintext, previous.allowCookies);
~ }
> CHANGE 1 : 6 @ 1 : 15
> CHANGE 1 : 6 @ 1 : 3
~ private void connect(String ip, String password, boolean allowPlaintext) {
~ private void connect(String ip, String password, boolean allowPlaintext, boolean allowCookies) {
~ this.currentAddress = ip;
~ this.currentPassword = password;
~ this.allowPlaintext = allowPlaintext;
~ }
~ this.allowCookies = allowCookies;
> CHANGE 1 : 41 @ 1 : 8
> CHANGE 3 : 14 @ 3 : 6
~ public void updateScreen() {
~ ++timer;
~ if (timer > 1) {
~ if (this.currentAddress == null) {
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
~ } else if (this.networkManager == null) {
~ } else if (webSocket == null) {
~ logger.info("Connecting to: {}", currentAddress);
~ this.networkManager = new EaglercraftNetworkManager(currentAddress);
~ this.networkManager.connect();
~ } else {
~ if (this.networkManager.isChannelOpen()) {
~ webSocket = PlatformNetworking.openWebSocket(currentAddress);
~ if (webSocket == null) {
~ mc.displayGuiScreen(new GuiDisconnected(previousGuiScreen, "connect.failed",
~ new ChatComponentText("Could not open WebSocket to \"" + currentAddress + "\"!")));
~ }
> CHANGE 1 : 79 @ 1 : 2
~ if (webSocket.getState() == EnumEaglerConnectionState.CONNECTED) {
~ if (!hasOpened) {
~ hasOpened = true;
~ logger.info("Logging in: {}", currentAddress);
~ if (ConnectionHandshake.attemptHandshake(this.mc, this, previousGuiScreen, currentPassword,
~ allowPlaintext)) {
~ byte[] cookieData = null;
~ if (allowCookies) {
~ ServerCookieDataStore.ServerCookie cookie = ServerCookieDataStore
~ .loadCookie(currentAddress);
~ if (cookie != null) {
~ cookieData = cookie.cookie;
~ }
~ }
~ if (ConnectionHandshake.attemptHandshake(this.mc, webSocket, this, previousGuiScreen,
~ currentPassword, allowPlaintext, allowCookies, cookieData)) {
~ logger.info("Handshake Success");
~ this.networkManager = new WebSocketNetworkManager(webSocket);
~ this.networkManager.setPluginInfo(ConnectionHandshake.pluginBrand,
~ ConnectionHandshake.pluginVersion);
~ mc.bungeeOutdatedMsgTimer = 80;
~ mc.clearTitles();
~ this.networkManager.setConnectionState(EnumConnectionState.PLAY);
~ this.networkManager.setNetHandler(new NetHandlerPlayClient(this.mc, previousGuiScreen,
~ this.networkManager, this.mc.getSession().getProfile()));
~ NetHandlerPlayClient netHandler = new NetHandlerPlayClient(this.mc, previousGuiScreen,
~ this.networkManager, this.mc.getSession().getProfile());
~ this.networkManager.setNetHandler(netHandler);
~ netHandler.setEaglerMessageController(new GameProtocolMessageController(
~ GamePluginMessageProtocol.getByVersion(ConnectionHandshake.protocolVersion),
~ GamePluginMessageConstants.CLIENT_TO_SERVER,
~ GameProtocolMessageController
~ .createClientHandler(ConnectionHandshake.protocolVersion, netHandler),
~ (ch, msg) -> netHandler.addToSendQueue(new C17PacketCustomPayload(ch, msg))));
~ } else {
~ if (mc.currentScreen == this) {
~ checkLowLevelRatelimit();
~ }
~ if (mc.currentScreen == this) {
~ checkRatelimit();
~ logger.info("Handshake Failure");
~ mc.getSession().reset();
~ mc.displayGuiScreen(
~ new GuiDisconnected(previousGuiScreen, "connect.failed", new ChatComponentText(
~ "Handshake Failure\n\nAre you sure this is an eagler 1.8 server?")));
~ }
~ if (!PlatformNetworking.playConnectionState().isClosed()) {
~ PlatformNetworking.playDisconnect();
~ }
~ webSocket.close();
~ return;
~ }
> CHANGE 1 : 4 @ 1 : 7
~ try {
~ this.networkManager.processReceivedPackets();
~ } catch (IOException ex) {
> CHANGE 1 : 29 @ 1 : 5
~ }
~ if (this.networkManager != null) {
~ try {
~ this.networkManager.processReceivedPackets();
~ } catch (IOException ex) {
~ }
~ }
~ } else {
~ if (PlatformNetworking.playConnectionState() == EnumEaglerConnectionState.FAILED) {
~ if (webSocket.getState() == EnumEaglerConnectionState.FAILED) {
~ if (!hasOpened) {
~ mc.getSession().reset();
~ checkLowLevelRatelimit();
~ checkRatelimit();
~ if (mc.currentScreen == this) {
~ if (RateLimitTracker.isProbablyLockedOut(currentAddress)) {
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
@ -179,9 +221,9 @@
~ }
~ }
~ } else {
~ if (this.networkManager.checkDisconnected()) {
~ if (this.networkManager != null && this.networkManager.checkDisconnected()) {
~ this.mc.getSession().reset();
~ checkLowLevelRatelimit();
~ checkRatelimit();
~ if (mc.currentScreen == this) {
~ if (RateLimitTracker.isProbablyLockedOut(currentAddress)) {
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
@ -192,12 +234,21 @@
~ }
~ }
~ }
~ }
> INSERT 1 : 8 @ 1
+ if (timer > 200) {
+ if (webSocket != null) {
+ webSocket.close();
+ }
+ mc.displayGuiScreen(new GuiDisconnected(previousGuiScreen, "connect.failed",
+ new ChatComponentText("Handshake timed out")));
+ }
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 11
> CHANGE 4 : 5 @ 4 : 5
> CHANGE 2 : 3 @ 2 : 3
~ protected void keyTyped(char parChar1, int parInt1) {
@ -210,25 +261,41 @@
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 13 : 14 @ 13 : 14
> INSERT 4 : 6 @ 4
+ } else if (this.webSocket != null) {
+ this.webSocket.close();
> CHANGE 9 : 10 @ 9 : 10
~ if (this.networkManager == null || !this.networkManager.isChannelOpen()) {
> INSERT 9 : 23 @ 9
> INSERT 9 : 34 @ 9
+
+ private void checkLowLevelRatelimit() {
+ EnumServerRateLimit rateLimit = PlatformNetworking.getRateLimit();
+ if (rateLimit == EnumServerRateLimit.BLOCKED) {
+ RateLimitTracker.registerBlock(currentAddress);
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
+ logger.info("Handshake Failure: Too Many Requests!");
+ } else if (rateLimit == EnumServerRateLimit.LOCKED_OUT) {
+ RateLimitTracker.registerLockOut(currentAddress);
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
+ logger.info("Handshake Failure: Too Many Requests!");
+ logger.info("Server has locked this client out");
+ private void checkRatelimit() {
+ if (this.webSocket != null) {
+ List<IWebSocketFrame> strFrames = webSocket.getNextStringFrames();
+ if (strFrames != null) {
+ for (int i = 0; i < strFrames.size(); ++i) {
+ String str = strFrames.get(i).getString();
+ if (str.equalsIgnoreCase("BLOCKED")) {
+ RateLimitTracker.registerBlock(currentAddress);
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
+ logger.info("Handshake Failure: Too Many Requests!");
+ } else if (str.equalsIgnoreCase("LOCKED")) {
+ RateLimitTracker.registerLockOut(currentAddress);
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
+ logger.info("Handshake Failure: Too Many Requests!");
+ logger.info("Server has locked this client out");
+ }
+ }
+ }
+ }
+ }
+
+ public boolean canCloseGui() {
+ return false;
+ }
> EOF

View File

@ -5,10 +5,11 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 5 @ 2
> INSERT 2 : 6 @ 2
+ import java.io.IOException;
+
+ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
+ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
> DELETE 6 @ 6 : 7
@ -17,7 +18,7 @@
+ import net.minecraft.util.ChatComponentText;
> CHANGE 228 : 240 @ 228 : 229
> CHANGE 228 : 242 @ 228 : 229
~ try {
~ this.netClientHandler.getNetworkManager().processReceivedPackets();
@ -31,6 +32,8 @@
~ }
~ this.netClientHandler.getSkinCache().flush();
~ this.netClientHandler.getCapeCache().flush();
~ this.netClientHandler.getNotifManager().runTick();
~ ClientUUIDLoadingCache.update();
> CHANGE 96 : 98 @ 96 : 98

View File

@ -5,13 +5,14 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 13 @ 2
> INSERT 2 : 14 @ 2
+ import java.io.IOException;
+
+ import org.json.JSONArray;
+ import org.json.JSONObject;
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.internal.IServerQuery;
+ import net.lax1dude.eaglercraft.v1_8.internal.QueryResponse;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -33,7 +34,7 @@
~ public boolean hideAddress = false;
> INSERT 1 : 9 @ 1
> INSERT 1 : 10 @ 1
+ public IServerQuery currentQuery = null;
+ public final ResourceLocation iconResourceLocation;
@ -43,6 +44,7 @@
+ public boolean hasPing = false;
+ public boolean serverIconEnabled = false;
+ public boolean isDefault = false;
+ public boolean enableCookies;
> INSERT 1 : 5 @ 1
@ -51,35 +53,50 @@
+ private static int serverTextureId = 0;
+
> INSERT 4 : 5 @ 4
> INSERT 4 : 6 @ 4
+ this.iconResourceLocation = new ResourceLocation("eagler:servers/icons/tex_" + serverTextureId++);
+ this.enableCookies = EagRuntime.getConfiguration().isEnableServerCookies();
> DELETE 6 @ 6 : 9
> INSERT 7 : 9 @ 7
> INSERT 7 : 10 @ 7
+ nbttagcompound.setBoolean("hideAddress", this.hideAddress);
+ nbttagcompound.setBoolean("enableCookies", this.enableCookies);
+
> DELETE 13 @ 13 : 16
> INSERT 11 : 17 @ 11
> CHANGE 11 : 16 @ 11 : 13
+ if (nbtCompound.hasKey("hideAddress", 1)) {
+ serverdata.hideAddress = nbtCompound.getBoolean("hideAddress");
+ } else {
+ serverdata.hideAddress = false;
+ }
+
~ if (nbtCompound.hasKey("hideAddress", 1)) {
~ serverdata.hideAddress = nbtCompound.getBoolean("hideAddress");
~ } else {
~ serverdata.hideAddress = false;
~ }
> DELETE 3 @ 3 : 11
> CHANGE 1 : 6 @ 1 : 4
> CHANGE 8 : 9 @ 8 : 9
~ if (nbtCompound.hasKey("enableCookies", 1)) {
~ serverdata.enableCookies = nbtCompound.getBoolean("enableCookies");
~ } else {
~ serverdata.enableCookies = true;
~ }
> CHANGE 1 : 2 @ 1 : 3
~ return serverdata;
> CHANGE 10 : 11 @ 10 : 11
~ this.hideAddress = serverDataIn.hideAddress;
> INSERT 6 : 8 @ 6
> INSERT 1 : 2 @ 1
+ this.enableCookies = serverDataIn.enableCookies;
> INSERT 5 : 7 @ 5
+ public static final ServerResourceMode[] _VALUES = values();
+

View File

@ -60,7 +60,7 @@
+
+ public void loadServerList(byte[] localStorage) {
> CHANGE 1 : 8 @ 1 : 5
> CHANGE 1 : 9 @ 1 : 5
~ freeServerIcons();
~
@ -68,6 +68,7 @@
~ for (DefaultServer srv : EagRuntime.getConfiguration().getDefaultServerList()) {
~ ServerData dat = new ServerData(srv.name, srv.addr, true);
~ dat.isDefault = true;
~ dat.hideAddress = srv.hideAddress;
~ this.allServers.add(dat);
> CHANGE 2 : 8 @ 2 : 3
@ -135,7 +136,7 @@
~ data.iconTextureObject = null;
~ }
> INSERT 36 : 144 @ 36
> INSERT 36 : 145 @ 36
+
+ public void freeServerIcons() {
@ -170,7 +171,7 @@
+ for (int i = 0, l = this.servers.size(); i < l; ++i) {
+ ServerData dat = this.servers.get(i);
+ if (dat.pingSentTime <= 0l) {
+ dat.pingSentTime = System.currentTimeMillis();
+ dat.pingSentTime = EagRuntime.steadyTimeMillis();
+ if (RateLimitTracker.isLockedOut(dat.serverIP)) {
+ logger.error(
+ "Server {} locked this client out on a previous connection, will not attempt to reconnect",
@ -192,6 +193,7 @@
+ }
+ }
+ } else if (dat.currentQuery != null) {
+ dat.currentQuery.update();
+ if (!dat.hasPing) {
+ ++total;
+ EnumServerRateLimit rateLimit = dat.currentQuery.getRateLimit();
@ -228,7 +230,7 @@
+ dat.setIconPacket(r);
+ }
+ if (!dat.currentQuery.isOpen() && dat.pingSentTime > 0l
+ && (System.currentTimeMillis() - dat.pingSentTime) > 2000l && !dat.hasPing) {
+ && (EagRuntime.steadyTimeMillis() - dat.pingSentTime) > 2000l && !dat.hasPing) {
+ if (RateLimitTracker.isProbablyLockedOut(dat.serverIP)) {
+ logger.error("Server {} ratelimited this client out on a previous connection, assuming lockout",
+ dat.serverIP);

View File

@ -17,7 +17,29 @@
> DELETE 5 @ 5 : 6
> CHANGE 211 : 212 @ 211 : 212
> DELETE 9 @ 9 : 10
> CHANGE 25 : 26 @ 25 : 26
~ EnumDifficulty parEnumDifficulty) {
> CHANGE 1 : 2 @ 1 : 2
~ WorldProvider.getProviderForDimension(parInt1), true);
> DELETE 17 @ 17 : 19
> DELETE 8 @ 8 : 9
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> DELETE 24 @ 24 : 25
> DELETE 2 @ 2 : 3
> CHANGE 113 : 114 @ 113 : 114
~ EaglercraftRandom random = new EaglercraftRandom();

View File

@ -9,25 +9,27 @@
> DELETE 4 @ 4 : 6
> INSERT 1 : 22 @ 1
> INSERT 1 : 24 @ 1
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
+
+ import com.google.common.collect.Maps;
+
+ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
+ import net.lax1dude.eaglercraft.v1_8.profile.CapePackets;
+ import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationManager;
+ import net.lax1dude.eaglercraft.v1_8.profile.ServerCapeCache;
+ import net.lax1dude.eaglercraft.v1_8.profile.ServerSkinCache;
+ import net.lax1dude.eaglercraft.v1_8.profile.SkinPackets;
+ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
+ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
+ import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
+ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket;
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
+ import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
+ import net.lax1dude.eaglercraft.v1_8.update.UpdateService;
+ import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
+ import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
@ -67,31 +69,38 @@
~ private final Map<EaglercraftUUID, NetworkPlayerInfo> playerInfoMap = Maps.newHashMap();
> CHANGE 2 : 7 @ 2 : 3
> CHANGE 2 : 12 @ 2 : 3
~ private boolean isIntegratedServer = false;
~ private final EaglercraftRandom avRandomizer = new EaglercraftRandom();
~ private final ServerSkinCache skinCache;
~ private final ServerCapeCache capeCache;
~ private final ServerNotificationManager notifManager;
~ public boolean currentFNAWSkinAllowedState = true;
~ public boolean currentFNAWSkinForcedState = true;
~ private GameProtocolMessageController eaglerMessageController = null;
~ public boolean hasRequestedServerInfo = false;
~ public byte[] cachedServerInfoData = null;
> CHANGE 1 : 2 @ 1 : 2
~ public NetHandlerPlayClient(Minecraft mcIn, GuiScreen parGuiScreen, EaglercraftNetworkManager parNetworkManager,
> INSERT 5 : 9 @ 5
> INSERT 5 : 10 @ 5
+ this.skinCache = new ServerSkinCache(parNetworkManager, mcIn.getTextureManager());
+ this.capeCache = new ServerCapeCache(parNetworkManager, mcIn.getTextureManager());
+ this.skinCache = new ServerSkinCache(this, mcIn.getTextureManager());
+ this.capeCache = new ServerCapeCache(this, mcIn.getTextureManager());
+ this.notifManager = new ServerNotificationManager();
+ this.isIntegratedServer = (parNetworkManager instanceof ClientIntegratedServerNetworkManager)
+ || (parNetworkManager instanceof LANClientNetworkManager);
> INSERT 4 : 6 @ 4
> INSERT 4 : 7 @ 4
+ this.skinCache.destroy();
+ this.capeCache.destroy();
+ this.notifManager.destroy();
> INSERT 2 : 10 @ 2
> INSERT 2 : 51 @ 2
+ public ServerSkinCache getSkinCache() {
+ return this.skinCache;
@ -101,15 +110,61 @@
+ return this.capeCache;
+ }
+
+ public ServerNotificationManager getNotifManager() {
+ return this.notifManager;
+ }
+
+ public GameProtocolMessageController getEaglerMessageController() {
+ return eaglerMessageController;
+ }
+
+ public void setEaglerMessageController(GameProtocolMessageController eaglerMessageController) {
+ this.eaglerMessageController = eaglerMessageController;
+ }
+
+ public GamePluginMessageProtocol getEaglerMessageProtocol() {
+ return eaglerMessageController != null ? eaglerMessageController.protocol : null;
+ }
+
+ public void sendEaglerMessage(GameMessagePacket packet) {
+ try {
+ eaglerMessageController.sendPacket(packet);
+ } catch (IOException e) {
+ logger.error("Failed to send eaglercraft plugin message packet: " + packet);
+ logger.error(e);
+ }
+ }
+
+ public boolean webViewSendHandler(GameMessagePacket pkt) {
+ if (eaglerMessageController == null) {
+ return false;
+ }
+ if (this.gameController.thePlayer == null || this.gameController.thePlayer.sendQueue != this) {
+ logger.error("WebView sent message on a dead handler!");
+ return false;
+ }
+ if (eaglerMessageController.protocol.ver >= 4) {
+ sendEaglerMessage(pkt);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
> DELETE 1 @ 1 : 2
> INSERT 16 : 20 @ 16
> CHANGE 1 : 3 @ 1 : 5
~ this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false,
~ packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty());
> INSERT 11 : 15 @ 11
+ if (VoiceClientController.isClientSupported()) {
+ VoiceClientController.initializeVoiceClient((pkt) -> this.netManager
+ .sendPacket(new C17PacketCustomPayload(VoiceClientController.SIGNAL_CHANNEL, pkt)));
+ VoiceClientController.initializeVoiceClient(this::sendEaglerMessage, eaglerMessageController.protocol.ver);
+ }
+ WebViewOverlayController.setPacketSendCallback(this::webViewSendHandler);
> DELETE 3 @ 3 : 4
@ -191,7 +246,11 @@
> DELETE 5 @ 5 : 6
> DELETE 17 @ 17 : 18
> CHANGE 5 : 6 @ 5 : 6
~ packetIn.getDimensionID(), packetIn.getDifficulty());
> DELETE 11 @ 11 : 12
> DELETE 9 @ 9 : 10
@ -205,7 +264,11 @@
> DELETE 11 @ 11 : 12
> DELETE 22 @ 22 : 23
> INSERT 8 : 9 @ 8
+ tileentitysign.clearProfanityFilterCache();
> DELETE 14 @ 14 : 15
> DELETE 16 @ 16 : 17
@ -262,12 +325,13 @@
~ for (int i = 0, l = lst.size(); i < l; ++i) {
~ S38PacketPlayerListItem.AddPlayerData s38packetplayerlistitem$addplayerdata = lst.get(i);
> CHANGE 1 : 5 @ 1 : 2
> CHANGE 1 : 6 @ 1 : 2
~ EaglercraftUUID uuid = s38packetplayerlistitem$addplayerdata.getProfile().getId();
~ this.playerInfoMap.remove(uuid);
~ this.skinCache.evictSkin(uuid);
~ this.capeCache.evictCape(uuid);
~ ClientUUIDLoadingCache.evict(uuid);
> DELETE 34 @ 34 : 35
@ -357,42 +421,16 @@
> DELETE 11 @ 11 : 13
> INSERT 9 : 43 @ 9
> INSERT 9 : 17 @ 9
+ } else if ("EAG|Skins-1.8".equals(packetIn.getChannelName())) {
+ } else {
+ try {
+ SkinPackets.readPluginMessage(packetIn.getBufferData(), skinCache);
+ eaglerMessageController.handlePacket(packetIn.getChannelName(), packetIn.getBufferData());
+ } catch (IOException e) {
+ logger.error("Couldn't read EAG|Skins-1.8 packet!");
+ logger.error("Couldn't read \"{}\" packet as an eaglercraft plugin message!",
+ packetIn.getChannelName());
+ logger.error(e);
+ }
+ } else if ("EAG|Capes-1.8".equals(packetIn.getChannelName())) {
+ try {
+ CapePackets.readPluginMessage(packetIn.getBufferData(), capeCache);
+ } catch (IOException e) {
+ logger.error("Couldn't read EAG|Capes-1.8 packet!");
+ logger.error(e);
+ }
+ } else if ("EAG|UpdateCert-1.8".equals(packetIn.getChannelName())) {
+ if (EagRuntime.getConfiguration().allowUpdateSvc()) {
+ try {
+ PacketBuffer pb = packetIn.getBufferData();
+ byte[] c = new byte[pb.readableBytes()];
+ pb.readBytes(c);
+ UpdateService.addCertificateToSet(c);
+ } catch (Throwable e) {
+ logger.error("Couldn't process EAG|UpdateCert-1.8 packet!");
+ logger.error(e);
+ }
+ }
+ } else if (VoiceClientController.SIGNAL_CHANNEL.equals(packetIn.getChannelName())) {
+ if (VoiceClientController.isClientSupported()) {
+ VoiceClientController.handleVoiceSignalPacket(packetIn.getBufferData());
+ }
+ } else if ("EAG|FNAWSEn-1.8".equals(packetIn.getChannelName())) {
+ this.currentFNAWSkinAllowedState = packetIn.getBufferData().readBoolean();
+ Minecraft.getMinecraft().getRenderManager().setEnableFNAWSkins(
+ this.currentFNAWSkinAllowedState && Minecraft.getMinecraft().gameSettings.enableFNAWSkins);
> DELETE 1 @ 1 : 2

View File

@ -5,16 +5,29 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 6
> CHANGE 2 : 5 @ 2 : 6
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
~ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
> DELETE 1 @ 1 : 3
> DELETE 10 @ 10 : 13
> INSERT 8 : 9 @ 8
> CHANGE 40 : 41 @ 40 : 41
+ private String gameProfileProfanityFilter;
> DELETE 2 @ 2 : 5
> INSERT 2 : 3 @ 2
+ private IChatComponent displayNameProfanityFilter;
> INSERT 15 : 16 @ 15
+ this.displayNameProfanityFilter = null;
> CHANGE 23 : 24 @ 23 : 24
~ return true;
@ -41,4 +54,39 @@
> DELETE 6 @ 6 : 33
> INSERT 2 : 3 @ 2
+ this.displayNameProfanityFilter = null;
> INSERT 6 : 34 @ 6
+ public IChatComponent getDisplayNameProfanityFilter() {
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
+ if (this.displayName != null) {
+ if (this.displayNameProfanityFilter == null) {
+ this.displayNameProfanityFilter = ProfanityFilter.getInstance()
+ .profanityFilterChatComponent(this.displayName);
+ }
+ return this.displayNameProfanityFilter;
+ } else {
+ return null;
+ }
+ } else {
+ return this.displayName;
+ }
+ }
+
+ public String getGameProfileNameProfanityFilter() {
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
+ if (this.gameProfileProfanityFilter == null) {
+ this.gameProfileProfanityFilter = ProfanityFilter.getInstance()
+ .profanityFilterString(this.gameProfile.getName());
+ }
+ return this.gameProfileProfanityFilter;
+ } else {
+ return this.gameProfile.getName();
+ }
+ }
+
> EOF

View File

@ -14,12 +14,13 @@
~ import net.lax1dude.eaglercraft.v1_8.minecraft.IAcceleratedParticleEngine;
~
> INSERT 1 : 9 @ 1
> INSERT 1 : 10 @ 1
+
+ import com.google.common.collect.Lists;
+ import com.google.common.collect.Maps;
+
+ 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;
@ -43,10 +44,15 @@
> INSERT 2 : 5 @ 2
+ public static final AcceleratedEffectRenderer vanillaAcceleratedParticleRenderer = new AcceleratedEffectRenderer();
+ public IAcceleratedParticleEngine acceleratedParticleRenderer = vanillaAcceleratedParticleRenderer;
+ public IAcceleratedParticleEngine acceleratedParticleRenderer = null;
+
> CHANGE 104 : 106 @ 104 : 105
> INSERT 13 : 15 @ 13
+ this.acceleratedParticleRenderer = EaglercraftGPU.checkInstancingCapable() ? vanillaAcceleratedParticleRenderer
+ : null;
> CHANGE 91 : 93 @ 91 : 92
~ for (int i = 0, l = this.particleEmitters.size(); i < l; ++i) {
~ EntityParticleEmitter entityparticleemitter = this.particleEmitters.get(i);
@ -117,17 +123,20 @@
+ texCoordWidth = 1.0f / blockMap.getWidth();
+ texCoordHeight = 1.0f / blockMap.getHeight();
> INSERT 7 : 11 @ 7
> INSERT 7 : 13 @ 7
+ boolean legacyRenderingHasOccured = false;
+
+ acceleratedParticleRenderer.begin(partialTicks);
+ if (acceleratedParticleRenderer != null) {
+ acceleratedParticleRenderer.begin(partialTicks);
+ }
+
> CHANGE 4 : 9 @ 4 : 5
> CHANGE 4 : 10 @ 4 : 5
~ if (!entityfx.renderAccelerated(acceleratedParticleRenderer, entityIn, partialTicks, f, f4,
~ f1, f2, f3)) {
~ if (acceleratedParticleRenderer == null
~ || !entityfx.renderAccelerated(acceleratedParticleRenderer, entityIn, partialTicks,
~ f, f4, f1, f2, f3)) {
~ entityfx.renderParticle(worldrenderer, entityIn, partialTicks, f, f4, f1, f2, f3);
~ legacyRenderingHasOccured = true;
~ }
@ -142,7 +151,7 @@
~ : (l == 1 ? "TERRAIN_TEXTURE"
~ : (l == 3 ? "ENTITY_PARTICLE_TEXTURE" : "Unknown - " + l));
> CHANGE 6 : 13 @ 6 : 7
> CHANGE 6 : 15 @ 6 : 7
~ if (legacyRenderingHasOccured) {
~ tessellator.draw();
@ -150,6 +159,8 @@
~ worldrenderer.finishDrawing();
~ }
~
~ acceleratedParticleRenderer.draw(texCoordWidth, texCoordHeight);
~ if (acceleratedParticleRenderer != null) {
~ acceleratedParticleRenderer.draw(texCoordWidth, texCoordHeight);
~ }
> EOF

View File

@ -11,10 +11,12 @@
~
~ import java.util.Arrays;
> CHANGE 1 : 3 @ 1 : 2
> CHANGE 1 : 5 @ 1 : 2
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
~
> INSERT 1 : 29 @ 1
@ -23,7 +25,7 @@
+ import com.google.common.base.Predicates;
+
+ import net.lax1dude.eaglercraft.v1_8.Display;
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
@ -47,7 +49,11 @@
+ import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
> CHANGE 10 : 13 @ 10 : 20
> INSERT 6 : 7 @ 6
+ import net.minecraft.client.gui.GuiScreen;
> CHANGE 4 : 7 @ 4 : 14
~ import net.minecraft.client.particle.EntityFX;
~ import net.minecraft.client.renderer.RenderGlobal.ChunkCullAdapter;
@ -137,7 +143,11 @@
> DELETE 1 @ 1 : 8
> CHANGE 111 : 112 @ 111 : 112
> DELETE 6 @ 6 : 7
> DELETE 79 @ 79 : 81
> CHANGE 23 : 24 @ 23 : 24
~ public float getFOVModifier(float partialTicks, boolean parFlag) {
@ -179,7 +189,9 @@
+ }
+
> CHANGE 117 : 118 @ 117 : 118
> DELETE 10 @ 10 : 11
> CHANGE 106 : 107 @ 106 : 107
~ this.lightmapColors[i] = short1 << 24 | j | k << 8 | l << 16;
@ -201,17 +213,45 @@
+ GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
+
> DELETE 23 @ 23 : 28
> DELETE 1 @ 1 : 2
> INSERT 4 : 7 @ 4
> CHANGE 10 : 11 @ 10 : 11
~ boolean flag = Display.isActive() || mc.gameSettings.touchscreen;
> CHANGE 1 : 2 @ 1 : 2
~ && (!this.mc.gameSettings.touchscreen || !PointerInputAbstraction.getVCursorButtonDown(1))) {
> DELETE 7 @ 7 : 14
> INSERT 3 : 6 @ 3
+ if (this.mc.gameSettings.keyBindZoomCamera.isKeyDown()) {
+ f *= 0.7f;
+ }
> DELETE 39 @ 39 : 52
> DELETE 23 @ 23 : 24
> CHANGE 4 : 45 @ 4 : 5
> CHANGE 2 : 3 @ 2 : 3
~ final ScaledResolution scaledresolution = mc.scaledResolution;
> CHANGE 2 : 4 @ 2 : 4
~ final int j1 = PointerInputAbstraction.getVCursorX() * l / this.mc.displayWidth;
~ final int k1 = i1 - PointerInputAbstraction.getVCursorY() * i1 / this.mc.displayHeight - 1;
> DELETE 2 @ 2 : 3
> DELETE 5 @ 5 : 18
> CHANGE 1 : 3 @ 1 : 3
~ final boolean b = !this.mc.gameSettings.hideGUI || this.mc.currentScreen != null;
~ if (b) {
> CHANGE 1 : 14 @ 1 : 2
~ long framebufferAge = this.overlayFramebuffer.getAge();
~ if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
@ -220,10 +260,16 @@
~ GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 0.0f);
~ GlStateManager.clear(16640);
~ GlStateManager.enableOverlayFramebufferBlending();
~ this.mc.ingameGUI.renderGameOverlay(parFloat1);
~ if (b) {
~ this.mc.ingameGUI.renderGameOverlay(parFloat1);
~ }
~ GlStateManager.disableOverlayFramebufferBlending();
~ this.overlayFramebuffer.endRender();
~ }
> CHANGE 1 : 32 @ 1 : 3
~ if (b) {
~ this.setupOverlayRendering();
~ GlStateManager.disableLighting();
~ GlStateManager.enableBlend();
@ -235,7 +281,7 @@
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
~ GlStateManager.enableBlend();
~ GlStateManager.blendFunc(1, 771);
~ GlStateManager.disableAlpha();
~ GlStateManager.enableAlpha();
~ GlStateManager.disableDepth();
~ GlStateManager.depthMask(false);
~ Tessellator tessellator = Tessellator.getInstance();
@ -248,14 +294,45 @@
~ tessellator.draw();
~ GlStateManager.depthMask(true);
~ GlStateManager.enableDepth();
~ GlStateManager.enableAlpha();
~ GlStateManager.disableBlend();
~ if (this.mc.gameSettings.hudPlayer) { // give the player model HUD good fps
~ this.mc.ingameGUI.drawEaglerPlayerOverlay(l - 3,
~ 3 + this.mc.ingameGUI.overlayDebug.playerOffset, parFloat1);
~ }
~ }
> CHANGE 23 : 24 @ 23 : 24
> INSERT 10 : 12 @ 10
+ this.mc.notifRenderer.renderOverlay(j1, k1);
+
> INSERT 2 : 4 @ 2
+ float f = 1.0f;
+ final float[] ff = new float[] { 1.0f };
> CHANGE 2 : 20 @ 2 : 3
~ f = mc.currentScreen.getEaglerScale();
~ int mx, my;
~ if (f == 1.0f) {
~ mx = j1;
~ my = k1;
~ } else {
~ mx = GuiScreen.applyEaglerScale(f, j1, l);
~ my = GuiScreen.applyEaglerScale(f, k1, i1);
~ GlStateManager.pushMatrix();
~ float fff = (1.0f - f) * 0.5f;
~ GlStateManager.translate(fff * l, fff * i1, 0.0f);
~ GlStateManager.scale(f, f, f);
~ }
~ ff[0] = f;
~ this.mc.currentScreen.drawScreen(mx, my, parFloat1);
~ if (f != 1.0f) {
~ GlStateManager.popMatrix();
~ }
> CHANGE 5 : 6 @ 5 : 6
~ return EntityRenderer.this.mc.currentScreen.getClass().getName();
@ -263,16 +340,31 @@
~ return HString.format("Scaled: (%d, %d). Absolute: (%d, %d)",
> CHANGE 6 : 7 @ 6 : 7
> CHANGE 1 : 3 @ 1 : 2
~ Integer.valueOf(PointerInputAbstraction.getVCursorX()),
~ Integer.valueOf(PointerInputAbstraction.getVCursorY()) });
> CHANGE 4 : 5 @ 4 : 5
~ return HString.format("Scaled: (%d, %d). Absolute: (%d, %d). Scale factor of %d",
> INSERT 9 : 11 @ 9
> INSERT 7 : 12 @ 7
+ crashreportcategory.addCrashSectionCallable("Eagler Scale", new Callable<String>() {
+ public String call() throws Exception {
+ return "" + ff[0];
+ }
+ });
> DELETE 2 @ 2 : 3
> INSERT 1 : 3 @ 1
+
+ this.mc.voiceOverlay.drawOverlay();
+ }
> DELETE 6 @ 6 : 8
> DELETE 4 @ 4 : 6
> CHANGE 32 : 33 @ 32 : 33
@ -291,7 +383,7 @@
+ VoiceTagRenderer.clearTagsDrawnSet();
+
> CHANGE 4 : 25 @ 4 : 12
> CHANGE 3 : 24 @ 3 : 12
~ boolean dlights = DynamicLightsStateManager.isDynamicLightsRender();
~ if (dlights) {
@ -315,7 +407,7 @@
~ }
~ }
> CHANGE 1 : 26 @ 1 : 2
> CHANGE 1 : 28 @ 1 : 2
~ if (this.mc.gameSettings.shaders) {
~ try {
@ -330,7 +422,9 @@
~ }
~ mc.effectRenderer.acceleratedParticleRenderer = EffectRenderer.vanillaAcceleratedParticleRenderer;
~ } else {
~ mc.effectRenderer.acceleratedParticleRenderer = EffectRenderer.vanillaAcceleratedParticleRenderer;
~ mc.effectRenderer.acceleratedParticleRenderer = EaglercraftGPU.checkInstancingCapable()
~ ? EffectRenderer.vanillaAcceleratedParticleRenderer
~ : null;
~ if (dlights) {
~ GlStateManager.enableExtensionPipeline();
~ }
@ -343,29 +437,34 @@
~ }
~ }
> INSERT 2 : 6 @ 2
> CHANGE 2 : 5 @ 2 : 3
+ if (fxaa) {
+ EffectPipelineFXAA.end();
+ }
+
~ if (fxaa) {
~ EffectPipelineFXAA.end();
~ }
> INSERT 14 : 18 @ 14
> DELETE 7 @ 7 : 8
> DELETE 3 @ 3 : 4
> INSERT 1 : 5 @ 1
+ boolean isDynamicLights = DynamicLightsStateManager.isDynamicLightsRender();
+ if (isDynamicLights) {
+ DynamicLightsStateManager.setupInverseViewMatrix();
+ }
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 4
> INSERT 6 : 9 @ 6
> INSERT 5 : 8 @ 5
+ TileEntityRendererDispatcher.staticPlayerX = d0; // hack, needed for some eagler stuff
+ TileEntityRendererDispatcher.staticPlayerY = d1;
+ TileEntityRendererDispatcher.staticPlayerZ = d2;
> CHANGE 6 : 9 @ 6 : 8
> DELETE 3 @ 3 : 4
> CHANGE 2 : 5 @ 2 : 4
~ float vigg = this.getFOVModifier(partialTicks, true);
~ GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
@ -375,7 +474,15 @@
~ GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
> INSERT 26 : 27 @ 26
> DELETE 10 @ 10 : 11
> DELETE 3 @ 3 : 4
> DELETE 3 @ 3 : 4
> DELETE 3 @ 3 : 4
> INSERT 3 : 4 @ 3
+ GlStateManager.disableBlend();
@ -385,11 +492,13 @@
+ GlStateManager.shadeModel(7424);
> INSERT 16 : 19 @ 16
> DELETE 5 @ 5 : 6
+ if (isDynamicLights) {
+ GlStateManager.disableExtensionPipeline();
+ }
> CHANGE 9 : 12 @ 9 : 10
~ if (isDynamicLights) {
~ GlStateManager.disableExtensionPipeline();
~ }
> INSERT 2 : 5 @ 2
@ -397,19 +506,23 @@
+ GlStateManager.enableExtensionPipeline();
+ }
> INSERT 8 : 11 @ 8
> CHANGE 8 : 11 @ 8 : 9
+ if (isDynamicLights) {
+ GlStateManager.disableExtensionPipeline();
+ }
~ if (isDynamicLights) {
~ GlStateManager.disableExtensionPipeline();
~ }
> INSERT 3 : 6 @ 3
> INSERT 2 : 5 @ 2
+ if (isDynamicLights) {
+ GlStateManager.enableExtensionPipeline();
+ }
> CHANGE 17 : 25 @ 17 : 18
> DELETE 2 @ 2 : 3
> DELETE 9 @ 9 : 10
> CHANGE 3 : 11 @ 3 : 5
~ if (isDynamicLights) {
~ DynamicLightsStateManager.bindAcceleratedEffectRenderer(effectrenderer);
@ -420,7 +533,15 @@
~ effectrenderer.acceleratedParticleRenderer = null;
~ }
> INSERT 39 : 53 @ 39
> DELETE 5 @ 5 : 6
> DELETE 12 @ 12 : 13
> DELETE 7 @ 7 : 8
> DELETE 3 @ 3 : 4
> INSERT 8 : 22 @ 8
+ private void updateDynamicLightListEagler(float partialTicks) {
+ DynamicLightsStateManager.clearRenderList();
@ -437,7 +558,9 @@
+ }
+
> CHANGE 5 : 6 @ 5 : 6
> DELETE 2 @ 2 : 3
> CHANGE 2 : 3 @ 2 : 3
~ GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
@ -523,7 +646,11 @@
~ EaglerDeferredPipeline.instance.setForwardRenderLightFactors(1.0f, 1.0f, 1.0f, 1.0f);
~ }
> CHANGE 153 : 154 @ 153 : 154
> CHANGE 6 : 7 @ 6 : 7
~ ScaledResolution scaledresolution = mc.scaledResolution;
> CHANGE 146 : 147 @ 146 : 147
~ GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F);
@ -539,7 +666,7 @@
> INSERT 14 : 17 @ 14
+ } else if (!this.mc.gameSettings.fog) {
+ } else if (partialTicks != -1 && !this.mc.gameSettings.fog) {
+ GlStateManager.setFog(2048);
+ GlStateManager.setFogDensity(0.0F);
@ -553,7 +680,7 @@
> DELETE 9 @ 9 : 10
> INSERT 12 : 988 @ 12
> INSERT 12 : 952 @ 12
+
+ private static final Vector4f tmpVec4f_1 = new Vector4f();
@ -570,28 +697,23 @@
+ EaglerDeferredPipeline.renderSuspended();
+ return;
+ }
+ mc.mcProfiler.endStartSection("eaglercraftShaders");
+ EaglerDeferredPipeline.instance.setPartialTicks(partialTicks);
+ eagPartialTicks = partialTicks;
+ EaglerDeferredConfig conf = mc.gameSettings.deferredShaderConf;
+ boolean flag = isDrawBlockOutline();
+ GlStateManager.viewport(0, 0, mc.displayWidth, mc.displayHeight);
+ mc.mcProfiler.startSection("camera");
+ setupCameraTransform(partialTicks, 2);
+ EaglerDeferredPipeline.instance.loadViewMatrix();
+ ActiveRenderInfo.updateRenderInfo(mc.thePlayer, mc.gameSettings.thirdPersonView == 2);
+ mc.mcProfiler.endStartSection("culling");
+ Frustum frustum = new Frustum();
+ Entity entity = mc.getRenderViewEntity();
+ if (entity == null) {
+ entity = mc.thePlayer;
+ }
+ double d0 = EaglerDeferredPipeline.instance.currentRenderX = entity.lastTickPosX
+ + (entity.posX - entity.lastTickPosX) * (double) partialTicks;
+ double d1 = EaglerDeferredPipeline.instance.currentRenderY = entity.lastTickPosY
+ + (entity.posY - entity.lastTickPosY) * (double) partialTicks;
+ double d2 = EaglerDeferredPipeline.instance.currentRenderZ = entity.lastTickPosZ
+ + (entity.posZ - entity.lastTickPosZ) * (double) partialTicks;
+ double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double) partialTicks;
+ double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double) partialTicks;
+ double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double) partialTicks;
+ EaglerDeferredPipeline.instance.setRenderPosGlobal(d0, d1, d2);
+ EaglerDeferredPipeline.instance.updateReprojectionCoordinates(d0, d1, d2);
+ float eyeHeight = entity.getEyeHeight();
+ frustum.setPosition(d0, d1, d2);
@ -603,7 +725,7 @@
+ // }
+ // System.out.println(builder.toString());
+
+ float waveTimer = (float) ((System.currentTimeMillis() % 600000l) * 0.001);
+ float waveTimer = (float) ((EagRuntime.steadyTimeMillis() % 600000l) * 0.001);
+ DeferredStateManager.setWaterWindOffset(0.0f, 0.0f, waveTimer, waveTimer);
+
+ float blockWaveDistX = (float) (d0 - blockWaveOffsetX);
@ -628,7 +750,6 @@
+
+ // if (mc.gameSettings.renderDistanceChunks >= 4) vanilla shows sky not fog
+
+ mc.mcProfiler.endStartSection("terrain_setup");
+ mc.renderGlobal.setupTerrain(entity, (double) partialTicks, frustum, frameCount++, mc.thePlayer.isSpectator());
+
+ // clear some state:
@ -646,11 +767,8 @@
+
+ EaglerDeferredPipeline.instance.beginDrawMainGBufferTerrain();
+
+ mc.mcProfiler.endStartSection("updatechunks");
+ mc.renderGlobal.updateChunks(finishTimeNano);
+
+ mc.mcProfiler.endStartSection("terrain");
+
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.SOLID, (double) partialTicks, 2, entity);
+ GlStateManager.enableAlpha();
+ GlStateManager.alphaFunc(516, 0.5F);
@ -679,20 +797,17 @@
+ NameTagRenderer.doRenderNameTags = true;
+ NameTagRenderer.nameTagsCount = 0;
+ GlStateManager.pushMatrix();
+ mc.mcProfiler.endStartSection("entities");
+ DeferredStateManager.setDefaultMaterialConstants();
+ DeferredStateManager.startUsingEnvMap();
+ mc.renderGlobal.renderEntities(entity, frustum, partialTicks);
+ GlStateManager.matrixMode(5888);
+ GlStateManager.popMatrix();
+ mc.mcProfiler.endStartSection("litParticles");
+ EntityFX.interpPosX = d0;
+ EntityFX.interpPosY = d1;
+ EntityFX.interpPosZ = d2;
+ enableLightmap();
+ GlStateManager.pushMatrix();
+ mc.effectRenderer.renderLitParticles(entity, partialTicks);
+ mc.mcProfiler.endStartSection("gbufferParticles");
+ GlStateManager.matrixMode(5888);
+ GlStateManager.popMatrix();
+ GlStateManager.pushMatrix();
@ -706,9 +821,7 @@
+ DynamicLightManager.setIsRenderingLights(false);
+ NameTagRenderer.doRenderNameTags = false;
+
+ mc.mcProfiler.endStartSection("endDrawMainGBuffer");
+ EaglerDeferredPipeline.instance.endDrawMainGBuffer();
+ mc.mcProfiler.endStartSection("shadowSetup");
+
+ // calculate sun matrix and angle:
+
@ -1113,11 +1226,9 @@
+ }
+ }
+
+ mc.mcProfiler.endStartSection("combineGBuffersAndIlluminate");
+ EaglerDeferredPipeline.instance.combineGBuffersAndIlluminate();
+
+ if (conf.is_rendering_useEnvMap) {
+ mc.mcProfiler.endStartSection("envMap");
+ DeferredStateManager.forwardCallbackHandler = null;
+ EaglerDeferredPipeline.instance.beginDrawEnvMap();
+ GlStateManager.enableCull();
@ -1188,7 +1299,6 @@
+ }
+
+ if (conf.is_rendering_realisticWater) {
+ mc.mcProfiler.endStartSection("realisticWaterMask");
+ EaglerDeferredPipeline.instance.beginDrawRealisticWaterMask();
+ enableLightmap();
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.REALISTIC_WATER, (double) partialTicks, 2, entity);
@ -1196,8 +1306,6 @@
+ EaglerDeferredPipeline.instance.endDrawRealisticWaterMask();
+ }
+
+ mc.mcProfiler.endStartSection("setupShaderFog");
+
+ int dim = mc.theWorld.provider.getDimensionId();
+ float ff;
+ if (dim == 0) {
@ -1262,16 +1370,13 @@
+ DeferredStateManager.setDefaultMaterialConstants();
+
+ if (conf.is_rendering_realisticWater) {
+ mc.mcProfiler.endStartSection("realisticWaterSurface");
+ EaglerDeferredPipeline.instance.beginDrawRealisticWaterSurface();
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.REALISTIC_WATER, (double) partialTicks, 2, entity);
+ EaglerDeferredPipeline.instance.endDrawRealisticWaterSurface();
+ }
+
+ mc.mcProfiler.endStartSection("gbufferFog");
+ EaglerDeferredPipeline.instance.applyGBufferFog();
+
+ mc.mcProfiler.endStartSection("translucentEntities");
+ EaglerDeferredPipeline.instance.beginDrawTranslucentEntities();
+
+ TileEntityRendererDispatcher.staticPlayerX = d0;
@ -1295,14 +1400,11 @@
+ DeferredStateManager.forwardCallbackGBuffer.reset();
+
+ EaglerDeferredPipeline.instance.beginDrawTranslucentBlocks();
+ mc.mcProfiler.endStartSection("translucentBlocks");
+ mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double) partialTicks, 2, entity);
+
+ EaglerDeferredPipeline.instance.beginDrawMainGBufferDestroyProgress();
+
+ mc.mcProfiler.endStartSection("destroyProgress");
+
+ GlStateManager.enableBlend();
+ GlStateManager.tryBlendFuncSeparate(0, 770, 0, 0);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 0.5f);
@ -1314,7 +1416,6 @@
+ EaglerDeferredPipeline.instance.endDrawMainGBufferDestroyProgress();
+
+ if (mc.effectRenderer.hasParticlesInAlphaLayer()) {
+ mc.mcProfiler.endStartSection("transparentParticles");
+ GlStateManager.pushMatrix();
+ mc.effectRenderer.acceleratedParticleRenderer = EaglerDeferredPipeline.instance.forwardEffectRenderer;
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
@ -1330,22 +1431,18 @@
+ }
+
+ if (conf.is_rendering_useEnvMap) {
+ mc.mcProfiler.endStartSection("glassHighlights");
+ EaglerDeferredPipeline.instance.beginDrawGlassHighlights();
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.GLASS_HIGHLIGHTS, (double) partialTicks, 2, entity);
+ EaglerDeferredPipeline.instance.endDrawGlassHighlights();
+ }
+
+ mc.mcProfiler.endStartSection("saveReprojData");
+ EaglerDeferredPipeline.instance.saveReprojData();
+
+ mc.mcProfiler.endStartSection("rainSnow");
+ renderRainSnow(partialTicks);
+
+ GlStateManager.disableBlend();
+
+ if (renderHand) {
+ mc.mcProfiler.endStartSection("renderHandOverlay");
+ EaglerDeferredPipeline.instance.beginDrawHandOverlay();
+ DeferredStateManager.reportForwardRenderObjectPosition2(0.0f, 0.0f, 0.0f);
+ DeferredStateManager.forwardCallbackHandler = DeferredStateManager.forwardCallbackGBuffer;
@ -1371,7 +1468,6 @@
+ GlStateManager.disableAlpha();
+ }
+
+ mc.mcProfiler.endStartSection("endDrawDeferred");
+ EaglerDeferredPipeline.instance.endDrawHDRTranslucent();
+
+ EaglerDeferredPipeline.instance.endDrawDeferred();
@ -1391,11 +1487,9 @@
+ if (!DebugFramebufferView.debugViewShown) {
+ GlStateManager.disableAlpha();
+ if (isDrawBlockOutline()) {
+ this.mc.mcProfiler.endStartSection("outline");
+ mc.renderGlobal.drawSelectionBox(mc.thePlayer, this.mc.objectMouseOver, 0, partialTicks);
+ }
+ GlStateManager.enableAlpha();
+ this.mc.mcProfiler.endStartSection("nameTags");
+ if (NameTagRenderer.nameTagsCount > 0) {
+ enableLightmap();
+ Arrays.sort(NameTagRenderer.nameTagsThisFrame, 0, NameTagRenderer.nameTagsCount, (n1, n2) -> {
@ -1422,11 +1516,8 @@
+ }
+ disableLightmap();
+ GlStateManager.disableLighting();
+ this.mc.mcProfiler.endStartSection("worldBorder");
+ mc.renderGlobal.renderWorldBorder(entity, partialTicks);
+ }
+
+ mc.mcProfiler.endSection();
+ }
+
+ public boolean renderHeldItemLight(EntityLivingBase entityLiving, float mag) {

View File

@ -7,8 +7,10 @@
> DELETE 2 @ 2 : 7
> CHANGE 6 : 10 @ 6 : 7
> CHANGE 6 : 12 @ 6 : 7
~
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
@ -220,7 +222,11 @@
+ boolean light = DynamicLightManager.isRenderingLights();
> CHANGE 27 : 36 @ 27 : 54
> DELETE 6 @ 6 : 7
> DELETE 16 @ 16 : 17
> CHANGE 3 : 12 @ 3 : 30
~ if (!DeferredStateManager.isDeferredRenderer()) {
~ for (int i = 0; i < this.theWorld.weatherEffects.size(); ++i) {
@ -234,7 +240,7 @@
> DELETE 2 @ 2 : 16
> CHANGE 4 : 7 @ 4 : 5
> CHANGE 2 : 5 @ 2 : 5
~ label738: for (int ii = 0, ll = this.renderInfos.size(); ii < ll; ++ii) {
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation = this.renderInfos
@ -246,7 +252,9 @@
+ entity2.renderDynamicLightsEagler(partialTicks, flag2);
+ }
> CHANGE 27 : 30 @ 27 : 28
> DELETE 24 @ 24 : 25
> CHANGE 2 : 5 @ 2 : 3
~ for (int ii = 0, ll = this.renderInfos.size(); ii < ll; ++ii) {
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation1 = this.renderInfos
@ -258,7 +266,9 @@
~ TileEntityRendererDispatcher.instance.renderTileEntity((TileEntity) list1.get(m), partialTicks,
~ -1);
> INSERT 40 : 199 @ 40
> DELETE 36 @ 36 : 37
> INSERT 3 : 154 @ 3
+ public static interface EntityChunkCullAdapter {
+ boolean shouldCull(RenderChunk renderChunk);
@ -271,8 +281,6 @@
+ 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,
@ -289,7 +297,6 @@
+ TileEntityRendererDispatcher.staticPlayerZ = d5;
+ renderManager.setRenderPosition(d3, d4, d5);
+
+ this.theWorld.theProfiler.endStartSection("shadow_entities");
+ for (RenderGlobal.ContainerLocalRenderInformation containerlocalrenderinformation : this.renderInfos) {
+ RenderChunk currentRenderChunk = containerlocalrenderinformation.renderChunk;
+
@ -343,14 +350,11 @@
+ 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,
@ -391,7 +395,6 @@
+ 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) {
@ -414,7 +417,6 @@
+ }
+ }
+ }
+ theWorld.theProfiler.endSection();
+ mc.entityRenderer.disableLightmap();
+ }
+ }
@ -430,7 +432,15 @@
~ return HString.format("C: %d/%d %sD: %d, %s",
> CHANGE 53 : 55 @ 53 : 54
> DELETE 15 @ 15 : 16
> DELETE 15 @ 15 : 16
> DELETE 4 @ 4 : 5
> DELETE 7 @ 7 : 8
> CHANGE 8 : 10 @ 8 : 9
~ || (double) viewEntity.rotationYaw != this.lastViewEntityYaw
~ || this.mc.entityRenderer.currentProjMatrixFOV != this.lastViewProjMatrixFOV;
@ -457,12 +467,16 @@
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation2 = this.renderInfos
~ .get(ii);
> CHANGE 3 : 5 @ 3 : 4
> CHANGE 3 : 5 @ 3 : 5
~ if (this.mc.gameSettings.chunkFix ? this.isPositionInRenderChunkHack(blockpos1, renderchunk4)
~ : this.isPositionInRenderChunk(blockpos, renderchunk4)) {
> INSERT 21 : 31 @ 21
> DELETE 2 @ 2 : 3
> DELETE 7 @ 7 : 8
> INSERT 9 : 19 @ 9
+ /**
+ * WARNING: use only in the above "build near" logic
@ -479,13 +493,23 @@
+ ((ClippingHelperImpl) this.debugFixedClippingHelper).destroy();
> CHANGE 58 : 61 @ 58 : 59
> DELETE 48 @ 48 : 49
> CHANGE 9 : 12 @ 9 : 10
~ for (int ii = 0, ll = this.renderInfos.size(); ii < ll; ++ii) {
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation = this.renderInfos
~ .get(ii);
> INSERT 33 : 70 @ 33
> DELETE 7 @ 7 : 9
> DELETE 2 @ 2 : 3
> DELETE 15 @ 15 : 16
> DELETE 1 @ 1 : 2
> INSERT 3 : 39 @ 3
+ public static interface ChunkCullAdapter {
+ boolean shouldCull(RenderChunk chunk);
@ -518,7 +542,6 @@
+ }
+ }
+ if (i > 0) {
+ this.mc.mcProfiler.endStartSection("render_shadow_" + blockLayerIn);
+ this.renderContainer.renderChunkLayer(blockLayerIn);
+ }
+ return i;
@ -579,10 +602,9 @@
~ ++i;
~ }
> CHANGE 3 : 10 @ 3 : 5
> CHANGE 3 : 9 @ 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();
@ -609,7 +631,11 @@
~ this.displayListEntitiesDirty |= this.renderDispatcher.updateChunks(finishTimeNano);
> DELETE 17 @ 17 : 18
> CHANGE 11 : 12 @ 11 : 12
~ long i = finishTimeNano - EagRuntime.nanoTime();
> DELETE 5 @ 5 : 6
> CHANGE 155 : 159 @ 155 : 156

View File

@ -35,7 +35,11 @@
+ return true;
+ }
> INSERT 21 : 25 @ 21
> CHANGE 17 : 18 @ 17 : 18
~ this.renderLivingLabel(entity, entity.getDisplayNameProfanityFilter().getFormattedText(), x, y, z, 64);
> INSERT 3 : 7 @ 3
+ public static void renderNameAdapter(Render r, Entity e, double x, double y, double z) {
+ r.renderName(e, x, y, z);

View File

@ -62,7 +62,11 @@
~ modelplayer_.bipedRightArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
~ }
> CHANGE 50 : 60 @ 50 : 58
> CHANGE 41 : 42 @ 41 : 42
~ score.getScorePoints() + " " + scoreobjective.getDisplayNameProfanityFilter(), d0, d1, d2, 64);
> CHANGE 8 : 18 @ 8 : 16
~ if (!zombieModel) {
~ float f = 1.0F;

View File

@ -147,7 +147,11 @@
~ for (int i = 0, l = this.layerRenderers.size(); i < l; ++i) {
~ LayerRenderer layerrenderer = this.layerRenderers.get(i);
> INSERT 30 : 34 @ 30
> CHANGE 26 : 27 @ 26 : 27
~ String s = entitylivingbase.getDisplayNameProfanityFilter().getFormattedText();
> INSERT 3 : 7 @ 3
+ if (DeferredStateManager.isInDeferredPass()) {
+ NameTagRenderer.renderNameTag(entitylivingbase, null, d0, d1, d2, -69);

View File

@ -38,7 +38,7 @@
+ hasAllocated = false;
> INSERT 12 : 26 @ 12
> INSERT 12 : 28 @ 12
+
+ /**
@ -49,7 +49,9 @@
+ protected void regenerateIfNotAllocated() {
+ if (this.glTextureId != -1) {
+ if (hasAllocated) {
+ EaglercraftGPU.regenerateTexture(glTextureId);
+ if (EaglercraftGPU.checkTexStorageCapable()) {
+ EaglercraftGPU.regenerateTexture(glTextureId);
+ }
+ }
+ hasAllocated = true;
+ }

View File

@ -43,7 +43,7 @@
~ private final Map<String, EaglerTextureAtlasSprite> mapRegisteredSprites;
~ private final Map<String, EaglerTextureAtlasSprite> mapUploadedSprites;
> CHANGE 3 : 10 @ 3 : 4
> CHANGE 3 : 11 @ 3 : 4
~ private final EaglerTextureAtlasSprite missingImage;
~ private final EaglerTextureAtlasSpritePBR missingImagePBR;
@ -52,6 +52,7 @@
~ private boolean isEaglerPBRMode = false;
~ public int eaglerPBRMaterialTexture = -1;
~ private boolean hasAllocatedEaglerPBRMaterialTexture = false;
~ private boolean isGLES2 = false;
> INSERT 1 : 7 @ 1
@ -67,7 +68,11 @@
~ this.missingImage = new EaglerTextureAtlasSprite("missingno");
~ this.missingImagePBR = new EaglerTextureAtlasSpritePBR("missingno");
> INSERT 11 : 27 @ 11
> INSERT 2 : 3 @ 2
+ this.isGLES2 = EaglercraftGPU.checkOpenGLESVersion() == 200;
> INSERT 9 : 25 @ 9
+ this.missingImagePBR.setIconWidth(16);
+ this.missingImagePBR.setIconHeight(16);
@ -308,8 +313,9 @@
+ regenerateIfNotAllocated();
> INSERT 2 : 23 @ 2
> INSERT 2 : 24 @ 2
+
+ if (isEaglerPBRMode) {
+ if (hasAllocatedEaglerPBRMaterialTexture) {
+ EaglercraftGPU.regenerateTexture(eaglerPBRMaterialTexture);
@ -423,12 +429,21 @@
~ textureatlassprite = EaglerTextureAtlasSprite.makeAtlasSprite(location);
~ }
> CHANGE 15 : 17 @ 15 : 17
> CHANGE 12 : 18 @ 12 : 13
~ if (!isGLES2) {
~ this.mipmapLevels = mipmapLevelsIn;
~ } else {
~ this.mipmapLevels = 0; // Due to limitations in OpenGL ES 2.0 texture completeness, its easier to just
~ // make this zero
~ }
> CHANGE 2 : 4 @ 2 : 4
~ public EaglerTextureAtlasSprite getMissingSprite() {
~ return isEaglerPBRMode ? missingImagePBR : missingImage;
> INSERT 1 : 23 @ 1
> INSERT 1 : 27 @ 1
+
+ public int getWidth() {
@ -444,12 +459,16 @@
+ }
+
+ public void setBlurMipmapDirect0(boolean parFlag, boolean parFlag2) {
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
+ if (isEaglerPBRMode && eaglerPBRMaterialTexture != -1) {
+ GlStateManager.setActiveTexture(33986);
+ GlStateManager.bindTexture(eaglerPBRMaterialTexture);
+ if (isGLES2) {
+ super.setBlurMipmapDirect0(parFlag, false);
+ } else {
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
+ GlStateManager.setActiveTexture(33984);
+ if (isEaglerPBRMode && eaglerPBRMaterialTexture != -1) {
+ GlStateManager.setActiveTexture(33986);
+ GlStateManager.bindTexture(eaglerPBRMaterialTexture);
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
+ GlStateManager.setActiveTexture(33984);
+ }
+ }
+ }

View File

@ -29,7 +29,15 @@
~ public static int uploadTextureImage(int parInt1, ImageData parBufferedImage) {
> CHANGE 120 : 122 @ 120 : 121
> INSERT 112 : 117 @ 112
+ if (!parFlag2 && !EaglercraftGPU.checkNPOTCapable() && ImageData.isNPOTStatic(parInt2, parInt3)) {
+ parFlag2 = true;
+ logger.warn(
+ "An NPOT (non-power-of-two) texture was allocated with GL_REPEAT wrapping in an OpenGL context where that isn't supported, changing to GL_CLAMP_TO_EDGE to avoid errors");
+ }
> CHANGE 8 : 10 @ 8 : 9
~ EaglercraftGPU.glTexSubImage2D(GL_TEXTURE_2D, parInt1, parInt4, parInt5 + k, parInt2, l, GL_RGBA,
~ GL_UNSIGNED_BYTE, dataBuffer);
@ -46,12 +54,14 @@
~ // deleteTexture(parInt1); //TODO: why
> CHANGE 2 : 6 @ 2 : 6
> CHANGE 2 : 8 @ 2 : 6
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, '\u813d', parInt2);
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813a', 0.0F);
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813b', (float) parInt2);
~ // EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u8501', 0.0F);
~ if (EaglercraftGPU.checkOpenGLESVersion() >= 300) {
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, '\u813d', parInt2);
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813a', 0.0F);
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813b', (float) parInt2);
~ // EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u8501', 0.0F);
~ }
> CHANGE 1 : 2 @ 1 : 6
@ -68,7 +78,15 @@
~ int i = parBufferedImage.width;
~ int j = parBufferedImage.height;
> CHANGE 11 : 13 @ 11 : 12
> INSERT 3 : 8 @ 3
+ if (!parFlag2 && !EaglercraftGPU.checkNPOTCapable() && parBufferedImage.isNPOT()) {
+ parFlag2 = true;
+ logger.warn(
+ "An NPOT (non-power-of-two) texture was allocated with GL_REPEAT wrapping in an OpenGL context where that isn't supported, changing to GL_CLAMP_TO_EDGE to avoid errors");
+ }
> CHANGE 8 : 10 @ 8 : 9
~ EaglercraftGPU.glTexSubImage2D(GL_TEXTURE_2D, 0, parInt1, parInt2 + i1, i, j1, GL_RGBA, GL_UNSIGNED_BYTE,
~ dataBuffer);

View File

@ -52,7 +52,11 @@
~ if (emissive) {
~ DeferredStateManager.setEmissionConstant(0.0f);
> INSERT 19 : 23 @ 19
> CHANGE 17 : 18 @ 17 : 18
~ String s = entityitemframe.getDisplayedItem().getDisplayNameProfanityFilter();
> INSERT 1 : 5 @ 1
+ if (DeferredStateManager.isInDeferredPass()) {
+ NameTagRenderer.renderNameTag(entityitemframe, null, d0, d1, d2, -69);

View File

@ -7,22 +7,31 @@
> DELETE 2 @ 2 : 4
> INSERT 4 : 9 @ 4
> INSERT 4 : 10 @ 4
+
+ import com.google.common.collect.Lists;
+ import com.google.common.collect.Maps;
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 2 @ 2 : 3
> DELETE 1 @ 1 : 2
> CHANGE 95 : 98 @ 95 : 98
> CHANGE 72 : 73 @ 72 : 73
~ long i = EagRuntime.steadyTimeMillis();
> CHANGE 22 : 25 @ 22 : 25
~ for (int i = 0, l = list1.size(); i < l; ++i) {
~ arraylist.add("textures/entity/banner/"
~ + ((TileEntityBanner.EnumBannerPattern) list1.get(i)).getPatternName() + ".png");
> CHANGE 10 : 11 @ 10 : 11
~ tileentitybannerrenderer$timedbannertexture.systemTime = EagRuntime.steadyTimeMillis();
> EOF

View File

@ -5,19 +5,14 @@
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 6 @ 3
> INSERT 3 : 5 @ 3
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 4 @ 4 : 6
> CHANGE 19 : 20 @ 19 : 20
~ Calendar calendar = EagRuntime.getLocaleCalendar();
> DELETE 36 @ 36 : 38
> DELETE 56 @ 56 : 58
> INSERT 2 : 4 @ 2

View File

@ -23,19 +23,39 @@
> DELETE 4 @ 4 : 5
> CHANGE 55 : 56 @ 55 : 56
> INSERT 5 : 7 @ 5
+ public static boolean disableProfanityFilter = false;
+
> CHANGE 50 : 51 @ 50 : 51
~ EaglercraftGPU.glNormal3f(0.0F, 0.0F, -1.0F * f3);
> INSERT 3 : 8 @ 3
> CHANGE 3 : 13 @ 3 : 6
+ if (DeferredStateManager.isInDeferredPass()) {
+ _wglDrawBuffers(_GL_COLOR_ATTACHMENT0);
+ GlStateManager.colorMask(true, true, true, false);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+ }
~ if (DeferredStateManager.isInDeferredPass()) {
~ _wglDrawBuffers(_GL_COLOR_ATTACHMENT0);
~ GlStateManager.colorMask(true, true, true, false);
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
~ }
~ IChatComponent[] signText = disableProfanityFilter ? tileentitysign.signText
~ : tileentitysign.getSignTextProfanityFilter();
~ for (int j = 0; j < signText.length; ++j) {
~ if (signText[j] != null) {
~ IChatComponent ichatcomponent = signText[j];
> INSERT 15 : 19 @ 15
> CHANGE 4 : 6 @ 4 : 6
~ fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - signText.length * 5,
~ b0);
> CHANGE 1 : 3 @ 1 : 3
~ fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - signText.length * 5,
~ b0);
> INSERT 3 : 7 @ 3
+ if (DeferredStateManager.isInDeferredPass()) {
+ _wglDrawBuffers(EaglerDeferredPipeline.instance.gBufferDrawBuffers);

View File

@ -34,20 +34,22 @@
~ return EagRuntime
~ .getResourceStream("/assets/" + location.getResourceDomain() + "/" + location.getResourcePath());
> CHANGE 3 : 4 @ 3 : 5
> CHANGE 2 : 5 @ 2 : 5
~ return this.getResourceStream(resourcelocation) != null;
~ public boolean resourceExists(ResourceLocation location) {
~ return EagRuntime
~ .getResourceExists("/assets/" + location.getResourceDomain() + "/" + location.getResourcePath());
> CHANGE 9 : 11 @ 9 : 11
~ return AbstractResourcePack.readMetadata(parIMetadataSerializer,
~ EagRuntime.getResourceStream("pack.mcmeta"), parString1);
~ EagRuntime.getRequiredResourceStream("pack.mcmeta"), parString1);
> DELETE 2 @ 2 : 4
> CHANGE 3 : 5 @ 3 : 6
~ public ImageData getPackImage() throws IOException {
~ return TextureUtil.readBufferedImage(EagRuntime.getResourceStream("pack.png"));
~ return TextureUtil.readBufferedImage(EagRuntime.getRequiredResourceStream("pack.png"));
> EOF

View File

@ -31,7 +31,7 @@
> INSERT 7 : 9 @ 7
+ private static final Set<String> hasShownMissing = new HashSet();
+ private static final Set<String> hasShownMissing = new HashSet<>();
+
> CHANGE 4 : 5 @ 4 : 5

View File

@ -14,7 +14,7 @@
> DELETE 1 @ 1 : 3
> INSERT 3 : 27 @ 3
> INSERT 3 : 31 @ 3
+
+ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
@ -34,12 +34,16 @@
+ import net.lax1dude.eaglercraft.v1_8.EaglerZLIB;
+ import net.lax1dude.eaglercraft.v1_8.HString;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
+ 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;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
+ import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec;
+ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
> DELETE 5 @ 5 : 7
@ -91,7 +95,7 @@
~ public int guiScale = 3;
> INSERT 3 : 18 @ 3
> INSERT 3 : 22 @ 3
+ public boolean hudFps = true;
+ public boolean hudCoords = true;
@ -108,14 +112,26 @@
+ public boolean enableUpdateSvc = true;
+ public boolean enableFNAWSkins = true;
+ public boolean enableDynamicLights = false;
+ public boolean hasHiddenPhishWarning = false;
+ public boolean enableProfanityFilter = false;
+ public boolean hasShownProfanityFilter = false;
+ public float touchControlOpacity = 1.0f;
> CHANGE 1 : 7 @ 1 : 2
> CHANGE 1 : 15 @ 1 : 2
~ public int voiceListenRadius = 16;
~ public float voiceListenVolume = 0.5f;
~ public float voiceSpeakVolume = 0.5f;
~ public int voicePTTKey = 47; // V
~
~ public EnumScreenRecordingCodec screenRecordCodec;
~ public int screenRecordFPS = ScreenRecordingController.DEFAULT_FPS;
~ public int screenRecordResolution = ScreenRecordingController.DEFAULT_RESOLUTION;
~ public int screenRecordAudioBitrate = ScreenRecordingController.DEFAULT_AUDIO_BITRATE;
~ public int screenRecordVideoBitrate = ScreenRecordingController.DEFAULT_VIDEO_BITRATE;
~ public float screenRecordGameVolume = ScreenRecordingController.DEFAULT_GAME_VOLUME;
~ public float screenRecordMicVolume = ScreenRecordingController.DEFAULT_MIC_VOLUME;
~
~ public GameSettings(Minecraft mcIn) {
> CHANGE 4 : 6 @ 4 : 7
@ -133,13 +149,10 @@
~ this.gammaSetting = 1.0F;
~ this.language = EagRuntime.getConfiguration().getDefaultLocale();
> CHANGE 2 : 3 @ 2 : 8
~ GameSettings.Options.RENDER_DISTANCE.setValueMax(18.0F);
> CHANGE 1 : 2 @ 1 : 2
> CHANGE 2 : 4 @ 2 : 10
~ this.renderDistanceChunks = 4;
~ this.screenRecordCodec = ScreenRecordingController.getDefaultCodec();
> DELETE 3 @ 3 : 18
@ -147,55 +160,106 @@
~ : HString.format("%c", new Object[] { Character.valueOf((char) (parInt1 - 256)) })
> DELETE 76 @ 76 : 99
> CHANGE 5 : 7 @ 5 : 6
~ : (parKeyBinding.getKeyCode() < 0
~ ? PointerInputAbstraction.getVCursorButtonDown(parKeyBinding.getKeyCode() + 100)
> CHANGE 71 : 73 @ 71 : 73
~ if (parOptions == GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY) {
~ this.touchControlOpacity = parFloat1;
> DELETE 1 @ 1 : 20
> INSERT 35 : 37 @ 35
+ this.mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
+ I18n.format("resourcePack.load.pleaseWait"));
> DELETE 18 @ 18 : 38
> CHANGE 18 : 20 @ 18 : 20
> DELETE 20 @ 20 : 37
~ if (parOptions == GameSettings.Options.CHAT_COLOR) {
~ this.chatColours = !this.chatColours;
> INSERT 13 : 67 @ 13
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.CHAT_LINKS) {
~ this.chatLinks = !this.chatLinks;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.CHAT_LINKS_PROMPT) {
~ this.chatLinksPrompt = !this.chatLinksPrompt;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.SNOOPER_ENABLED) {
~ this.snooperEnabled = !this.snooperEnabled;
> CHANGE 2 : 5 @ 2 : 4
~ if (parOptions == GameSettings.Options.BLOCK_ALTERNATIVES) {
~ this.allowBlockAlternatives = !this.allowBlockAlternatives;
~ this.mc.renderGlobal.loadRenderers();
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.REDUCED_DEBUG_INFO) {
~ this.reducedDebugInfo = !this.reducedDebugInfo;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.ENTITY_SHADOWS) {
~ this.field_181151_V = !this.field_181151_V;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.HUD_FPS) {
~ this.hudFps = !this.hudFps;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.HUD_COORDS) {
~ this.hudCoords = !this.hudCoords;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.HUD_PLAYER) {
~ this.hudPlayer = !this.hudPlayer;
> CHANGE 2 : 4 @ 2 : 7
~ if (parOptions == GameSettings.Options.HUD_STATS) {
~ this.hudStats = !this.hudStats;
> CHANGE 2 : 4 @ 2 : 5
~ if (parOptions == GameSettings.Options.HUD_WORLD) {
~ this.hudWorld = !this.hudWorld;
> CHANGE 2 : 4 @ 2 : 5
~ if (parOptions == GameSettings.Options.HUD_24H) {
~ this.hud24h = !this.hud24h;
> CHANGE 2 : 4 @ 2 : 5
~ if (parOptions == GameSettings.Options.CHUNK_FIX) {
~ this.chunkFix = !this.chunkFix;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.FOG) {
~ this.fog = !this.fog;
> CHANGE 2 : 4 @ 2 : 4
~ if (parOptions == GameSettings.Options.FXAA) {
~ this.fxaa = (this.fxaa + parInt1) % 3;
> INSERT 2 : 24 @ 2
+ if (parOptions == GameSettings.Options.HUD_FPS) {
+ this.hudFps = !this.hudFps;
+ }
+
+ if (parOptions == GameSettings.Options.HUD_COORDS) {
+ this.hudCoords = !this.hudCoords;
+ }
+
+ if (parOptions == GameSettings.Options.HUD_PLAYER) {
+ this.hudPlayer = !this.hudPlayer;
+ }
+
+ if (parOptions == GameSettings.Options.HUD_STATS) {
+ this.hudStats = !this.hudStats;
+ }
+
+ if (parOptions == GameSettings.Options.HUD_WORLD) {
+ this.hudWorld = !this.hudWorld;
+ }
+
+ if (parOptions == GameSettings.Options.HUD_24H) {
+ this.hud24h = !this.hud24h;
+ }
+
+ if (parOptions == GameSettings.Options.CHUNK_FIX) {
+ this.chunkFix = !this.chunkFix;
+ }
+
+ if (parOptions == GameSettings.Options.FOG) {
+ this.fog = !this.fog;
+ }
+
+ if (parOptions == GameSettings.Options.FXAA) {
+ this.fxaa = (this.fxaa + parInt1) % 3;
+ }
+
+ if (parOptions == GameSettings.Options.FULLSCREEN) {
+ this.mc.toggleFullscreen();
+ }
@ -214,16 +278,20 @@
+ this.mc.renderGlobal.loadRenderers();
+ }
+
+ if (parOptions == GameSettings.Options.EAGLER_PROFANITY_FILTER) {
+ this.enableProfanityFilter = !this.enableProfanityFilter;
+ }
+
> CHANGE 23 : 24 @ 23 : 34
> CHANGE 23 : 26 @ 23 : 34
~ : 0.0F)))))))))));
~ : (parOptions == GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY
~ ? this.touchControlOpacity
~ : 0.0F))))))))))));
> DELETE 20 @ 20 : 26
> DELETE 20 @ 20 : 30
> DELETE 2 @ 2 : 4
> INSERT 8 : 32 @ 8
> INSERT 8 : 34 @ 8
+ case HUD_COORDS:
+ return this.hudCoords;
@ -249,6 +317,8 @@
+ return this.enableVsync;
+ case EAGLER_DYNAMIC_LIGHTS:
+ return this.enableDynamicLights;
+ case EAGLER_PROFANITY_FILTER:
+ return this.enableProfanityFilter;
> CHANGE 43 : 46 @ 43 : 47
@ -264,7 +334,7 @@
~ .calculateChatboxHeight(
> CHANGE 2 : 21 @ 2 : 36
> CHANGE 2 : 25 @ 2 : 36
~ : (parOptions == GameSettings.Options.CHAT_WIDTH
~ ? s + GuiNewChat
@ -284,7 +354,11 @@
~ : s + (int) (f
~ * 100.0F)
~ + "%")
~ : "yee"))))))))))));
~ : (parOptions == GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY
~ ? (s + (int) (f
~ * 100.0F)
~ + "%")
~ : "yee")))))))))))));
> DELETE 11 @ 11 : 19
@ -354,7 +428,9 @@
> DELETE 3 @ 3 : 7
> CHANGE 52 : 54 @ 52 : 54
> DELETE 12 @ 12 : 16
> CHANGE 36 : 38 @ 36 : 38
~ if (astring[0].equals("forceUnicodeFont")) {
~ this.forceUnicodeFont = astring[1].equals("true");
@ -459,7 +535,7 @@
~ for (EnumPlayerModelParts enumplayermodelparts : EnumPlayerModelParts._VALUES) {
> INSERT 4 : 14 @ 4
> INSERT 4 : 66 @ 4
+
+ if (astring[0].equals("enableFNAWSkins")) {
@ -470,17 +546,79 @@
+ this.enableDynamicLights = astring[1].equals("true");
+ }
+
+ if (astring[0].equals("hasHiddenPhishWarning")) {
+ this.hasHiddenPhishWarning = astring[1].equals("true");
+ }
+
+ if (astring[0].equals("enableProfanityFilter")) {
+ this.enableProfanityFilter = astring[1].equals("true");
+ }
+
+ if (astring[0].equals("hasShownProfanityFilter")) {
+ this.hasShownProfanityFilter = astring[1].equals("true");
+ }
+
+ if (astring[0].equals("screenRecordCodec")) {
+ EnumScreenRecordingCodec codec = EnumScreenRecordingCodec.valueOf(astring[1]);
+ if (!ScreenRecordingController.codecs.contains(codec)) {
+ throw new IllegalStateException("Selected codec is not supported: " + codec.name);
+ }
+ screenRecordCodec = codec;
+ }
+
+ if (astring[0].equals("screenRecordFPS")) {
+ screenRecordFPS = Integer.parseInt(astring[1]);
+ }
+
+ if (astring[0].equals("screenRecordFPS")) {
+ screenRecordFPS = Integer.parseInt(astring[1]);
+ }
+
+ if (astring[0].equals("screenRecordResolution")) {
+ screenRecordResolution = Integer.parseInt(astring[1]);
+ }
+
+ if (astring[0].equals("screenRecordAudioBitrate")) {
+ screenRecordAudioBitrate = Integer.parseInt(astring[1]);
+ }
+
+ if (astring[0].equals("screenRecordVideoBitrate")) {
+ screenRecordVideoBitrate = Integer.parseInt(astring[1]);
+ }
+
+ if (astring[0].equals("screenRecordGameVolume")) {
+ screenRecordGameVolume = parseFloat(astring[1]);
+ }
+
+ if (astring[0].equals("screenRecordMicVolume")) {
+ screenRecordMicVolume = parseFloat(astring[1]);
+ }
+
+ if (astring[0].equals("touchControlOpacity")) {
+ touchControlOpacity = parseFloat(astring[1]);
+ }
+
+ deferredShaderConf.readOption(astring[0], astring[1]);
> CHANGE 6 : 13 @ 6 : 7
> CHANGE 6 : 23 @ 6 : 7
~
~ Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
~ VoiceClientController.setVoiceListenVolume(voiceListenVolume);
~ VoiceClientController.setVoiceSpeakVolume(voiceSpeakVolume);
~ VoiceClientController.setVoiceProximity(voiceListenRadius);
~ ScreenRecordingController.setGameVolume(screenRecordGameVolume);
~ ScreenRecordingController.setMicrophoneVolume(screenRecordMicVolume);
~ if (this.mc.getRenderManager() != null)
~ this.mc.getRenderManager().setEnableFNAWSkins(this.enableFNAWSkins);
~ if (this.shaders && !EaglerDeferredPipeline.isSupported()) {
~ logger.error("Setting shaders to false because they are not supported");
~ this.shaders = false;
~ }
~ if (this.enableDynamicLights && !DynamicLightsStateManager.isSupported()) {
~ logger.error("Setting dynamic lights to false because they are not supported");
~ this.enableDynamicLights = false;
~ }
> CHANGE 1 : 3 @ 1 : 2
@ -519,9 +657,11 @@
~ printwriter.println("enableVsyncEag:" + this.enableVsync);
> DELETE 13 @ 13 : 24
> DELETE 3 @ 3 : 4
> INSERT 5 : 22 @ 5
> DELETE 9 @ 9 : 20
> INSERT 5 : 35 @ 5
+ printwriter.println("hudFps:" + this.hudFps);
+ printwriter.println("hudWorld:" + this.hudWorld);
@ -540,6 +680,19 @@
+ printwriter.println("voicePTTKey:" + this.voicePTTKey);
+ printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
+ printwriter.println("enableDynamicLights:" + this.enableDynamicLights);
+ printwriter.println("hasHiddenPhishWarning:" + this.hasHiddenPhishWarning);
+ printwriter.println("enableProfanityFilter:" + this.enableProfanityFilter);
+ printwriter.println("hasShownProfanityFilter:" + this.hasShownProfanityFilter);
+ if (screenRecordCodec != null) {
+ printwriter.println("screenRecordCodec:" + this.screenRecordCodec);
+ }
+ printwriter.println("screenRecordFPS:" + this.screenRecordFPS);
+ printwriter.println("screenRecordResolution:" + this.screenRecordResolution);
+ printwriter.println("screenRecordAudioBitrate:" + this.screenRecordAudioBitrate);
+ printwriter.println("screenRecordVideoBitrate:" + this.screenRecordVideoBitrate);
+ printwriter.println("screenRecordGameVolume:" + this.screenRecordGameVolume);
+ printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
+ printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
> CHANGE 5 : 8 @ 5 : 6
@ -568,11 +721,7 @@
> DELETE 2 @ 2 : 3
> CHANGE 5 : 6 @ 5 : 6
~ : (parSoundCategory == SoundCategory.VOICE ? 0.0F : 1.0F);
> CHANGE 16 : 17 @ 16 : 17
> CHANGE 22 : 23 @ 22 : 23
~ Math.max(this.renderDistanceChunks, 2), this.chatVisibility, this.chatColours, i));
@ -591,12 +740,9 @@
~ RENDER_DISTANCE("options.renderDistance", true, false, 1.0F, 18.0F, 1.0F),
> CHANGE 8 : 10 @ 8 : 12
> DELETE 8 @ 8 : 10
~ TOUCHSCREEN("options.touchscreen", false, true), CHAT_SCALE("options.chat.scale", true, false),
~ CHAT_WIDTH("options.chat.width", true, false), CHAT_HEIGHT_FOCUSED("options.chat.height.focused", true, false),
> CHANGE 14 : 22 @ 14 : 15
> CHANGE 16 : 26 @ 16 : 17
~ ENTITY_SHADOWS("options.entityShadows", false, true), HUD_FPS("options.hud.fps", false, true),
~ HUD_COORDS("options.hud.coords", false, true), HUD_STATS("options.hud.stats", false, true),
@ -605,6 +751,8 @@
~ FOG("options.fog", false, true), FXAA("options.fxaa", false, false),
~ FULLSCREEN("options.fullscreen", false, true),
~ FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
~ EAGLER_VSYNC("options.vsync", false, true), EAGLER_DYNAMIC_LIGHTS("options.dynamicLights", false, true);
~ EAGLER_VSYNC("options.vsync", false, true), EAGLER_DYNAMIC_LIGHTS("options.dynamicLights", false, true),
~ EAGLER_PROFANITY_FILTER("options.profanityFilterButton", false, true),
~ EAGLER_TOUCH_CONTROL_OPACITY("options.touchControlOpacity", true, false);
> EOF

View File

@ -5,21 +5,23 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 3 : 9 @ 3 : 5
> CHANGE 3 : 10 @ 3 : 5
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
~ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
~
> INSERT 1 : 2 @ 1
+
> INSERT 8 : 9 @ 8
> INSERT 8 : 10 @ 8
+ import net.minecraft.client.Minecraft;
+ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
> DELETE 6 @ 6 : 9
@ -36,7 +38,17 @@
~ this.rand = new EaglercraftRandom();
> CHANGE 294 : 296 @ 294 : 295
> DELETE 100 @ 100 : 101
> DELETE 11 @ 11 : 12
> DELETE 32 @ 32 : 34
> DELETE 35 @ 35 : 36
> DELETE 44 @ 44 : 45
> CHANGE 66 : 68 @ 66 : 67
~ List<AxisAlignedBB> list1 = this.worldObj.getCollidingBoundingBoxes(this,
~ this.getEntityBoundingBox().addCoord(x, y, z));
@ -95,7 +107,11 @@
~ for (int i = 0, l = list.size(); i < l; ++i) {
~ y = list.get(i).calculateYOffset(this.getEntityBoundingBox(), y);
> CHANGE 347 : 353 @ 347 : 348
> DELETE 11 @ 11 : 13
> DELETE 93 @ 93 : 95
> CHANGE 239 : 245 @ 239 : 240
~ int i = 0;
~ if (DynamicLightsStateManager.isDynamicLightsRender()) {
@ -135,15 +151,74 @@
~ for (AxisAlignedBB axisalignedbb : (List<AxisAlignedBB>) list) {
> CHANGE 256 : 257 @ 256 : 257
> INSERT 229 : 242 @ 229
+ public String getNameProfanityFilter() {
+ if (this.hasCustomName()) {
+ return this.getCustomNameTagProfanityFilter();
+ } else {
+ String s = EntityList.getEntityString(this);
+ if (s == null) {
+ s = "generic";
+ }
+
+ return StatCollector.translateToLocal("entity." + s + ".name");
+ }
+ }
+
> CHANGE 27 : 28 @ 27 : 28
~ return HString.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]",
> CHANGE 121 : 122 @ 121 : 122
> DELETE 26 @ 26 : 27
> DELETE 12 @ 12 : 13
> DELETE 1 @ 1 : 2
> DELETE 12 @ 12 : 13
> DELETE 2 @ 2 : 3
> CHANGE 63 : 64 @ 63 : 64
~ public EaglercraftUUID getUniqueID() {
> INSERT 151 : 205 @ 151
> INSERT 14 : 21 @ 14
+ public IChatComponent getDisplayNameProfanityFilter() {
+ ChatComponentText chatcomponenttext = new ChatComponentText(this.getNameProfanityFilter());
+ chatcomponenttext.getChatStyle().setChatHoverEvent(this.getHoverEvent());
+ chatcomponenttext.getChatStyle().setInsertion(this.getUniqueID().toString());
+ return chatcomponenttext;
+ }
+
> INSERT 8 : 28 @ 8
+ private String lastNameTagForFilter = null;
+ private String lastFilteredNameTagForFilter = null;
+
+ public String getCustomNameTagProfanityFilter() {
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
+ String str = getCustomNameTag();
+ if (str != null) {
+ if (!str.equals(lastNameTagForFilter)) {
+ lastNameTagForFilter = str;
+ lastFilteredNameTagForFilter = ProfanityFilter.getInstance().profanityFilterString(str);
+ }
+ return lastFilteredNameTagForFilter;
+ } else {
+ return null;
+ }
+ } else {
+ return getCustomNameTag();
+ }
+ }
+
> INSERT 129 : 183 @ 129
+
+ public void renderDynamicLightsEagler(float partialTicks, boolean isInFrustum) {

View File

@ -13,14 +13,47 @@
> DELETE 1 @ 1 : 8
> CHANGE 316 : 320 @ 316 : 318
> CHANGE 56 : 58 @ 56 : 59
~ this.tasks = new EntityAITasks();
~ this.targetTasks = new EntityAITasks();
> DELETE 76 @ 76 : 77
> DELETE 4 @ 4 : 6
> DELETE 171 @ 171 : 172
> CHANGE 2 : 6 @ 2 : 4
~ List<EntityItem> lst = this.worldObj.getEntitiesWithinAABB(EntityItem.class,
~ this.getEntityBoundingBox().expand(1.0D, 0.0D, 1.0D));
~ for (int i = 0, l = lst.size(); i < l; ++i) {
~ EntityItem entityitem = lst.get(i);
> CHANGE 497 : 499 @ 497 : 498
> DELETE 5 @ 5 : 7
> DELETE 98 @ 98 : 99
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 4
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 3
> CHANGE 365 : 367 @ 365 : 366
~ EaglercraftUUID uuid = new EaglercraftUUID(this.leashNBTTag.getLong("UUIDMost"),
~ this.leashNBTTag.getLong("UUIDLeast"));

View File

@ -25,7 +25,11 @@
~ private static final EaglercraftUUID sprintingSpeedBoostModifierUUID = EaglercraftUUID
~ .fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
> CHANGE 264 : 265 @ 264 : 265
> DELETE 120 @ 120 : 121
> DELETE 88 @ 88 : 89
> CHANGE 54 : 55 @ 54 : 55
~ public EaglercraftRandom getRNG() {
@ -40,7 +44,27 @@
~ for (int i = 0; i < inv.length; ++i) {
~ ItemStack itemstack1 = inv[i];
> INSERT 1254 : 1277 @ 1254
> DELETE 941 @ 941 : 942
> DELETE 1 @ 1 : 3
> DELETE 33 @ 33 : 34
> DELETE 62 @ 62 : 63
> DELETE 6 @ 6 : 7
> DELETE 1 @ 1 : 2
> DELETE 2 @ 2 : 4
> DELETE 13 @ 13 : 15
> DELETE 4 @ 4 : 6
> DELETE 3 @ 3 : 5
> INSERT 173 : 196 @ 173
+
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
@ -59,7 +83,7 @@
+ if (itm != null && itm.stackSize > 0) {
+ Item item = itm.getItem();
+ if (item != null) {
+ float f2 = item.getHeldItemBrightnessEagler();
+ float f2 = item.getHeldItemBrightnessEagler(itm);
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
+ }
+ }

View File

@ -5,19 +5,25 @@
# Version: 1.0
# Author: lax1dude
> DELETE 5 @ 5 : 6
> CHANGE 1 : 3 @ 1 : 3
> CHANGE 5 : 7 @ 5 : 9
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
> CHANGE 84 : 86 @ 84 : 86
> DELETE 5 @ 5 : 6
> DELETE 3 @ 3 : 7
> DELETE 24 @ 24 : 25
> CHANGE 43 : 45 @ 43 : 48
~ for (int i = 0, l = this.executingTaskEntries.size(); i < l; ++i) {
~ this.executingTaskEntries.get(i).action.updateTask();
> CHANGE 11 : 13 @ 11 : 12
> DELETE 1 @ 1 : 3
> CHANGE 8 : 10 @ 8 : 9
~ for (int i = 0, l = this.taskEntries.size(); i < l; ++i) {
~ EntityAITasks.EntityAITaskEntry entityaitasks$entityaitaskentry = this.taskEntries.get(i);

View File

@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 27 @ 27 : 28
> DELETE 1 @ 1 : 2
> EOF

View File

@ -43,7 +43,7 @@
+ if (itm != null && itm.stackSize > 0) {
+ Item item = itm.getItem();
+ if (item != null) {
+ float f2 = item.getHeldItemBrightnessEagler() * 0.75f;
+ float f2 = item.getHeldItemBrightnessEagler(itm) * 0.75f;
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
+ }
+ }

View File

@ -31,7 +31,7 @@
+ if (itm != null && itm.stackSize > 0) {
+ Item item = itm.getItem();
+ if (item != null) {
+ float f2 = item.getHeldItemBrightnessEagler() * 0.75f;
+ float f2 = item.getHeldItemBrightnessEagler(itm) * 0.75f;
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
+ }
+ }

View File

@ -25,14 +25,32 @@
~ this.dataWatcher.addObject(20, Integer.valueOf(0));
~ this.dataWatcher.addObject(21, Integer.valueOf(6));
> CHANGE 198 : 202 @ 198 : 200
> DELETE 101 @ 101 : 102
> DELETE 32 @ 32 : 34
> CHANGE 62 : 66 @ 62 : 64
~ List<Entity> lst = this.worldObj.getEntitiesWithinAABBExcludingEntity(this,
~ this.getEntityBoundingBox().expand(0.20000000298023224D, 0.0D, 0.20000000298023224D));
~ for (int i = 0, m = lst.size(); i < m; ++i) {
~ Entity entity = lst.get(i);
> CHANGE 585 : 588 @ 585 : 588
> INSERT 533 : 537 @ 533
+ public String getNameProfanityFilter() {
+ return getName();
+ }
+
> INSERT 23 : 27 @ 23
+ public IChatComponent getDisplayNameProfanityFilter() {
+ return getDisplayName();
+ }
+
> CHANGE 29 : 32 @ 29 : 32
~ EntityMinecart.EnumMinecartType[] types = values();
~ for (int i = 0; i < types.length; ++i) {

View File

@ -19,7 +19,22 @@
> DELETE 12 @ 12 : 13
> CHANGE 381 : 385 @ 381 : 383
> INSERT 99 : 107 @ 99
+ return getNameImpl(false);
+ }
+
+ public String getNameProfanityFilter() {
+ return getNameImpl(true);
+ }
+
+ private String getNameImpl(boolean filter) {
> CHANGE 1 : 2 @ 1 : 2
~ return filter ? this.getCustomNameTagProfanityFilter() : this.getCustomNameTag();
> CHANGE 280 : 284 @ 280 : 282
~ List<Entity> lst = this.worldObj.getEntitiesInAABBexcluding(entityIn,
~ entityIn.getEntityBoundingBox().addCoord(distance, distance, distance), horseBreedingSelector);

View File

@ -7,4 +7,21 @@
> DELETE 20 @ 20 : 23
> CHANGE 215 : 216 @ 215 : 217
~ return getNameImpl(false);
> INSERT 2 : 12 @ 2
+ public String getNameProfanityFilter() {
+ return getNameImpl(true);
+ }
+
+ private String getNameImpl(boolean filter) {
+ return this.hasCustomName() ? (filter ? this.getCustomNameTagProfanityFilter() : this.getCustomNameTag())
+ : (this.isTamed() ? StatCollector.translateToLocal("entity.Cat.name")
+ : (filter ? super.getNameProfanityFilter() : super.getName()));
+ }
+
> EOF

View File

@ -5,8 +5,10 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 3
> CHANGE 2 : 6 @ 2 : 3
~ import org.apache.commons.lang3.StringUtils;
~
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
@ -48,8 +50,19 @@
~ s = nbttagcompound.getString("Owner");
~ }
> CHANGE 83 : 84 @ 83 : 84
> INSERT 82 : 86 @ 82
~ EaglercraftUUID uuid = EaglercraftUUID.fromString(this.getOwnerId());
+ String ownerName = this.getOwnerId();
+ if (StringUtils.isEmpty(ownerName)) {
+ return null;
+ }
> CHANGE 1 : 2 @ 1 : 2
~ EaglercraftUUID uuid = EaglercraftUUID.fromString(ownerName);
> CHANGE 2 : 3 @ 2 : 3
~ return this.worldObj.getPlayerEntityByName(ownerName);
> EOF

View File

@ -257,7 +257,23 @@
~ for (int k = 0, l = aentityvillager$itradelist2.size(); k < l; ++k) {
~ aentityvillager$itradelist2.get(k).modifyMerchantRecipeList(this.buyingList, this.rand);
> CHANGE 236 : 237 @ 236 : 237
> CHANGE 9 : 18 @ 9 : 10
~ return getDisplayNameImpl(false);
~ }
~
~ public IChatComponent getDisplayNameProfanityFilter() {
~ return getDisplayNameImpl(true);
~ }
~
~ private IChatComponent getDisplayNameImpl(boolean filter) {
~ String s = filter ? this.getCustomNameTagProfanityFilter() : this.getCustomNameTag();
> CHANGE 53 : 54 @ 53 : 54
~ return filter ? super.getDisplayNameProfanityFilter() : super.getDisplayName();
> CHANGE 172 : 173 @ 172 : 173
~ public void modifyMerchantRecipeList(MerchantRecipeList recipeList, EaglercraftRandom random) {

View File

@ -24,7 +24,19 @@
~ public abstract class EntityPlayer extends EntityLivingBase implements ICommandSender {
> CHANGE 458 : 459 @ 458 : 459
> INSERT 77 : 86 @ 77
+ public boolean getItemShouldUseOnTouchEagler() {
+ if (itemInUse != null) {
+ return itemInUse.getItem().shouldUseOnTouchEagler(itemInUse);
+ } else {
+ ItemStack st = getHeldItem();
+ return st != null && st.getItem().shouldUseOnTouchEagler(st);
+ }
+ }
+
> CHANGE 381 : 382 @ 381 : 382
~ Collection<ScoreObjective> collection = this.getWorldScoreboard()

View File

@ -14,8 +14,10 @@
> DELETE 51 @ 51 : 52
> CHANGE 22 : 24 @ 22 : 24
> CHANGE 22 : 26 @ 22 : 24
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
@ -23,9 +25,14 @@
+
> INSERT 24 : 25 @ 24
> CHANGE 18 : 19 @ 18 : 19
~ private long playerLastActiveTime = EagRuntime.steadyTimeMillis();
> INSERT 5 : 7 @ 5
+ public byte[] updateCertificate = null;
+ public EaglercraftUUID clientBrandUUID = null;
> CHANGE 87 : 88 @ 87 : 88

View File

@ -28,11 +28,15 @@
~ protected static EaglercraftRandom itemRand = new EaglercraftRandom();
> INSERT 884 : 888 @ 884
> INSERT 884 : 892 @ 884
+
+ public float getHeldItemBrightnessEagler() {
+ public float getHeldItemBrightnessEagler(ItemStack itemStack) {
+ return 0.0f;
+ }
+
+ public boolean shouldUseOnTouchEagler(ItemStack itemStack) {
+ return getItemUseAction(itemStack) != EnumAction.NONE;
+ }
> EOF

View File

@ -10,7 +10,7 @@
> INSERT 120 : 124 @ 120
+
+ public float getHeldItemBrightnessEagler() {
+ public float getHeldItemBrightnessEagler(ItemStack itemStack) {
+ return this.block.getLightValue() * 0.06667f;
+ }

View File

@ -7,4 +7,11 @@
> DELETE 5 @ 5 : 7
> INSERT 22 : 26 @ 22
+
+ public boolean shouldUseOnTouchEagler(ItemStack itemStack) {
+ return true;
+ }
> EOF

View File

@ -7,4 +7,11 @@
> DELETE 8 @ 8 : 10
> INSERT 134 : 138 @ 134
+
+ public boolean shouldUseOnTouchEagler(ItemStack itemStack) {
+ return true;
+ }
> EOF

View File

@ -22,4 +22,11 @@
~ --itemstack.stackSize;
~ }
> INSERT 9 : 13 @ 9
+
+ public boolean shouldUseOnTouchEagler(ItemStack itemStack) {
+ return true;
+ }
> EOF

View File

@ -7,4 +7,11 @@
> DELETE 5 @ 5 : 7
> INSERT 25 : 29 @ 25
+
+ public boolean shouldUseOnTouchEagler(ItemStack itemStack) {
+ return true;
+ }
> EOF

View File

@ -11,4 +11,11 @@
+
> INSERT 45 : 49 @ 45
+
+ public boolean shouldUseOnTouchEagler(ItemStack itemStack) {
+ return true;
+ }
> EOF

Some files were not shown because too many files have changed in this diff Show More