fixed skin issue
This commit is contained in:
parent
9f2bcf7e9d
commit
37bfa17c72
|
@ -41,6 +41,7 @@ public class PluginEaglerSkins extends Plugin implements Listener {
|
|||
if(event.getSender() instanceof UserConnection && event.getData().length > 0) {
|
||||
String user = ((UserConnection)event.getSender()).getName();
|
||||
byte[] msg = event.getData();
|
||||
try {
|
||||
if("EAG|MySkin".equals(event.getTag())) {
|
||||
int t = (int)msg[0] & 0xFF;
|
||||
if(t >= 0 && t < SKIN_DATA_SIZE.length && msg.length == (SKIN_DATA_SIZE[t] + 1)) {
|
||||
|
@ -63,6 +64,9 @@ public class PluginEaglerSkins extends Plugin implements Listener {
|
|||
}
|
||||
}
|
||||
}
|
||||
}catch(Throwable t) {
|
||||
// hacker
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ public class ConfigConstants {
|
|||
|
||||
public static boolean profanity = false;
|
||||
|
||||
public static final String version = "22w07a";
|
||||
public static final String version = "22w10a";
|
||||
public static final String mainMenuString = "eaglercraft " + version;
|
||||
|
||||
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
||||
|
|
|
@ -119,8 +119,10 @@ public class DefaultSkinRenderer {
|
|||
break;
|
||||
}
|
||||
|
||||
if(skinToLoad.length / 4 == w * h) {
|
||||
skinGLUnits.put(pp, Minecraft.getMinecraft().renderEngine.setupTextureRaw(skinToLoad, w, h));
|
||||
}
|
||||
}
|
||||
skinGLTimeout.put(pp, System.currentTimeMillis());
|
||||
Integer i = skinGLUnits.get(pp);
|
||||
if(i != null && i.intValue() > 0) {
|
||||
|
|
|
@ -60,6 +60,11 @@ public class EaglerProfile {
|
|||
}
|
||||
|
||||
int t = getSkinSize(data.length);
|
||||
|
||||
if(t == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int w, h;
|
||||
|
||||
switch(t) {
|
||||
|
|
|
@ -256,11 +256,12 @@ public class GuiScreenEditProfile extends GuiScreen {
|
|||
if(name.length() > 32) {
|
||||
name = name.substring(0, 32);
|
||||
}
|
||||
EaglerProfile.addSkin(name, rawSkin);
|
||||
if(EaglerProfile.addSkin(name, rawSkin) != -1) {
|
||||
selectedSlot = EaglerProfile.skinNames.size() - 1;
|
||||
this.dropDownOptions = EaglerProfile.concatArrays(EaglerProfile.skinNames.toArray(new String[0]), defaultOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onGuiClosed() {
|
||||
EaglerAdapter.enableRepeatEvents(false);
|
||||
|
|
|
@ -496,6 +496,9 @@ public class Minecraft implements Runnable {
|
|||
this.currentScreen.onGuiClosed();
|
||||
}
|
||||
|
||||
while(EaglerAdapter.keysNext());
|
||||
while(EaglerAdapter.mouseNext());
|
||||
|
||||
if (par1GuiScreen == null && this.theWorld == null) {
|
||||
par1GuiScreen = new GuiMainMenu();
|
||||
} else if (par1GuiScreen == null && this.thePlayer.getHealth() <= 0) {
|
||||
|
|
|
@ -25,7 +25,9 @@ public class Packet250CustomPayload extends Packet {
|
|||
this.length = par2ArrayOfByte.length;
|
||||
|
||||
if (this.length > 32767) {
|
||||
throw new IllegalArgumentException("Payload may not be larger than 32k");
|
||||
System.err.println("Tried to send '" + this.channel + "' with size " + this.length + " which is larger than the 32k so it was truncated down to 1 byte");
|
||||
this.length = 1;
|
||||
this.data = new byte[] { (byte) 0xFF };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1539,6 +1539,8 @@ public class RenderGlobal implements IWorldAccess {
|
|||
* Plays the specified record. Arg: recordName, x, y, z
|
||||
*/
|
||||
public void playRecord(String par1Str, int par2, int par3, int par4) {
|
||||
Minecraft.getMinecraft().displayEaglercraftText("records have been deleted to reduce file size");
|
||||
|
||||
ItemRecord var5 = ItemRecord.getRecord(par1Str);
|
||||
|
||||
if (par1Str != null && var5 != null) {
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.teavm.jso.ajax.ReadyStateChangeHandler;
|
|||
import org.teavm.jso.ajax.XMLHttpRequest;
|
||||
import org.teavm.jso.browser.TimerHandler;
|
||||
import org.teavm.jso.browser.Window;
|
||||
import org.teavm.jso.core.JSNumber;
|
||||
import org.teavm.jso.dom.events.EventListener;
|
||||
import org.teavm.jso.dom.events.KeyboardEvent;
|
||||
import org.teavm.jso.dom.events.MessageEvent;
|
||||
|
|
Loading…
Reference in New Issue
Block a user