Update #51 - Protocol and FPS improvements, better workspace

This commit is contained in:
lax1dude
2025-05-18 15:01:06 -07:00
parent 71c61e33fd
commit 325a6826bf
1191 changed files with 9266 additions and 187695 deletions

View File

@ -1,4 +1,4 @@
# 148 files to delete:
# 149 files to delete:
net/minecraft/client/renderer/VertexBufferUploader.java
net/minecraft/realms/DisconnectedRealmsScreen.java
net/minecraft/client/stream/Metadata.java
@ -14,6 +14,7 @@ net/minecraft/command/server/CommandSaveAll.java
net/minecraft/realms/RealmsVertexFormat.java
net/minecraft/network/NettyCompressionDecoder.java
net/minecraft/profiler/PlayerUsageSnooper.java
net/minecraft/util/MinecraftError.java
net/minecraft/command/server/CommandPublishLocalServer.java
net/minecraft/command/CommandDebug.java
net/minecraft/client/renderer/chunk/VboChunkFactory.java

View File

@ -18,23 +18,29 @@
~ import net.minecraft.client.resources.I18n;
> DELETE 9 @ 9 : 11
> DELETE 1 @ 1 : 2
> DELETE 7 @ 7 : 9
> DELETE 3 @ 3 : 6
> CHANGE 22 : 24 @ 22 : 32
> CHANGE 14 : 15 @ 14 : 19
~ if (this.mc.running) {
> CHANGE 3 : 5 @ 3 : 13
~ GlStateManager.ortho(0.0D, mc.scaledResolution.getScaledWidth_double(),
~ mc.scaledResolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
> INSERT 19 : 37 @ 19
> CHANGE 7 : 8 @ 7 : 12
~ if (this.mc.running) {
> INSERT 7 : 21 @ 7
+ public void eaglerShow(String line1, String line2) {
+ if (!this.mc.running) {
+ if (!this.field_73724_e) {
+ throw new MinecraftError();
+ }
+ } else {
+ if (this.mc.running) {
+ this.systemTime = 0L;
+ this.currentlyDisplayedText = line1;
+ this.message = line2;
@ -48,7 +54,11 @@
+ }
+
> CHANGE 9 : 10 @ 9 : 10
> CHANGE 1 : 2 @ 1 : 6
~ if (this.mc.running) {
> CHANGE 3 : 4 @ 3 : 4
~ ScaledResolution scaledresolution = mc.scaledResolution;

View File

@ -18,14 +18,13 @@
> DELETE 1 @ 1 : 4
> CHANGE 1 : 75 @ 1 : 4
> CHANGE 1 : 76 @ 1 : 4
~
~ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
~ import net.lax1dude.eaglercraft.v1_8.Display;
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EagUtils;
~ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.IOUtils;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
@ -43,6 +42,7 @@
~ import net.lax1dude.eaglercraft.v1_8.futures.FutureTask;
~ import net.lax1dude.eaglercraft.v1_8.futures.ListenableFuture;
~ import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
~ import net.lax1dude.eaglercraft.v1_8.internal.ContextLostError;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebRTC;
@ -76,6 +76,7 @@
~ import net.lax1dude.eaglercraft.v1_8.socket.AddressResolver;
~ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
~ import net.lax1dude.eaglercraft.v1_8.socket.RateLimitTracker;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.StateFlags;
~ import net.lax1dude.eaglercraft.v1_8.sp.IntegratedServerState;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.SkullCommand;
@ -139,7 +140,9 @@
+ import net.minecraft.util.ChatStyle;
+ import net.minecraft.util.EnumChatFormatting;
> INSERT 7 : 8 @ 7
> DELETE 3 @ 3 : 4
> INSERT 3 : 4 @ 3
+ import net.minecraft.util.MovingObjectPosition.MovingObjectType;
@ -256,12 +259,14 @@
~ this.runGameLoop();
> DELETE 4 @ 4 : 21
> CHANGE 4 : 5 @ 4 : 21
~ return;
> CHANGE 1 : 14 @ 1 : 3
~ } catch (MinecraftError var12) {
~ // ??
~ } catch (ContextLostError err) {
~ throw err;
~ } catch (ReportedException reportedexception) {
~ this.addGraphicsAndWorldToCrashReport(reportedexception.getCrashReport());
~ logger.fatal("Reported exception thrown!", reportedexception);
@ -555,8 +560,10 @@
~ long i = EagRuntime.nanoTime();
~ if (Display.isCloseRequested()) {
> INSERT 3 : 6 @ 3
> INSERT 3 : 8 @ 3
+ Display.checkContextLost();
+
+ PointerInputAbstraction.runGameLoop();
+ this.gameSettings.touchscreen = PointerInputAbstraction.isTouchMode();
+
@ -583,34 +590,31 @@
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 11
> CHANGE 1 : 6 @ 1 : 3
> CHANGE 1 : 12 @ 1 : 7
~
~ EaglercraftGPU.optimize();
~ _wglBindFramebuffer(0x8D40, null);
~ GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
~ GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
~ if (!Display.contextLost()) {
~ EaglercraftGPU.optimize();
~ _wglBindFramebuffer(0x8D40, null);
~ GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
~ GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
~ GlStateManager.pushMatrix();
~ GlStateManager.clear(16640);
~ GlStateManager.enableTexture2D();
~ if (this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock()) {
~ this.gameSettings.thirdPersonView = 0;
~ }
> DELETE 2 @ 2 : 4
> CHANGE 1 : 3 @ 1 : 5
> DELETE 5 @ 5 : 6
~ if (!this.skipRenderWorld) {
~ this.entityRenderer.func_181560_a(this.timer.renderPartialTicks, i);
> DELETE 1 @ 1 : 2
> CHANGE 2 : 5 @ 2 : 7
> DELETE 1 @ 1 : 2
~ this.guiAchievement.updateAchievementWindow();
~ this.touchOverlayRenderer.render(displayWidth, displayHeight, scaledResolution);
~ GlStateManager.popMatrix();
> DELETE 2 @ 2 : 15
> DELETE 2 @ 2 : 12
> CHANGE 1 : 2 @ 1 : 2
~ this.touchOverlayRenderer.render(displayWidth, displayHeight, scaledResolution);
> CHANGE 1 : 2 @ 1 : 8
~
> DELETE 1 @ 1 : 9
@ -777,7 +781,7 @@
> CHANGE 4 : 6 @ 4 : 5
~ VoiceClientController.tickVoiceClient(this);
~ VoiceClientController.tickVoiceClient();
~
> DELETE 1 @ 1 : 2
@ -1047,29 +1051,29 @@
~ if (bungeeOutdatedMsgTimer > 0) {
~ if (--bungeeOutdatedMsgTimer == 0 && this.thePlayer.sendQueue != null) {
~ String pluginBrand = this.thePlayer.sendQueue.getNetworkManager().getPluginBrand();
~ String pluginVersion = this.thePlayer.sendQueue.getNetworkManager().getPluginVersion();
~ if (pluginBrand != null && pluginVersion != null
~ && EaglerXBungeeVersion.isUpdateToPluginAvailable(pluginBrand, pluginVersion)) {
~ if (pluginBrand != null && ("EaglercraftXBungee".equals(pluginBrand)
~ || "EaglercraftXVelocity".equals(pluginBrand))) {
~ String pfx = EnumChatFormatting.GOLD + "[EagX]" + EnumChatFormatting.AQUA;
~ ingameGUI.getChatGUI().printChatMessage(
~ new ChatComponentText(pfx + " ---------------------------------------"));
~ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx + " This server is running "
~ + EnumChatFormatting.YELLOW + pluginBrand + EnumChatFormatting.AQUA + ","));
~ ingameGUI.getChatGUI().printChatMessage(
~ new ChatComponentText(pfx + " This server appears to be using version "
~ + EnumChatFormatting.YELLOW + pluginVersion));
~ new ChatComponentText(pfx + " which has been discontinued by lax1dude."));
~ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
~ ingameGUI.getChatGUI().printChatMessage(
~ new ChatComponentText(pfx + " of the EaglerXBungee plugin which is outdated"));
~ new ChatComponentText(pfx + " If you are the admin of this server, please"));
~ ingameGUI.getChatGUI().printChatMessage(
~ new ChatComponentText(pfx + " upgrade to EaglercraftXServer if you want to"));
~ ingameGUI.getChatGUI().printChatMessage(
~ new ChatComponentText(pfx + " to continue to receive support and bugfixes."));
~ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
~ ingameGUI.getChatGUI()
~ .printChatMessage(new ChatComponentText(pfx + " If you are the admin update to "
~ + EnumChatFormatting.YELLOW + EaglerXBungeeVersion.getPluginVersion()
~ + EnumChatFormatting.AQUA + " or newer"));
~ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
~ ingameGUI.getChatGUI().printChatMessage((new ChatComponentText(pfx + " Click: "))
~ .appendSibling((new ChatComponentText("" + EnumChatFormatting.GREEN
~ + EnumChatFormatting.UNDERLINE + EaglerXBungeeVersion.getPluginButton()))
~ .setChatStyle((new ChatStyle()).setChatClickEvent(
~ new ClickEvent(ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD,
~ "plugin_download.zip")))));
~ .printChatMessage((new ChatComponentText(pfx + " " + EnumChatFormatting.GREEN
~ + EnumChatFormatting.UNDERLINE + "https://lax1dude.net/eaglerxserver"))
~ .setChatStyle((new ChatStyle())
~ .setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL,
~ "https://lax1dude.net/eaglerxserver"))));
~ ingameGUI.getChatGUI().printChatMessage(
~ new ChatComponentText(pfx + " ---------------------------------------"));
~ }
@ -1228,7 +1232,7 @@
+ EaglerProfile.clearServerSkinOverride();
+ PauseMenuCustomizeState.reset();
+ ClientUUIDLoadingCache.flushRequestCache();
+ ClientUUIDLoadingCache.resetFlags();
+ StateFlags.reset();
+ WebViewOverlayController.setPacketSendCallback(null);
> DELETE 1 @ 1 : 7
@ -1254,7 +1258,11 @@
~ public void middleClickMouse() {
> CHANGE 127 : 128 @ 127 : 128
> CHANGE 76 : 77 @ 76 : 77
~ if (!EntityList.entityEggs.containsKey(i)) {
> CHANGE 50 : 51 @ 50 : 51
~ return EagRuntime.getVersion();

View File

@ -10,11 +10,10 @@
+ import java.io.IOException;
+
> CHANGE 2 : 18 @ 2 : 15
> CHANGE 2 : 17 @ 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;
@ -207,7 +206,7 @@
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+
+ String text = EaglerXBungeeVersion.getPluginButton();
+ String text = "Download EaglerXServer";
+ int w = mc.fontRendererObj.getStringWidth(text);
+ boolean hover = xx > width - 5 - (w + 5) * 3 / 4 && yy > 1 && xx < width - 2 && yy < 12;
+ if (hover) {
@ -268,12 +267,12 @@
> INSERT 2 : 9 @ 2
+ String text = EaglerXBungeeVersion.getPluginButton();
+ String text = "Download EaglerXServer";
+ int w = mc.fontRendererObj.getStringWidth(text);
+ if (parInt1 > width - 5 - (w + 5) * 3 / 4 && parInt2 > 1 && parInt1 < width - 2 && parInt2 < 12) {
+ this.mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ EaglerXBungeeVersion.startPluginDownload();
+ EagRuntime.openLink("https://lax1dude.net/eaglerxserver");
+ }
> INSERT 11 : 15 @ 11

View File

@ -9,7 +9,7 @@
> DELETE 1 @ 1 : 3
> INSERT 4 : 29 @ 4
> INSERT 4 : 28 @ 4
+
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent;
@ -22,7 +22,6 @@
+ import com.google.common.collect.Sets;
+
+ 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.PauseMenuCustomizeState;
@ -221,7 +220,7 @@
~ // rip
> CHANGE 5 : 15 @ 5 : 8
> CHANGE 5 : 12 @ 5 : 11
~ /*
~ * ChatUserInfo chatuserinfo =
@ -230,16 +229,8 @@
~ * GuiTwitchUserMode(this.mc.getTwitchStream(), chatuserinfo)); } else { }
~ */
~ LOGGER.error("Tried to handle twitch user but couldn\'t find them!");
~ } else if (clickevent.getAction() == ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD) {
~ if (EaglerXBungeeVersion.pluginFileEPK.equals(clickevent.getValue())) {
~ EaglerXBungeeVersion.startPluginDownload();
> CHANGE 1 : 3 @ 1 : 2
~ LOGGER.error("Invalid plugin download from EPK was blocked: {}",
~ EaglerXBungeeVersion.pluginFileEPK);
> CHANGE 24 : 49 @ 24 : 26
> CHANGE 23 : 48 @ 23 : 25
~ protected void touchStarted(int parInt1, int parInt2, int parInt3) {
~ if (shouldTouchGenerateMouseEvents()) {

View File

@ -23,6 +23,6 @@
> CHANGE 11 : 13 @ 11 : 12
~ Minecraft.getMinecraft().getTextureManager().bindTexture(
~ Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(profile).getResourceLocation());
~ Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerSkin(profile).getLocation());
> EOF

View File

@ -5,7 +5,7 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 3 : 21 @ 3 : 6
> CHANGE 2 : 16 @ 2 : 6
~ import java.util.List;
~
@ -17,22 +17,14 @@
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
~ import net.lax1dude.eaglercraft.v1_8.socket.AddressResolver;
~ 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;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.handshake.HandshakerHandler;
> CHANGE 4 : 5 @ 4 : 8
> DELETE 4 @ 4 : 8
~ import net.minecraft.client.network.NetHandlerPlayClient;
> CHANGE 2 : 3 @ 2 : 5
~ import net.minecraft.network.play.client.C17PacketCustomPayload;
> DELETE 1 @ 1 : 5
> DELETE 1 @ 1 : 4
@ -41,17 +33,13 @@
> CHANGE 1 : 7 @ 1 : 2
~ private IWebSocketClient webSocket;
~ private EaglercraftNetworkManager networkManager;
~ private HandshakerHandler handshaker;
~ private String currentAddress;
~ private String currentPassword;
~ private boolean allowPlaintext;
~ private boolean allowCookies;
> INSERT 1 : 2 @ 1
+ private boolean hasOpened;
> INSERT 1 : 2 @ 1
> INSERT 2 : 3 @ 2
+ private int timer = 0;
@ -155,12 +143,15 @@
~ new ChatComponentText("Could not open WebSocket to \"" + currentAddress + "\"!")));
~ }
> CHANGE 1 : 81 @ 1 : 2
> CHANGE 1 : 38 @ 1 : 2
~ if (webSocket.getState() == EnumEaglerConnectionState.CONNECTED) {
~ if (!hasOpened) {
~ hasOpened = true;
~ EnumEaglerConnectionState connState = webSocket.getState();
~ if (connState == EnumEaglerConnectionState.CONNECTED) {
~ if (handshaker == null) {
~ this.mc.getSession().reset();
~
~ logger.info("Logging in: {}", currentAddress);
~
~ byte[] cookieData = null;
~ if (allowCookies) {
~ ServerCookieDataStore.ServerCookie cookie = ServerCookieDataStore
@ -169,61 +160,15 @@
~ cookieData = cookie.cookie;
~ }
~ }
~ if (ConnectionHandshake.attemptHandshake(this.mc, webSocket, this, previousGuiScreen,
~ currentPassword, allowPlaintext, allowCookies, cookieData)) {
~ logger.info("Handshake Success");
~ webSocket.setEnableStringFrames(false);
~ webSocket.clearStringFrames();
~ this.networkManager = new WebSocketNetworkManager(webSocket);
~ this.networkManager.setPluginInfo(ConnectionHandshake.pluginBrand,
~ ConnectionHandshake.pluginVersion);
~ mc.bungeeOutdatedMsgTimer = 80;
~ mc.clearTitles();
~ this.networkManager.setConnectionState(EnumConnectionState.PLAY);
~ 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) {
~ 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?")));
~ }
~ webSocket.close();
~ return;
~ }
~ }
~ if (this.networkManager != null) {
~ try {
~ this.networkManager.processReceivedPackets();
~ } catch (IOException ex) {
~ }
~
~ handshaker = new HandshakerHandler(this, webSocket, EaglerProfile.getName(), currentPassword,
~ allowPlaintext, allowCookies, cookieData);
~ }
~ handshaker.tick();
~ } else {
~ if (webSocket.getState() == EnumEaglerConnectionState.FAILED) {
~ if (!hasOpened) {
~ mc.getSession().reset();
~ checkRatelimit();
~ if (mc.currentScreen == this) {
~ if (RateLimitTracker.isProbablyLockedOut(currentAddress)) {
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
~ } else {
~ mc.displayGuiScreen(new GuiDisconnected(previousGuiScreen, "connect.failed",
~ new ChatComponentText("Connection Refused")));
~ }
~ }
~ }
~ } else {
~ if (this.networkManager != null && this.networkManager.checkDisconnected()) {
~ if (handshaker != null) {
~ handshaker.tick();
~ if (connState == EnumEaglerConnectionState.FAILED) {
~ this.mc.getSession().reset();
~ checkRatelimit();
~ if (mc.currentScreen == this) {
@ -263,16 +208,15 @@
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 4 : 6 @ 4
> CHANGE 2 : 3 @ 2 : 6
+ } else if (this.webSocket != null) {
+ this.webSocket.close();
~ this.webSocket.close();
> CHANGE 9 : 10 @ 9 : 10
> CHANGE 7 : 8 @ 7 : 8
~ if (this.networkManager == null || !this.networkManager.isChannelOpen()) {
~ if (this.handshaker == null) {
> INSERT 9 : 34 @ 9
> INSERT 9 : 43 @ 9
+
+ private void checkRatelimit() {
@ -299,5 +243,14 @@
+ public boolean canCloseGui() {
+ return false;
+ }
+
+ public static Minecraft getMC(GuiConnecting gui) {
+ return gui.mc;
+ }
+
+ public static GuiScreen getPrevScreen(GuiConnecting gui) {
+ return gui.previousGuiScreen;
+ }
+
> EOF

View File

@ -18,7 +18,7 @@
+ import net.minecraft.util.ChatComponentText;
> CHANGE 228 : 242 @ 228 : 229
> CHANGE 228 : 241 @ 228 : 229
~ try {
~ this.netClientHandler.getNetworkManager().processReceivedPackets();
@ -30,8 +30,7 @@
~ this.netClientHandler.getNetworkManager()
~ .closeChannel(new ChatComponentText("Exception thrown: " + ex.toString()));
~ }
~ this.netClientHandler.getSkinCache().flush();
~ this.netClientHandler.getCapeCache().flush();
~ this.netClientHandler.getTextureCache().runTick();
~ this.netClientHandler.getNotifManager().runTick();
~ ClientUUIDLoadingCache.update();

View File

@ -7,7 +7,7 @@
> DELETE 2 @ 2 : 8
> CHANGE 4 : 28 @ 4 : 7
> CHANGE 4 : 32 @ 4 : 7
~
~ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
@ -19,11 +19,15 @@
~
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
~ 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.skin_cache.ServerTextureCache;
~ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
~ 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;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.ClientMessageHandler;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.handshake.StandardCaps;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.InjectedMessageController;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.LegacyMessageController;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.MessageController;
~ 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;
@ -68,70 +72,71 @@
~ private final Map<EaglercraftUUID, NetworkPlayerInfo> playerInfoMap = Maps.newHashMap();
> CHANGE 2 : 12 @ 2 : 3
> CHANGE 2 : 13 @ 2 : 3
~ private boolean isIntegratedServer = false;
~ private final EaglercraftRandom avRandomizer = new EaglercraftRandom();
~ private final ServerSkinCache skinCache;
~ private final ServerCapeCache capeCache;
~ private final ServerTextureCache textureCache;
~ private final ServerNotificationManager notifManager;
~ public boolean currentFNAWSkinAllowedState = true;
~ public boolean currentFNAWSkinForcedState = true;
~ private GameProtocolMessageController eaglerMessageController = null;
~ public boolean hasRequestedServerInfo = false;
~ private final MessageController eaglerMessageController;
~ public byte[] cachedServerInfoHash = null;
~ public byte[] cachedServerInfoData = null;
~ public boolean allowedDisplayWebview = false;
~ public boolean allowedDisplayWebviewYes = false;
> CHANGE 1 : 2 @ 1 : 2
> CHANGE 1 : 3 @ 1 : 3
~ public NetHandlerPlayClient(Minecraft mcIn, GuiScreen parGuiScreen, EaglercraftNetworkManager parNetworkManager,
~ GameProfile parGameProfile, GamePluginMessageProtocol eaglerProtocol) {
> INSERT 5 : 10 @ 5
> INSERT 3 : 4 @ 3
+ this.netManager.setNetHandler(this);
> INSERT 1 : 15 @ 1
+ 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);
+ ClientMessageHandler handler = ClientMessageHandler.createClientHandler(eaglerProtocol.ver, this);
+ if (eaglerProtocol.ver >= 5) {
+ this.eaglerMessageController = new InjectedMessageController(eaglerProtocol, handler,
+ GamePluginMessageConstants.CLIENT_TO_SERVER, parNetworkManager::injectRawFrame);
+ parNetworkManager.setInjectedMessageController((InjectedMessageController) eaglerMessageController);
+ } else {
+ this.eaglerMessageController = new LegacyMessageController(eaglerProtocol, handler,
+ GamePluginMessageConstants.CLIENT_TO_SERVER,
+ (ch, msg) -> addToSendQueue(new C17PacketCustomPayload(ch, msg)));
+ }
+ this.textureCache = ServerTextureCache.create(this, mcIn.getTextureManager());
+ this.notifManager = new ServerNotificationManager(mcIn.getTextureManager());
> INSERT 4 : 7 @ 4
> INSERT 4 : 6 @ 4
+ this.skinCache.destroy();
+ this.capeCache.destroy();
+ this.textureCache.destroy();
+ this.notifManager.destroy();
> INSERT 2 : 51 @ 2
> INSERT 2 : 38 @ 2
+ public ServerSkinCache getSkinCache() {
+ return this.skinCache;
+ }
+
+ public ServerCapeCache getCapeCache() {
+ return this.capeCache;
+ public ServerTextureCache getTextureCache() {
+ return this.textureCache;
+ }
+
+ public ServerNotificationManager getNotifManager() {
+ return this.notifManager;
+ }
+
+ public GameProtocolMessageController getEaglerMessageController() {
+ public MessageController getEaglerMessageController() {
+ return eaglerMessageController;
+ }
+
+ public void setEaglerMessageController(GameProtocolMessageController eaglerMessageController) {
+ this.eaglerMessageController = eaglerMessageController;
+ }
+
+ public GamePluginMessageProtocol getEaglerMessageProtocol() {
+ return eaglerMessageController != null ? eaglerMessageController.protocol : null;
+ return eaglerMessageController != null ? eaglerMessageController.getProtocol() : 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);
+ }
+ eaglerMessageController.sendPacket(packet);
+ }
+
+ public boolean webViewSendHandler(GameMessagePacket pkt) {
@ -142,7 +147,7 @@
+ logger.error("WebView sent message on a dead handler!");
+ return false;
+ }
+ if (eaglerMessageController.protocol.ver >= 4) {
+ if (eaglerMessageController.getProtocol().ver >= 4) {
+ sendEaglerMessage(pkt);
+ return true;
+ } else {
@ -158,12 +163,21 @@
~ this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false,
~ packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty());
> INSERT 11 : 15 @ 11
> INSERT 11 : 24 @ 11
+ if (VoiceClientController.isClientSupported()) {
+ VoiceClientController.initializeVoiceClient(this::sendEaglerMessage, eaglerMessageController.protocol.ver);
+ if (netManager.getServerCapabilities().hasCapability(StandardCaps.VOICE, 0)) {
+ VoiceClientController.initializeVoiceClient(this::sendEaglerMessage,
+ eaglerMessageController.getProtocol().ver);
+ } else {
+ VoiceClientController.initializeVoiceClient(null, -1);
+ }
+ }
+ if (netManager.getServerCapabilities().hasCapability(StandardCaps.WEBVIEW, 0)) {
+ WebViewOverlayController.setPacketSendCallback(this::webViewSendHandler);
+ } else {
+ WebViewOverlayController.setPacketSendCallback(null);
+ }
+ WebViewOverlayController.setPacketSendCallback(this::webViewSendHandler);
> DELETE 3 @ 3 : 4
@ -477,12 +491,11 @@
~ for (int i = 0, l = lst.size(); i < l; ++i) {
~ S38PacketPlayerListItem.AddPlayerData s38packetplayerlistitem$addplayerdata = lst.get(i);
> CHANGE 1 : 6 @ 1 : 2
> CHANGE 1 : 5 @ 1 : 2
~ EaglercraftUUID uuid = s38packetplayerlistitem$addplayerdata.getProfile().getId();
~ this.playerInfoMap.remove(uuid);
~ this.skinCache.evictSkin(uuid);
~ this.capeCache.evictCape(uuid);
~ this.textureCache.evictPlayer(uuid);
~ ClientUUIDLoadingCache.evict(uuid);
> DELETE 34 @ 34 : 35
@ -573,11 +586,12 @@
> DELETE 11 @ 11 : 13
> INSERT 9 : 17 @ 9
> INSERT 9 : 18 @ 9
+ } else {
+ } else if (eaglerMessageController instanceof LegacyMessageController) {
+ try {
+ eaglerMessageController.handlePacket(packetIn.getChannelName(), packetIn.getBufferData());
+ ((LegacyMessageController) eaglerMessageController).handlePacket(packetIn.getChannelName(),
+ packetIn.getBufferData());
+ } catch (IOException e) {
+ logger.error("Couldn't read \"{}\" packet as an eaglercraft plugin message!",
+ packetIn.getChannelName());

View File

@ -31,26 +31,24 @@
~ return true;
> CHANGE 3 : 5 @ 3 : 4
> CHANGE 3 : 4 @ 3 : 4
~ return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile)
~ .getSkinModel().profileSkinType;
~ return getEaglerSkinModel().profileSkinType;
> CHANGE 2 : 5 @ 2 : 6
~ public SkinModel getEaglerSkinModel() {
~ return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile).getSkinModel();
~ return Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerSkin(this.gameProfile).getModel();
~ }
> CHANGE 1 : 3 @ 1 : 3
~ public ResourceLocation getLocationSkin() {
~ return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile).getResourceLocation();
~ return Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerSkin(this.gameProfile).getLocation();
> CHANGE 3 : 5 @ 3 : 8
> CHANGE 3 : 4 @ 3 : 8
~ return Minecraft.getMinecraft().getNetHandler().getCapeCache().getCape(this.gameProfile.getId())
~ .getResourceLocation();
~ return Minecraft.getMinecraft().getNetHandler().getTextureCache().getPlayerCape(this.gameProfile);
> DELETE 6 @ 6 : 33

View File

@ -5,13 +5,12 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 8 @ 2
> INSERT 2 : 7 @ 2
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.BlockVertexIDs;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
+ import net.minecraft.block.Block;
> DELETE 4 @ 4 : 6
@ -25,7 +24,7 @@
+ BlockPos tmp = new BlockPos(0, 0, 0);
+ boolean deferred = DeferredStateManager.isDeferredRenderer();
+ boolean isDynamicLights = deferred || DynamicLightsStateManager.isDynamicLightsRender();
+ boolean isDynamicLights = deferred;// || DynamicLightsStateManager.isDynamicLightsRender();
> INSERT 1 : 3 @ 1

View File

@ -5,14 +5,13 @@
# Version: 1.0
# Author: lax1dude
> INSERT 4 : 10 @ 4
> INSERT 4 : 9 @ 4
+
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.VertexMarkerState;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
> DELETE 3 @ 3 : 7
@ -193,7 +192,7 @@
~ private void renderModelAmbientOcclusionQuads(IBlockAccess blockAccessIn, IBlockState blockStateIn,
~ BlockPos blockPosIn, WorldRenderer worldRendererIn, List<BakedQuad> listQuadsIn, RenderEnv renderenv) {
~ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
~ boolean isDynamicLights = isDeferred || DynamicLightsStateManager.isDynamicLightsRender();
~ boolean isDynamicLights = isDeferred;// || DynamicLightsStateManager.isDynamicLightsRender();
~ float[] quadBounds = renderenv.getQuadBounds();
~ BitSet boundsFlags = renderenv.getBoundsFlags();
~ BlockModelRenderer.AmbientOcclusionFace aoFaceIn = renderenv.getAoFace();
@ -249,7 +248,7 @@
~ List<BakedQuad> listQuadsIn, RenderEnv renderenv) {
~ boolean isDeferred = DeferredStateManager.isDeferredRenderer();
~ boolean isDynamicLights = isDeferred || DynamicLightsStateManager.isDynamicLightsRender();
~ boolean isDynamicLights = isDeferred;// || DynamicLightsStateManager.isDynamicLightsRender();
~ BitSet boundsFlags = renderenv.getBoundsFlags();
~ float[] quadBounds = renderenv.getQuadBounds();

View File

@ -832,12 +832,13 @@
> DELETE 5 @ 5 : 6
> CHANGE 155 : 159 @ 155 : 156
> CHANGE 155 : 160 @ 155 : 156
~ worldRendererIn.begin(7,
~ (DeferredStateManager.isDeferredRenderer() || DynamicLightsStateManager.isDynamicLightsRender())
~ ? VertexFormat.BLOCK_SHADERS
~ : DefaultVertexFormats.BLOCK);
~ (DeferredStateManager
~ .isDeferredRenderer() /* || DynamicLightsStateManager.isDynamicLightsRender() */)
~ ? VertexFormat.BLOCK_SHADERS
~ : DefaultVertexFormats.BLOCK);
> CHANGE 19 : 20 @ 19 : 20

View File

@ -7,7 +7,7 @@
> DELETE 2 @ 2 : 5
> CHANGE 3 : 11 @ 3 : 4
> CHANGE 3 : 10 @ 3 : 4
~
~ import com.google.common.collect.Maps;
@ -16,7 +16,6 @@
~ import net.lax1dude.eaglercraft.v1_8.opengl.VertexFormat;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
> DELETE 4 @ 4 : 7
@ -186,7 +185,7 @@
> CHANGE 3 : 7 @ 3 : 4
~ worldRendererIn.begin(7,
~ (DeferredStateManager.isDeferredRenderer() || DynamicLightsStateManager.isDynamicLightsRender())
~ (DeferredStateManager.isDeferredRenderer() /* || DynamicLightsStateManager.isDynamicLightsRender() */)
~ ? VertexFormat.BLOCK_SHADERS
~ : DefaultVertexFormats.BLOCK);

View File

@ -17,11 +17,10 @@
> DELETE 1 @ 1 : 4
> CHANGE 28 : 32 @ 28 : 29
> CHANGE 28 : 31 @ 28 : 29
~ worldrenderer.begin(7,
~ (DeferredStateManager.isDeferredRenderer()
~ || DynamicLightsStateManager.isDynamicLightsRender()) ? VertexFormat.BLOCK_SHADERS
~ : DefaultVertexFormats.BLOCK);
~ worldrenderer.begin(7, (DeferredStateManager.isDeferredRenderer()
~ /* || DynamicLightsStateManager.isDynamicLightsRender() */) ? VertexFormat.BLOCK_SHADERS
~ : DefaultVertexFormats.BLOCK);
> EOF

View File

@ -21,7 +21,7 @@
~ if (parGameProfile != null && parGameProfile.getId() != null) {
~ NetHandlerPlayClient netHandler = Minecraft.getMinecraft().getNetHandler();
~ if (netHandler != null) {
~ resourcelocation = netHandler.getSkinCache().getSkin(parGameProfile).getResourceLocation();
~ resourcelocation = netHandler.getTextureCache().getPlayerSkin(parGameProfile).getLocation();
> DELETE 2 @ 2 : 3

View File

@ -5,14 +5,13 @@
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 8 @ 2
> INSERT 2 : 7 @ 2
+ import com.carrotsearch.hppc.IntArrayList;
+ import com.carrotsearch.hppc.IntObjectHashMap;
+ import com.carrotsearch.hppc.IntObjectMap;
+ import com.carrotsearch.hppc.ObjectContainer;
+ import com.carrotsearch.hppc.cursors.IntObjectCursor;
+ import com.carrotsearch.hppc.cursors.ObjectCursor;
+ import com.carrotsearch.hppc.procedures.IntObjectProcedure;
> CHANGE 2 : 5 @ 2 : 5
@ -68,30 +67,30 @@
~ this.activePotionsMap.put(potioneffect.getPotionID(), potioneffect);
> CHANGE 23 : 24 @ 23 : 24
> CHANGE 23 : 26 @ 23 : 31
~ IntArrayList deadPotionEffects = null;
~ if (!this.worldObj.isRemote) {
~ this.activePotionsMap.removeAll((integer, potioneffect) -> {
~ if (!potioneffect.onUpdate(this)) {
> CHANGE 1 : 4 @ 1 : 4
> INSERT 1 : 4 @ 1
~ for (IntObjectCursor<PotionEffect> cur : this.activePotionsMap) {
~ int integer = cur.key;
~ PotionEffect potioneffect = cur.value;
+ return true;
+ } else if (potioneffect.getDuration() % 600 == 0) {
+ this.onChangedPotionEffect(potioneffect, false);
> CHANGE 2 : 5 @ 2 : 3
> CHANGE 1 : 9 @ 1 : 4
~ if (deadPotionEffects == null)
~ deadPotionEffects = new IntArrayList(4);
~ deadPotionEffects.add(integer);
~ return false;
~ });
~ } else {
~ this.activePotionsMap.forEach((IntObjectProcedure<PotionEffect>) (integer, potioneffect) -> {
~ if (potioneffect.onUpdate(this) && potioneffect.getDuration() % 600 == 0) {
~ this.onChangedPotionEffect(potioneffect, false);
~ }
~ });
> INSERT 7 : 11 @ 7
+ if (deadPotionEffects != null) {
+ this.activePotionsMap.removeAll(deadPotionEffects);
+ }
+
> CHANGE 40 : 43 @ 40 : 43
> CHANGE 42 : 45 @ 42 : 45
~ ObjectContainer<PotionEffect> cc = this.activePotionsMap.values();
~ int i = PotionHelper.calcPotionLiquidColor(cc);

View File

@ -14,10 +14,12 @@
+ import com.carrotsearch.hppc.cursors.IntCursor;
+ import com.carrotsearch.hppc.cursors.LongCursor;
> CHANGE 2 : 4 @ 2 : 4
> CHANGE 2 : 6 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.skins.PlayerTextureData;
~
> DELETE 17 @ 17 : 18
@ -45,9 +47,10 @@
~ private long playerLastActiveTime = EagRuntime.steadyTimeMillis();
> INSERT 5 : 7 @ 5
> INSERT 5 : 8 @ 5
+ public byte[] updateCertificate = null;
+ public PlayerTextureData textureData = null;
+ public EaglercraftUUID clientBrandUUID = null;
> CHANGE 87 : 88 @ 87 : 88

View File

@ -12,11 +12,7 @@
+ import com.google.common.collect.Maps;
+
> CHANGE 53 : 54 @ 53 : 54
~ CHANGE_PAGE("change_page", true), EAGLER_PLUGIN_DOWNLOAD("eagler_plugin_download", true);
> CHANGE 23 : 26 @ 23 : 25
> CHANGE 77 : 80 @ 77 : 79
~ ClickEvent.Action[] types = values();
~ for (int i = 0; i < types.length; ++i) {

View File

@ -10,10 +10,14 @@
+ import com.carrotsearch.hppc.IntShortHashMap;
+ import com.carrotsearch.hppc.IntShortMap;
> CHANGE 3 : 8 @ 3 : 7
> CHANGE 3 : 12 @ 3 : 7
~
~ 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;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.InjectedMessageController;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.LegacyMessageController;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.message.MessageController;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketUpdateCertEAG;
~
@ -28,13 +32,18 @@
> DELETE 25 @ 25 : 29
> DELETE 35 @ 35 : 36
> INSERT 33 : 34 @ 33
+ import net.minecraft.network.play.server.S3FPacketCustomPayload;
> DELETE 2 @ 2 : 3
> DELETE 13 @ 13 : 14
> INSERT 2 : 4 @ 2
> INSERT 2 : 5 @ 2
+ import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
+ import net.lax1dude.eaglercraft.v1_8.sp.server.socket.protocol.ServerMessageHandler;
+
> DELETE 1 @ 1 : 3
@ -62,34 +71,42 @@
> INSERT 4 : 6 @ 4
+ private boolean hasDisconnected = false;
+ private GameProtocolMessageController eaglerMessageController = null;
+ private MessageController eaglerMessageController = null;
> CHANGE 1 : 3 @ 1 : 2
~ public NetHandlerPlayServer(MinecraftServer server, IntegratedServerPlayerNetworkManager networkManagerIn,
~ EntityPlayerMP playerIn) {
~ EntityPlayerMP playerIn, GamePluginMessageProtocol eaglerProtocol) {
> INSERT 7 : 28 @ 7
> INSERT 5 : 15 @ 5
+ public GameProtocolMessageController getEaglerMessageController() {
+ ServerMessageHandler handler = ServerMessageHandler.createServerHandler(eaglerProtocol.ver, this);
+ if (eaglerProtocol.ver >= 5) {
+ this.eaglerMessageController = new InjectedMessageController(eaglerProtocol, handler,
+ GamePluginMessageConstants.SERVER_TO_CLIENT, networkManagerIn::injectRawFrame);
+ networkManagerIn.setInjectedMessageController((InjectedMessageController) eaglerMessageController);
+ } else {
+ this.eaglerMessageController = new LegacyMessageController(eaglerProtocol, handler,
+ GamePluginMessageConstants.SERVER_TO_CLIENT,
+ (ch, msg) -> sendPacket(new S3FPacketCustomPayload(ch, msg)));
+ }
> INSERT 2 : 18 @ 2
+ public MessageController getEaglerMessageController() {
+ return eaglerMessageController;
+ }
+
+ public void setEaglerMessageController(GameProtocolMessageController eaglerMessageController) {
+ public void setEaglerMessageController(MessageController eaglerMessageController) {
+ this.eaglerMessageController = eaglerMessageController;
+ }
+
+ public GamePluginMessageProtocol getEaglerMessageProtocol() {
+ return eaglerMessageController != null ? eaglerMessageController.protocol : null;
+ return eaglerMessageController != null ? eaglerMessageController.getProtocol() : 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);
+ }
+ eaglerMessageController.sendPacket(packet);
+ }
+
@ -268,10 +285,10 @@
+ }
+ }
+ }
+ } else {
+ } else if (eaglerMessageController instanceof LegacyMessageController) {
+ try {
+ eaglerMessageController.handlePacket(c17packetcustompayload.getChannelName(),
+ c17packetcustompayload.getBufferData());
+ ((LegacyMessageController) eaglerMessageController)
+ .handlePacket(c17packetcustompayload.getChannelName(), c17packetcustompayload.getBufferData());
+ } catch (IOException e) {
+ logger.error("Couldn't read \"{}\" packet as an eaglercraft plugin message!",
+ c17packetcustompayload.getChannelName());

View File

@ -138,6 +138,15 @@
> DELETE 20 @ 20 : 36
> DELETE 88 @ 88 : 107
> CHANGE 88 : 94 @ 88 : 90
~ public byte[] toBytes() {
~ int readerIndex = buf.readerIndex();
~ int writerIndex = buf.writerIndex();
~ byte[] bytes = new byte[writerIndex - readerIndex];
~ buf.getBytes(readerIndex, bytes);
~ return bytes;
> DELETE 2 @ 2 : 17
> EOF

View File

@ -30,14 +30,13 @@
+ import net.minecraft.util.ChatComponentText;
> CHANGE 12 : 22 @ 12 : 14
> CHANGE 12 : 21 @ 12 : 14
~ 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;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketUpdateCertEAG;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.WorldsDB;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.skins.PlayerTextureData;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -69,20 +68,18 @@
> CHANGE 2 : 6 @ 2 : 8
~ public void initializeConnectionToPlayer(IntegratedServerPlayerNetworkManager netManager, EntityPlayerMP playerIn,
~ int protocolVersion, EaglercraftUUID clientBrandUUID) {
~ GamePluginMessageProtocol protocolVersion, PlayerTextureData textureData, EaglercraftUUID clientBrandUUID) {
~ playerIn.textureData = textureData;
~ playerIn.clientBrandUUID = clientBrandUUID;
~ GameProfile gameprofile1 = playerIn.getGameProfile();
> CHANGE 3 : 4 @ 3 : 7
~ String s1 = "channel:" + netManager.playerChannel;
> INSERT 8 : 12 @ 8
> CHANGE 7 : 9 @ 7 : 8
+ nethandlerplayserver.setEaglerMessageController(new GameProtocolMessageController(
+ GamePluginMessageProtocol.getByVersion(protocolVersion), GamePluginMessageConstants.SERVER_TO_CLIENT,
+ GameProtocolMessageController.createServerHandler(protocolVersion, nethandlerplayserver),
+ (ch, msg) -> nethandlerplayserver.sendPacket(new S3FPacketCustomPayload(ch, msg))));
~ NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.mcServer, netManager, playerIn,
~ protocolVersion);
> DELETE 4 @ 4 : 6
@ -142,10 +139,8 @@
~ this.playerStatFiles.remove(entityplayermp.getName());
> INSERT 2 : 9 @ 2
> INSERT 2 : 7 @ 2
+ ((EaglerMinecraftServer) mcServer).getSkinService().unregisterPlayer(uuid);
+ ((EaglerMinecraftServer) mcServer).getCapeService().unregisterPlayer(uuid);
+ IntegratedVoiceService vcs = ((EaglerMinecraftServer) mcServer).getVoiceService();
+ if (vcs != null) {
+ vcs.handlePlayerLoggedOut(playerIn);

View File

@ -5,14 +5,16 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 3 : 9 @ 3 : 15
> CHANGE 3 : 11 @ 3 : 15
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
~ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
~ import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;
~ import net.lax1dude.eaglercraft.v1_8.sp.server.skins.IntegratedTexturePackets;
> CHANGE 1 : 2 @ 1 : 2
@ -62,19 +64,14 @@
> DELETE 2 @ 2 : 3
> CHANGE 11 : 23 @ 11 : 12
> CHANGE 11 : 18 @ 11 : 12
~ this.field_181025_l, this.selectedProtocol, this.clientBrandUUID);
~ ((EaglerMinecraftServer) field_181025_l.mcServer).getSkinService()
~ .processLoginPacket(this.loginSkinPacket, field_181025_l, 3); // singleplayer always sends V3
~ // skin in handshake
~ if (this.loginCapePacket != null) {
~ ((EaglerMinecraftServer) field_181025_l.mcServer).getCapeService()
~ .processLoginPacket(this.loginCapePacket, field_181025_l);
~ }
~ this.field_181025_l, GamePluginMessageProtocol.getByVersion(this.selectedProtocol),
~ IntegratedTexturePackets.handleTextureData(this.loginSkinPacket, this.loginCapePacket),
~ this.clientBrandUUID);
~ IntegratedVoiceService svc = ((EaglerMinecraftServer) field_181025_l.mcServer).getVoiceService();
~ if (svc != null) {
~ svc.handlePlayerLoggedIn(entityplayermp);
~ svc.handlePlayerLoggedIn(this.field_181025_l);
~ }
> CHANGE 23 : 24 @ 23 : 29
@ -86,18 +83,13 @@
~ this.networkManager.sendPacket(new S02PacketLoginSuccess(this.loginGameProfile, this.selectedProtocol));
~ this.networkManager.setConnectionState(EnumConnectionState.PLAY);
> CHANGE 6 : 20 @ 6 : 8
> CHANGE 6 : 15 @ 6 : 8
~ entityplayermp = this.server.getConfigurationManager().createPlayerForUser(this.loginGameProfile);
~ this.server.getConfigurationManager().initializeConnectionToPlayer(this.networkManager, entityplayermp,
~ this.selectedProtocol, this.clientBrandUUID);
~ ((EaglerMinecraftServer) entityplayermp.mcServer).getSkinService()
~ .processLoginPacket(this.loginSkinPacket, entityplayermp, 3); // singleplayer always sends V3
~ // skin in handshake
~ if (this.loginCapePacket != null) {
~ ((EaglerMinecraftServer) entityplayermp.mcServer).getCapeService()
~ .processLoginPacket(this.loginCapePacket, entityplayermp);
~ }
~ GamePluginMessageProtocol.getByVersion(this.selectedProtocol),
~ IntegratedTexturePackets.handleTextureData(this.loginSkinPacket, this.loginCapePacket),
~ this.clientBrandUUID);
~ IntegratedVoiceService svc = ((EaglerMinecraftServer) entityplayermp.mcServer).getVoiceService();
~ if (svc != null) {
~ svc.handlePlayerLoggedIn(entityplayermp);
@ -117,7 +109,7 @@
~ int protocolCount = dis.readUnsignedShort();
~ for (int i = 0; i < protocolCount; ++i) {
~ int p = dis.readUnsignedShort();
~ if ((p == 3 || p == 4) && p > maxSupported) {
~ if ((p == 3 || p == 4 || p == 5) && p > maxSupported) {
~ maxSupported = p;
~ }
~ }

View File

@ -38,14 +38,13 @@
~ private StringTranslate() {
~ }
> CHANGE 1 : 25 @ 1 : 9
> CHANGE 1 : 24 @ 1 : 9
~ public static void initClient() {
~ try (InputStream inputstream = EagRuntime.getRequiredResourceStream("/assets/minecraft/lang/en_US.lang")) {
~ initServer(IOUtils.readLines(inputstream, StandardCharsets.UTF_8));
~ fallbackInstance = new StringTranslate();
~ fallbackInstance.replaceWith(instance.languageList);
~ SingleplayerServerController.updateLocale(dump());
~ } catch (IOException e) {
~ EagRuntime.debugPrintStackTrace(e);
~ }
@ -75,9 +74,10 @@
~ public static void replaceWith(Map<String, String> parMap) {
> CHANGE 2 : 3 @ 2 : 3
> CHANGE 2 : 4 @ 2 : 3
~ instance.lastUpdateTimeInMilliseconds = EagRuntime.steadyTimeMillis();
~ SingleplayerServerController.updateLocale(dump());
> CHANGE 2 : 3 @ 2 : 3

View File

@ -37,15 +37,13 @@
~ byte b0 = (byte) spawnHostileMobs.getMinecraftServer().getConfigurationManager().getViewDistance();
> CHANGE 4 : 9 @ 4 : 6
> CHANGE 4 : 7 @ 4 : 5
~ int cx = l + j;
~ int cz = i1 + k;
~ long chunkcoordintpair = ChunkCoordIntPair.chunkXZ2Int(cx, cz);
~ if (!this.eligibleChunksForSpawning.contains(chunkcoordintpair)
~ && spawnHostileMobs.theChunkProviderServer.chunkExists(cx, cz)) {
> CHANGE 13 : 16 @ 13 : 14
> CHANGE 14 : 17 @ 14 : 15
~ EnumCreatureType[] types = EnumCreatureType._VALUES;
~ for (int m = 0; m < types.length; ++m) {

View File

@ -16,7 +16,7 @@
~ eaglercraft.resourcePack.load.loading=Loading resource pack...
~ eaglercraft.resourcePack.load.deleting=Deleting resource pack...
> INSERT 1 : 246 @ 1
> INSERT 1 : 247 @ 1
+ eaglercraft.gui.exitKey=Use '%s' to close this screen!
+ eaglercraft.gui.exitKeyRetarded=Use Backtick (`) to close this screen!
@ -201,8 +201,9 @@
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.label=God Rays
+
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.0=Render god rays (light shafts) for sunlight and moonlight shadows
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.2=ON: render god rays (slower)
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.3=OFF: disable god rays (faster)
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.2=This shader tends to look unpleasent if the render distance is greater than the shadow map size
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.4=ON: render god rays (slower)
+ eaglercraft.shaders.gui.option.LIGHT_SHAFTS.desc.5=OFF: disable god rays (faster)
+
+ eaglercraft.shaders.gui.option.SCREEN_SPACE_REFLECTIONS.label=Raytracing
+
@ -264,7 +265,7 @@
+ eaglercraft.command.clientStub=This command is client side!
+
> INSERT 163 : 574 @ 163
> INSERT 163 : 578 @ 163
+ eaglercraft.singleplayer.busy.killTask=Cancel Task
+ eaglercraft.singleplayer.busy.cancelWarning=Are you sure?
@ -594,12 +595,16 @@
+ eaglercraft.fallbackWebViewScreen.openButton=Open
+ eaglercraft.fallbackWebViewScreen.exitButton=Exit
+
+ eaglercraft.webviewPhishingWaring.title=WARNING!!!
+ eaglercraft.webviewPhishingWaring.text0=If you see a login page, think before you enter a password
+ eaglercraft.webviewPhishingWaring.text1=Passwords can be stolen by the owner of this server or website
+ eaglercraft.webviewPhishingWaring.text2=Do not log in to accounts you don't want hackers to steal
+ eaglercraft.webviewPhishingWaring.dontShowAgain=Do not show this message again
+ eaglercraft.webviewPhishingWaring.continue=Continue
+ eaglercraft.webviewPhishingWarning.title=WARNING!!!
+ eaglercraft.webviewPhishingWarning.text0=If you see a login page, think before you enter a password
+ eaglercraft.webviewPhishingWarning.text1=Passwords can be stolen by the owner of this server or website
+ eaglercraft.webviewPhishingWarning.text2=Do not log in to accounts you don't want hackers to steal
+ eaglercraft.webviewPhishingWarning.dontShowAgain=Do not show this message again
+ eaglercraft.webviewPhishingWarning.continue=Continue
+
+ eaglercraft.webviewDisplayWarning.title=WebView Warning
+ eaglercraft.webviewDisplayWarning.text0=This server is attempting to display HTML content
+ eaglercraft.webviewDisplayWarning.text1=Would you like to continue?
+
+ eaglercraft.notifications.title=Notifications
+ eaglercraft.notifications.priority=Priority: %s