22w13b LAST 'FREE' UPDATE [part 2] Fixed more bugs

This commit is contained in:
LAX1DUDE 2022-03-31 15:13:35 -07:00
parent a7790fe6c1
commit 86e4c8d04b
24 changed files with 82917 additions and 65470 deletions

View File

@ -30,10 +30,10 @@ public class MOTDConnectionImpl extends QueryConnectionImpl implements MOTD {
super(listener, addr, socket, "motd"); super(listener, addr, socket, "motd");
String[] lns = listener.getMotd().split("\n"); String[] lns = listener.getMotd().split("\n");
if(lns.length >= 1) { if(lns.length >= 1) {
line1 = lns[0].trim(); line1 = lns[0];
} }
if(lns.length >= 2) { if(lns.length >= 2) {
line2 = lns[1].trim(); line2 = lns[1];
} }
maxPlayers = listener.getMaxPlayers(); maxPlayers = listener.getMaxPlayers();
onlinePlayers = BungeeCord.getInstance().getOnlineCount(); onlinePlayers = BungeeCord.getInstance().getOnlineCount();

View File

@ -16,7 +16,7 @@ public class PluginEaglerSkins extends Plugin implements Listener {
private final HashMap<String,byte[]> skinCollection = new HashMap(); private final HashMap<String,byte[]> skinCollection = new HashMap();
private static final int[] SKIN_DATA_SIZE = new int[] { 64*32*4, 64*64*4, 128*64*4, 128*128*4, 64*64*4, 128*128*4, 1 }; private static final int[] SKIN_DATA_SIZE = new int[] { 64*32*4, 64*64*4, 128*64*4, 128*128*4, 1, 64*64*4, 128*128*4 };
private static final int VALID_DEFAULT_SKINS = 33; private static final int VALID_DEFAULT_SKINS = 33;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@ public class ConfigConstants {
public static boolean profanity = false; public static boolean profanity = false;
public static final String version = "22w13a"; public static final String version = "22w13b";
public static final String mainMenuString = "eaglercraft " + version; public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";

View File

@ -86,7 +86,9 @@ public class DefaultSkinRenderer {
Entry<EntityOtherPlayerMP,Long> ee = itr.next(); Entry<EntityOtherPlayerMP,Long> ee = itr.next();
if(System.currentTimeMillis() - ee.getValue() > 80000l) { if(System.currentTimeMillis() - ee.getValue() > 80000l) {
itr.remove(); itr.remove();
Minecraft.getMinecraft().renderEngine.deleteTexture(skinGLUnits.remove(ee.getKey())); if(skinGLUnits.containsKey(ee.getKey())) {
Minecraft.getMinecraft().renderEngine.deleteTexture(skinGLUnits.remove(ee.getKey()));
}
} }
} }
Iterator<Entry<Integer, EntityOtherPlayerMP>> itr2 = skinCookies.entrySet().iterator(); Iterator<Entry<Integer, EntityOtherPlayerMP>> itr2 = skinCookies.entrySet().iterator();
@ -105,7 +107,7 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) { }else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p; EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) { if(pp.skinPacket != null) {
if(((int)pp.skinPacket[0] & 0xFF) < 6) { if(((int)pp.skinPacket[0] & 0xFF) != 4) {
if(!skinGLUnits.containsKey(pp)) { if(!skinGLUnits.containsKey(pp)) {
byte[] skinToLoad = new byte[pp.skinPacket.length - 1]; byte[] skinToLoad = new byte[pp.skinPacket.length - 1];
System.arraycopy(pp.skinPacket, 1, skinToLoad, 0, skinToLoad.length); System.arraycopy(pp.skinPacket, 1, skinToLoad, 0, skinToLoad.length);
@ -118,7 +120,7 @@ public class DefaultSkinRenderer {
h = 32; h = 32;
break; break;
case 1: case 1:
case 4: case 5:
w = 64; w = 64;
h = 64; h = 64;
break; break;
@ -127,7 +129,7 @@ public class DefaultSkinRenderer {
h = 64; h = 64;
break; break;
case 3: case 3:
case 5: case 6:
w = 128; w = 128;
h = 128; h = 128;
break; break;
@ -205,8 +207,8 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) { }else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p; EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) { if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) { if(pp.skinPacket[0] != (byte)4) {
return (pp.skinPacket[0] == (byte)1) || (pp.skinPacket[0] == (byte)3) || (pp.skinPacket[0] == (byte)4) || (pp.skinPacket[0] == (byte)5); return (pp.skinPacket[0] == (byte)1) || (pp.skinPacket[0] == (byte)3) || (pp.skinPacket[0] == (byte)5) || (pp.skinPacket[0] == (byte)6);
}else { }else {
return isNewSkin((int)pp.skinPacket[1] & 0xFF); return isNewSkin((int)pp.skinPacket[1] & 0xFF);
} }
@ -225,8 +227,8 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) { }else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p; EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) { if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) { if(pp.skinPacket[0] != (byte)4) {
return (pp.skinPacket[0] == (byte)4) || (pp.skinPacket[0] == (byte)5); return (pp.skinPacket[0] == (byte)5) || (pp.skinPacket[0] == (byte)6);
}else { }else {
return isAlexSkin((int)pp.skinPacket[1] & 0xFF); return isAlexSkin((int)pp.skinPacket[1] & 0xFF);
} }
@ -245,7 +247,7 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) { }else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p; EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) { if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) { if(pp.skinPacket[0] != (byte)4) {
return true; return true;
}else { }else {
return isStandardModel((int)pp.skinPacket[1] & 0xFF); return isStandardModel((int)pp.skinPacket[1] & 0xFF);
@ -265,7 +267,7 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) { }else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p; EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) { if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) { if(pp.skinPacket[0] != (byte)4) {
return 0; return 0;
}else { }else {
return (int)pp.skinPacket[1] & 0xFF; return (int)pp.skinPacket[1] & 0xFF;

View File

@ -28,7 +28,7 @@ public class EaglerProfile {
public static String myChannel; public static String myChannel;
public static final int[] SKIN_DATA_SIZE = new int[] { 64*32*4, 64*64*4, 128*64*4, 128*128*4, 64*64*4, 128*128*4, 2 }; public static final int[] SKIN_DATA_SIZE = new int[] { 64*32*4, 64*64*4, 128*64*4, 128*128*4, 2, 64*64*4, 128*128*4 };
public static ArrayList<EaglerProfileSkin> skins = new ArrayList(); public static ArrayList<EaglerProfileSkin> skins = new ArrayList();
public static final EaglercraftRandom rand; public static final EaglercraftRandom rand;
@ -48,15 +48,15 @@ public class EaglerProfile {
byte[] d2 = new byte[1 + d.length]; byte[] d2 = new byte[1 + d.length];
d2[0] = (byte) getSkinSize(d.length); d2[0] = (byte) getSkinSize(d.length);
if(d2[0] == (byte)1 && skins.get(customSkinId).slim) { if(d2[0] == (byte)1 && skins.get(customSkinId).slim) {
d2[0] = (byte)4; d2[0] = (byte)5;
} }
if(d2[0] == (byte)3 && skins.get(customSkinId).slim) { if(d2[0] == (byte)3 && skins.get(customSkinId).slim) {
d2[0] = (byte)5; d2[0] = (byte)6;
} }
System.arraycopy(d, 0, d2, 1, d.length); System.arraycopy(d, 0, d2, 1, d.length);
return d2; return d2;
}else { }else {
return new byte[] { (byte)6, (byte)presetSkinId }; return new byte[] { (byte)4, (byte)presetSkinId };
} }
} }
@ -90,7 +90,7 @@ public class EaglerProfile {
h = 32; h = 32;
break; break;
case 1: case 1:
case 4: case 5:
w = 64; w = 64;
h = 64; h = 64;
break; break;
@ -99,7 +99,7 @@ public class EaglerProfile {
h = 64; h = 64;
break; break;
case 3: case 3:
case 5: case 6:
w = 128; w = 128;
h = 128; h = 128;
break; break;

View File

@ -399,8 +399,11 @@ public class GuiScreenEditProfile extends GuiScreen {
int skinHeight = 130; int skinHeight = 130;
if(par1 >= skinX && par2 >= skinY && par1 < skinX + skinWidth && par2 < skinY + skinHeight) { if(par1 >= skinX && par2 >= skinY && par1 < skinX + skinWidth && par2 < skinY + skinHeight) {
if(selectedSlot < EaglerProfile.skins.size()) { if(selectedSlot < EaglerProfile.skins.size()) {
newSkinWaitSteveOrAlex = true; int type = EaglerProfile.getSkinSize(EaglerProfile.skins.get(selectedSlot).data.length);
return; if(type == 1 || type == 3) {
newSkinWaitSteveOrAlex = true;
return;
}
} }
} }
} }

View File

@ -58,14 +58,22 @@ public class GuiScreen extends Gui {
* Returns a string stored in the system clipboard. * Returns a string stored in the system clipboard.
*/ */
public static String getClipboardString() { public static String getClipboardString() {
return EaglerAdapter.getClipboard(); try {
String s = EaglerAdapter.getClipboard();
return s == null ? "" : s;
}catch(Throwable t) {
return "";
}
} }
/** /**
* store a string in the system clipboard * store a string in the system clipboard
*/ */
public static void setClipboardString(String par0Str) { public static void setClipboardString(String par0Str) {
EaglerAdapter.setClipboard(par0Str); try {
EaglerAdapter.setClipboard(par0Str);
}catch(Throwable t) {
}
} }
/** /**

View File

@ -311,6 +311,9 @@ public abstract class GuiSlot {
int var14; int var14;
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE_MINUS_SRC_ALPHA);
for (var11 = 0; var11 < var4; ++var11) { for (var11 = 0; var11 < var4; ++var11) {
var20 = var10 + var11 * this.slotHeight + this.field_77242_t; var20 = var10 + var11 * this.slotHeight + this.field_77242_t;
var13 = this.slotHeight - 4; var13 = this.slotHeight - 4;

View File

@ -274,7 +274,7 @@ public class GuiTextField extends Gui {
this.setCursorPositionEnd(); this.setCursorPositionEnd();
this.setSelectionPos(0); this.setSelectionPos(0);
return true; return true;
/*
case 3: case 3:
String s = this.getSelectedtext(); String s = this.getSelectedtext();
if(s != null && s.length() > 0) { if(s != null && s.length() > 0) {
@ -296,7 +296,7 @@ public class GuiTextField extends Gui {
} }
this.writeText(""); this.writeText("");
return true; return true;
*/
default: default:
switch (par2) { switch (par2) {
case 14: case 14:

View File

@ -46,6 +46,7 @@ public class NetClientHandler extends NetHandler {
private GuiScreen field_98183_l = null; private GuiScreen field_98183_l = null;
private int updateCounter = 0; private int updateCounter = 0;
private int lastKeepAlive = 0; private int lastKeepAlive = 0;
private int focusTimer = 0;
/** RNG. */ /** RNG. */
EaglercraftRandom rand = new EaglercraftRandom(); EaglercraftRandom rand = new EaglercraftRandom();
@ -73,6 +74,8 @@ public class NetClientHandler extends NetHandler {
this.netManager = null; this.netManager = null;
this.worldClient = null; this.worldClient = null;
} }
/** /**
* Processes the packets that have been read since the last call to this * Processes the packets that have been read since the last call to this
@ -80,12 +83,17 @@ public class NetClientHandler extends NetHandler {
*/ */
public void processReadPackets() { public void processReadPackets() {
++this.updateCounter; ++this.updateCounter;
if(updateCounter - lastKeepAlive > 500 || !EaglerAdapter.connectionOpen()) { if(EaglerAdapter.isFocused()) {
this.mc.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.disconnected", "disconnect." + (EaglerAdapter.connectionOpen() ? "endOfStream" :" timeout"), null)); --focusTimer;
this.netManager.closeConnections(); if((focusTimer < 0 && updateCounter - lastKeepAlive > 200) || !EaglerAdapter.connectionOpen()) {
this.disconnected = true; this.mc.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.disconnected", "disconnect." + (EaglerAdapter.connectionOpen() ? "endOfStream" :" timeout"), null));
this.mc.loadWorld((WorldClient) null); this.netManager.closeConnections();
return; this.disconnected = true;
this.mc.loadWorld((WorldClient) null);
return;
}
}else {
focusTimer = 60;
} }
if (!this.disconnected && this.netManager != null) { if (!this.disconnected && this.netManager != null) {
this.netManager.processReadPackets(); this.netManager.processReadPackets();
@ -1076,6 +1084,7 @@ public class NetClientHandler extends NetHandler {
* Handle a keep alive packet. * Handle a keep alive packet.
*/ */
public void handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive) { public void handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive) {
//System.out.println(updateCounter - lastKeepAlive);
lastKeepAlive = updateCounter; lastKeepAlive = updateCounter;
this.addToSendQueue(new Packet0KeepAlive(par1Packet0KeepAlive.randomId)); this.addToSendQueue(new Packet0KeepAlive(par1Packet0KeepAlive.randomId));
} }

View File

@ -1352,6 +1352,7 @@ public class RenderGlobal implements IWorldAccess {
EaglerAdapter.glPushMatrix(); EaglerAdapter.glPushMatrix();
EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST); EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST);
EaglerAdapter.glPolygonOffset(-3.0F, -3.0F); EaglerAdapter.glPolygonOffset(-3.0F, -3.0F);
EaglerAdapter.glDepthMask(false);
EaglerAdapter.glEnable(EaglerAdapter.GL_POLYGON_OFFSET_FILL); EaglerAdapter.glEnable(EaglerAdapter.GL_POLYGON_OFFSET_FILL);
EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST); EaglerAdapter.glEnable(EaglerAdapter.GL_ALPHA_TEST);
par1Tessellator.startDrawingQuads(); par1Tessellator.startDrawingQuads();

View File

@ -233,13 +233,14 @@ public class RenderPlayer extends RenderLiving {
super.renderEquippedItems(par1EntityPlayer, par2); super.renderEquippedItems(par1EntityPlayer, par2);
super.renderArrowsStuckInEntity(par1EntityPlayer, par2); super.renderArrowsStuckInEntity(par1EntityPlayer, par2);
ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3); ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3);
boolean isNew = DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer); boolean isNew = DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer);
boolean isSlim = DefaultSkinRenderer.isPlayerNewSkinSlim(par1EntityPlayer);
int renderType = DefaultSkinRenderer.getPlayerRenderer(par1EntityPlayer); int renderType = DefaultSkinRenderer.getPlayerRenderer(par1EntityPlayer);
if (var4 != null) { if (var4 != null) {
EaglerAdapter.glPushMatrix(); EaglerAdapter.glPushMatrix();
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).bipedHead.postRender(0.0625F); (isNew ? (isSlim ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain).bipedHead.postRender(0.0625F);
float var5; float var5;
if (var4.getItem().itemID < 256) { if (var4.getItem().itemID < 256) {
@ -345,7 +346,7 @@ public class RenderPlayer extends RenderLiving {
if(DefaultSkinRenderer.isZombieModel(renderType) || renderType == 20) { if(DefaultSkinRenderer.isZombieModel(renderType) || renderType == 20) {
((ModelBiped)this.mainModel).bipedRightArm.postRender(0.0625F); ((ModelBiped)this.mainModel).bipedRightArm.postRender(0.0625F);
}else { }else {
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).bipedRightArm.postRender(0.0625F); (isNew ? (isSlim ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain).bipedRightArm.postRender(0.0625F);
} }
EaglerAdapter.glTranslatef(-0.0625F, 0.4375F, 0.0625F); EaglerAdapter.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
@ -460,9 +461,10 @@ public class RenderPlayer extends RenderLiving {
int i = DefaultSkinRenderer.getPlayerRenderer(par1EntityPlayer); int i = DefaultSkinRenderer.getPlayerRenderer(par1EntityPlayer);
if(DefaultSkinRenderer.isStandardModel(i) || DefaultSkinRenderer.isZombieModel(i)) { if(DefaultSkinRenderer.isStandardModel(i) || DefaultSkinRenderer.isZombieModel(i)) {
boolean isNew = DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer); boolean isNew = DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer);
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).onGround = 0.0F; boolean isSlim = DefaultSkinRenderer.isPlayerNewSkinSlim(par1EntityPlayer);
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, par1EntityPlayer); (isNew ? (isSlim ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain).onGround = 0.0F;
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).bipedRightArm.render(0.0625F); (isNew ? (isSlim ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain).setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, par1EntityPlayer);
(isNew ? (isSlim ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain).bipedRightArm.render(0.0625F);
} }
} }

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

17354
stable-download/web/classes.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
This folder is displaying an update notice to replit users still running an old version of the update script
Go to the ../web_folder to get the latest website files