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");
String[] lns = listener.getMotd().split("\n");
if(lns.length >= 1) {
line1 = lns[0].trim();
line1 = lns[0];
}
if(lns.length >= 2) {
line2 = lns[1].trim();
line2 = lns[1];
}
maxPlayers = listener.getMaxPlayers();
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 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;

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 final String version = "22w13a";
public static final String version = "22w13b";
public static final String mainMenuString = "eaglercraft " + version;
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();
if(System.currentTimeMillis() - ee.getValue() > 80000l) {
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();
@ -105,7 +107,7 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) {
if(((int)pp.skinPacket[0] & 0xFF) < 6) {
if(((int)pp.skinPacket[0] & 0xFF) != 4) {
if(!skinGLUnits.containsKey(pp)) {
byte[] skinToLoad = new byte[pp.skinPacket.length - 1];
System.arraycopy(pp.skinPacket, 1, skinToLoad, 0, skinToLoad.length);
@ -118,7 +120,7 @@ public class DefaultSkinRenderer {
h = 32;
break;
case 1:
case 4:
case 5:
w = 64;
h = 64;
break;
@ -127,7 +129,7 @@ public class DefaultSkinRenderer {
h = 64;
break;
case 3:
case 5:
case 6:
w = 128;
h = 128;
break;
@ -205,8 +207,8 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) {
return (pp.skinPacket[0] == (byte)1) || (pp.skinPacket[0] == (byte)3) || (pp.skinPacket[0] == (byte)4) || (pp.skinPacket[0] == (byte)5);
if(pp.skinPacket[0] != (byte)4) {
return (pp.skinPacket[0] == (byte)1) || (pp.skinPacket[0] == (byte)3) || (pp.skinPacket[0] == (byte)5) || (pp.skinPacket[0] == (byte)6);
}else {
return isNewSkin((int)pp.skinPacket[1] & 0xFF);
}
@ -225,8 +227,8 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) {
return (pp.skinPacket[0] == (byte)4) || (pp.skinPacket[0] == (byte)5);
if(pp.skinPacket[0] != (byte)4) {
return (pp.skinPacket[0] == (byte)5) || (pp.skinPacket[0] == (byte)6);
}else {
return isAlexSkin((int)pp.skinPacket[1] & 0xFF);
}
@ -245,7 +247,7 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) {
if(pp.skinPacket[0] != (byte)4) {
return true;
}else {
return isStandardModel((int)pp.skinPacket[1] & 0xFF);
@ -265,7 +267,7 @@ public class DefaultSkinRenderer {
}else if(p instanceof EntityOtherPlayerMP) {
EntityOtherPlayerMP pp = (EntityOtherPlayerMP) p;
if(pp.skinPacket != null) {
if(pp.skinPacket[0] < (byte)6) {
if(pp.skinPacket[0] != (byte)4) {
return 0;
}else {
return (int)pp.skinPacket[1] & 0xFF;

View File

@ -28,7 +28,7 @@ public class EaglerProfile {
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 final EaglercraftRandom rand;
@ -48,15 +48,15 @@ public class EaglerProfile {
byte[] d2 = new byte[1 + d.length];
d2[0] = (byte) getSkinSize(d.length);
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) {
d2[0] = (byte)5;
d2[0] = (byte)6;
}
System.arraycopy(d, 0, d2, 1, d.length);
return d2;
}else {
return new byte[] { (byte)6, (byte)presetSkinId };
return new byte[] { (byte)4, (byte)presetSkinId };
}
}
@ -90,7 +90,7 @@ public class EaglerProfile {
h = 32;
break;
case 1:
case 4:
case 5:
w = 64;
h = 64;
break;
@ -99,7 +99,7 @@ public class EaglerProfile {
h = 64;
break;
case 3:
case 5:
case 6:
w = 128;
h = 128;
break;

View File

@ -399,8 +399,11 @@ public class GuiScreenEditProfile extends GuiScreen {
int skinHeight = 130;
if(par1 >= skinX && par2 >= skinY && par1 < skinX + skinWidth && par2 < skinY + skinHeight) {
if(selectedSlot < EaglerProfile.skins.size()) {
newSkinWaitSteveOrAlex = true;
return;
int type = EaglerProfile.getSkinSize(EaglerProfile.skins.get(selectedSlot).data.length);
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.
*/
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
*/
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;
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
EaglerAdapter.glBlendFunc(EaglerAdapter.GL_SRC_ALPHA, EaglerAdapter.GL_ONE_MINUS_SRC_ALPHA);
for (var11 = 0; var11 < var4; ++var11) {
var20 = var10 + var11 * this.slotHeight + this.field_77242_t;
var13 = this.slotHeight - 4;

View File

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

View File

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

View File

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

View File

@ -235,11 +235,12 @@ public class RenderPlayer extends RenderLiving {
ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3);
boolean isNew = DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer);
boolean isSlim = DefaultSkinRenderer.isPlayerNewSkinSlim(par1EntityPlayer);
int renderType = DefaultSkinRenderer.getPlayerRenderer(par1EntityPlayer);
if (var4 != null) {
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;
if (var4.getItem().itemID < 256) {
@ -345,7 +346,7 @@ public class RenderPlayer extends RenderLiving {
if(DefaultSkinRenderer.isZombieModel(renderType) || renderType == 20) {
((ModelBiped)this.mainModel).bipedRightArm.postRender(0.0625F);
}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);
@ -460,9 +461,10 @@ public class RenderPlayer extends RenderLiving {
int i = DefaultSkinRenderer.getPlayerRenderer(par1EntityPlayer);
if(DefaultSkinRenderer.isStandardModel(i) || DefaultSkinRenderer.isZombieModel(i)) {
boolean isNew = DefaultSkinRenderer.isPlayerNewSkin(par1EntityPlayer);
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).onGround = 0.0F;
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, par1EntityPlayer);
(isNew ? this.modelBipedMainNewSkin : this.modelBipedMain).bipedRightArm.render(0.0625F);
boolean isSlim = DefaultSkinRenderer.isPlayerNewSkinSlim(par1EntityPlayer);
(isNew ? (isSlim ? this.modelBipedMainNewSkinSlim : this.modelBipedMainNewSkin) : this.modelBipedMain).onGround = 0.0F;
(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