mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #36 - Fix incorrect use of arithmetic shift, more capes
This commit is contained in:
@ -226,6 +226,9 @@ public class EagRuntime {
|
||||
return PlatformRuntime.maxMemory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Note to skids: This doesn't do anything in TeaVM runtime!
|
||||
*/
|
||||
public static long totalMemory() {
|
||||
return PlatformRuntime.totalMemory();
|
||||
}
|
||||
@ -322,4 +325,8 @@ public class EagRuntime {
|
||||
input.setCalendar(getLocaleCalendar());
|
||||
return input;
|
||||
}
|
||||
|
||||
public static void setMCServerWindowGlobal(String url) {
|
||||
PlatformApplication.setMCServerWindowGlobal(url);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ public class EaglercraftVersion {
|
||||
/// Customize these to fit your fork:
|
||||
|
||||
public static final String projectForkName = "EaglercraftX";
|
||||
public static final String projectForkVersion = "u35";
|
||||
public static final String projectForkVersion = "u36";
|
||||
public static final String projectForkVendor = "lax1dude";
|
||||
|
||||
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||
@ -20,7 +20,7 @@ public class EaglercraftVersion {
|
||||
public static final String projectOriginName = "EaglercraftX";
|
||||
public static final String projectOriginAuthor = "lax1dude";
|
||||
public static final String projectOriginRevision = "1.8";
|
||||
public static final String projectOriginVersion = "u35";
|
||||
public static final String projectOriginVersion = "u36";
|
||||
|
||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
||||
|
||||
@ -31,7 +31,7 @@ public class EaglercraftVersion {
|
||||
public static final boolean enableUpdateService = true;
|
||||
|
||||
public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client";
|
||||
public static final int updateBundlePackageVersionInt = 35;
|
||||
public static final int updateBundlePackageVersionInt = 36;
|
||||
|
||||
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package net.lax1dude.eaglercraft.v1_8.internal;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
@ -21,4 +23,6 @@ public interface IClientConfigAdapterHooks {
|
||||
|
||||
String callLocalStorageLoadHook(String key);
|
||||
|
||||
void callCrashReportHook(String crashReport, Consumer<String> customMessageCB);
|
||||
|
||||
}
|
||||
|
@ -72,14 +72,14 @@ public class AcceleratedEffectRenderer implements IAcceleratedParticleEngine {
|
||||
public void drawParticle(float posX, float posY, float posZ, int particleIndexX, int particleIndexY,
|
||||
int lightMapData, int texSize, float particleSize, float r, float g, float b, float a) {
|
||||
InstancedParticleRenderer.appendParticle(posX, posY, posZ, particleIndexX, particleIndexY, lightMapData & 0xFF,
|
||||
(lightMapData >> 16) & 0xFF, (int)(particleSize * 16.0f), texSize, r, g, b, a);
|
||||
(lightMapData >>> 16) & 0xFF, (int)(particleSize * 16.0f), texSize, r, g, b, a);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawParticle(float posX, float posY, float posZ, int particleIndexX, int particleIndexY,
|
||||
int lightMapData, int texSize, float particleSize, int rgba) {
|
||||
InstancedParticleRenderer.appendParticle(posX, posY, posZ, particleIndexX, particleIndexY, lightMapData & 0xFF,
|
||||
(lightMapData >> 16) & 0xFF, (int)(particleSize * 16.0f), texSize, rgba);
|
||||
(lightMapData >>> 16) & 0xFF, (int)(particleSize * 16.0f), texSize, rgba);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -47,10 +47,10 @@ public class EaglerFontRenderer extends FontRenderer {
|
||||
if ((color & 0xFC000000) == 0) {
|
||||
color |= 0xFF000000;
|
||||
}
|
||||
this.red = (float) (color >> 16 & 255) / 255.0F;
|
||||
this.blue = (float) (color >> 8 & 255) / 255.0F;
|
||||
this.red = (float) (color >>> 16 & 255) / 255.0F;
|
||||
this.blue = (float) (color >>> 8 & 255) / 255.0F;
|
||||
this.green = (float) (color & 255) / 255.0F;
|
||||
this.alpha = (float) (color >> 24 & 255) / 255.0F;
|
||||
this.alpha = (float) (color >>> 24 & 255) / 255.0F;
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.textColor = color;
|
||||
|
@ -72,8 +72,8 @@ public class ByteBufEaglercraftImpl extends AbstractByteBuf {
|
||||
|
||||
@Override
|
||||
protected void _setMedium(int index, int value) {
|
||||
internal.put(index, (byte)((value >> 16) & 0xFF));
|
||||
internal.put(index + 1, (byte)((value >> 8) & 0xFF));
|
||||
internal.put(index, (byte)((value >>> 16) & 0xFF));
|
||||
internal.put(index + 1, (byte)((value >>> 8) & 0xFF));
|
||||
internal.put(index + 2, (byte)(value & 0xFF));
|
||||
}
|
||||
|
||||
|
@ -118,14 +118,14 @@ public class ImageData {
|
||||
if((spx & 0xFF000000) == 0xFF000000 || (dpx & 0xFF000000) == 0) {
|
||||
pixels[di] = spx;
|
||||
}else {
|
||||
int sa = (spx >> 24) & 0xFF;
|
||||
int da = (dpx >> 24) & 0xFF;
|
||||
int r = ((spx >> 16) & 0xFF) * sa / 255;
|
||||
int g = ((spx >> 8) & 0xFF) * sa / 255;
|
||||
int sa = (spx >>> 24) & 0xFF;
|
||||
int da = (dpx >>> 24) & 0xFF;
|
||||
int r = ((spx >>> 16) & 0xFF) * sa / 255;
|
||||
int g = ((spx >>> 8) & 0xFF) * sa / 255;
|
||||
int b = (spx & 0xFF) * sa / 255;
|
||||
int aa = (255 - sa) * da;
|
||||
r += ((dpx >> 16) & 0xFF) * aa / 65025;
|
||||
g += ((dpx >> 8) & 0xFF) * aa / 65025;
|
||||
r += ((dpx >>> 16) & 0xFF) * aa / 65025;
|
||||
g += ((dpx >>> 8) & 0xFF) * aa / 65025;
|
||||
b += (dpx & 0xFF) * aa / 65025;
|
||||
sa += da;
|
||||
if(sa > 0xFF) sa = 0xFF;
|
||||
@ -138,14 +138,14 @@ public class ImageData {
|
||||
public ImageData swapRB() {
|
||||
for(int i = 0; i < pixels.length; ++i) {
|
||||
int j = pixels[i];
|
||||
pixels[i] = (j & 0xFF00FF00) | ((j & 0x00FF0000) >> 16) |
|
||||
pixels[i] = (j & 0xFF00FF00) | ((j & 0x00FF0000) >>> 16) |
|
||||
((j & 0x000000FF) << 16);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public static int swapRB(int c) {
|
||||
return (c & 0xFF00FF00) | ((c & 0x00FF0000) >> 16) | ((c & 0x000000FF) << 16);
|
||||
return (c & 0xFF00FF00) | ((c & 0x00FF0000) >>> 16) | ((c & 0x000000FF) << 16);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ public class InstancedFontRenderer {
|
||||
buf.putShort((short)y);
|
||||
buf.put((byte)cx);
|
||||
buf.put((byte)cy);
|
||||
color = ((color >> 1) & 0x7F000000) | (color & 0xFFFFFF);
|
||||
color = ((color >>> 1) & 0x7F000000) | (color & 0xFFFFFF);
|
||||
if(italic) {
|
||||
color |= 0x80000000;
|
||||
}
|
||||
@ -438,7 +438,7 @@ public class InstancedFontRenderer {
|
||||
buf.putShort((short)y);
|
||||
buf.put((byte)cx);
|
||||
buf.put((byte)cy);
|
||||
color = ((color >> 1) & 0x7F000000) | (color & 0xFFFFFF);
|
||||
color = ((color >>> 1) & 0x7F000000) | (color & 0xFFFFFF);
|
||||
if(italic) {
|
||||
color |= 0x80000000;
|
||||
}
|
||||
|
@ -267,8 +267,8 @@ public class WorldRenderer {
|
||||
if (!this.needsUpdate) {
|
||||
j = this.intBuffer.get(i);
|
||||
int k = (int) ((float) (j & 255) * red);
|
||||
int l = (int) ((float) (j >> 8 & 255) * green);
|
||||
int i1 = (int) ((float) (j >> 16 & 255) * blue);
|
||||
int l = (int) ((float) (j >>> 8 & 255) * green);
|
||||
int i1 = (int) ((float) (j >>> 16 & 255) * blue);
|
||||
j = j & -16777216;
|
||||
j = j | i1 << 16 | l << 8 | k;
|
||||
}
|
||||
@ -280,10 +280,10 @@ public class WorldRenderer {
|
||||
*/
|
||||
private void putColor(int argb, int parInt2) {
|
||||
int i = this.getColorIndex(parInt2);
|
||||
int j = argb >> 16 & 255;
|
||||
int k = argb >> 8 & 255;
|
||||
int j = argb >>> 16 & 255;
|
||||
int k = argb >>> 8 & 255;
|
||||
int l = argb & 255;
|
||||
int i1 = argb >> 24 & 255;
|
||||
int i1 = argb >>> 24 & 255;
|
||||
this.putColorRGBA(i, j, k, l, i1);
|
||||
}
|
||||
|
||||
|
@ -63,8 +63,8 @@ public class CapePackets {
|
||||
}
|
||||
|
||||
public static byte[] writeMyCapePreset(int capeId) {
|
||||
return new byte[] { (byte) PACKET_MY_CAPE_PRESET, (byte) (capeId >> 24), (byte) (capeId >> 16),
|
||||
(byte) (capeId >> 8), (byte) (capeId & 0xFF) };
|
||||
return new byte[] { (byte) PACKET_MY_CAPE_PRESET, (byte) (capeId >>> 24), (byte) (capeId >>> 16),
|
||||
(byte) (capeId >>> 8), (byte) (capeId & 0xFF) };
|
||||
}
|
||||
|
||||
public static byte[] writeMyCapeCustom(CustomCape customCape) {
|
||||
|
@ -39,9 +39,14 @@ public enum DefaultCapes {
|
||||
SNOWMAN(17, "Snowman", new ResourceLocation("eagler:capes/17.snowman.png")),
|
||||
SPADE(18, "Spade", new ResourceLocation("eagler:capes/18.spade.png")),
|
||||
BIRTHDAY(19, "Birthday", new ResourceLocation("eagler:capes/19.birthday.png")),
|
||||
DB(20, "dB", new ResourceLocation("eagler:capes/20.db.png"));
|
||||
DB(20, "dB", new ResourceLocation("eagler:capes/20.db.png")),
|
||||
_15TH_ANNIVERSARY(21, "15th Anniversary", new ResourceLocation("eagler:capes/21.15th_anniversary.png")),
|
||||
VANILLA(22, "Vanilla", new ResourceLocation("eagler:capes/22.vanilla.png")),
|
||||
TIKTOK(23, "TikTok", new ResourceLocation("eagler:capes/23.tiktok.png")),
|
||||
PURPLE_HEART(24, "Purple Heart", new ResourceLocation("eagler:capes/24.purple_heart.png")),
|
||||
CHERRY_BLOSSOM(25, "Cherry Blossom", new ResourceLocation("eagler:capes/25.cherry_blossom.png"));
|
||||
|
||||
public static final DefaultCapes[] defaultCapesMap = new DefaultCapes[21];
|
||||
public static final DefaultCapes[] defaultCapesMap = new DefaultCapes[26];
|
||||
|
||||
public final int id;
|
||||
public final String name;
|
||||
|
@ -345,9 +345,9 @@ public class GuiScreenEditProfile extends GuiScreen {
|
||||
for(int i = 0, j, k; i < 4096; ++i) {
|
||||
j = i << 2;
|
||||
k = loadedSkin.pixels[i];
|
||||
rawSkin[j] = (byte)(k >> 24);
|
||||
rawSkin[j + 1] = (byte)(k >> 16);
|
||||
rawSkin[j + 2] = (byte)(k >> 8);
|
||||
rawSkin[j] = (byte)(k >>> 24);
|
||||
rawSkin[j + 1] = (byte)(k >>> 16);
|
||||
rawSkin[j + 2] = (byte)(k >>> 8);
|
||||
rawSkin[j + 3] = (byte)(k & 0xFF);
|
||||
}
|
||||
for(int y = 20; y < 32; ++y) {
|
||||
|
@ -59,7 +59,7 @@ public class ProfileExporter {
|
||||
+ (doExportServers ? "servers " : "") + (doExportResourcePacks ? "resourcePacks" : "") + "\n\n")
|
||||
.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
osb.write((comment.length >> 8) & 255);
|
||||
osb.write((comment.length >>> 8) & 255);
|
||||
osb.write(comment.length & 255);
|
||||
osb.write(comment);
|
||||
|
||||
@ -164,9 +164,9 @@ public class ProfileExporter {
|
||||
|
||||
byte[] ret = osb.toByteArray();
|
||||
|
||||
ret[lengthIntegerOffset] = (byte)((fileCount >> 24) & 0xFF);
|
||||
ret[lengthIntegerOffset + 1] = (byte)((fileCount >> 16) & 0xFF);
|
||||
ret[lengthIntegerOffset + 2] = (byte)((fileCount >> 8) & 0xFF);
|
||||
ret[lengthIntegerOffset] = (byte)((fileCount >>> 24) & 0xFF);
|
||||
ret[lengthIntegerOffset + 1] = (byte)((fileCount >>> 16) & 0xFF);
|
||||
ret[lengthIntegerOffset + 2] = (byte)((fileCount >>> 8) & 0xFF);
|
||||
ret[lengthIntegerOffset + 3] = (byte)(fileCount & 0xFF);
|
||||
|
||||
logger.info("Export complete!");
|
||||
|
@ -42,8 +42,8 @@ public class SkinConverter {
|
||||
i = (y * 23 + x) * 3;
|
||||
j = skinIn.pixels[y * skinIn.width + x];
|
||||
if((j & 0xFF000000) != 0) {
|
||||
skinOut[i] = (byte)(j >> 16);
|
||||
skinOut[i + 1] = (byte)(j >> 8);
|
||||
skinOut[i] = (byte)(j >>> 16);
|
||||
skinOut[i + 1] = (byte)(j >>> 8);
|
||||
skinOut[i + 2] = (byte)(j & 0xFF);
|
||||
}else {
|
||||
skinOut[i] = skinOut[i + 1] = skinOut[i + 2] = 0;
|
||||
@ -54,8 +54,8 @@ public class SkinConverter {
|
||||
i = ((y + 6) * 23 + 22) * 3;
|
||||
j = skinIn.pixels[(y + 11) * skinIn.width + 22];
|
||||
if((j & 0xFF000000) != 0) {
|
||||
skinOut[i] = (byte)(j >> 16);
|
||||
skinOut[i + 1] = (byte)(j >> 8);
|
||||
skinOut[i] = (byte)(j >>> 16);
|
||||
skinOut[i + 1] = (byte)(j >>> 8);
|
||||
skinOut[i + 2] = (byte)(j & 0xFF);
|
||||
}else {
|
||||
skinOut[i] = skinOut[i + 1] = skinOut[i + 2] = 0;
|
||||
|
@ -81,8 +81,8 @@ public class SkinPackets {
|
||||
}
|
||||
|
||||
public static byte[] writeMySkinPreset(int skinId) {
|
||||
return new byte[] { (byte) PACKET_MY_SKIN_PRESET, (byte) (skinId >> 24), (byte) (skinId >> 16),
|
||||
(byte) (skinId >> 8), (byte) (skinId & 0xFF) };
|
||||
return new byte[] { (byte) PACKET_MY_SKIN_PRESET, (byte) (skinId >>> 24), (byte) (skinId >>> 16),
|
||||
(byte) (skinId >>> 8), (byte) (skinId & 0xFF) };
|
||||
}
|
||||
|
||||
public static byte[] writeMySkinCustom(CustomSkin customSkin) {
|
||||
|
@ -191,12 +191,12 @@ public class ConnectionHandshake {
|
||||
|
||||
int passLen = password.length();
|
||||
|
||||
digest.update((byte)((passLen >> 8) & 0xFF));
|
||||
digest.update((byte)((passLen >>> 8) & 0xFF));
|
||||
digest.update((byte)(passLen & 0xFF));
|
||||
|
||||
for(int i = 0; i < passLen; ++i) {
|
||||
char codePoint = password.charAt(i);
|
||||
digest.update((byte)((codePoint >> 8) & 0xFF));
|
||||
digest.update((byte)((codePoint >>> 8) & 0xFF));
|
||||
digest.update((byte)(codePoint & 0xFF));
|
||||
}
|
||||
|
||||
|
@ -57,9 +57,9 @@ public class SkullCommand {
|
||||
for(int i = 0, j, k; i < 4096; ++i) {
|
||||
j = i << 2;
|
||||
k = loaded.pixels[i];
|
||||
rawSkin[j] = (byte)(k >> 24);
|
||||
rawSkin[j + 1] = (byte)(k >> 16);
|
||||
rawSkin[j + 2] = (byte)(k >> 8);
|
||||
rawSkin[j] = (byte)(k >>> 24);
|
||||
rawSkin[j + 1] = (byte)(k >>> 16);
|
||||
rawSkin[j + 2] = (byte)(k >>> 8);
|
||||
rawSkin[j + 3] = (byte)(k & 0xFF);
|
||||
}
|
||||
mc.thePlayer.sendQueue.addToSendQueue(new C17PacketCustomPayload("EAG|Skins-1.8", SkinPackets.writeCreateCustomSkull(rawSkin)));
|
||||
|
@ -8,8 +8,10 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServer;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServerSocket;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.socket.NetHandlerSingleplayerLogin;
|
||||
import net.minecraft.client.LoadingScreenRenderer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiDisconnected;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.login.client.C00PacketLoginStart;
|
||||
@ -54,6 +56,7 @@ public class GuiScreenLANConnecting extends GuiScreen {
|
||||
this.parent = parent;
|
||||
this.code = code;
|
||||
this.relay = relay;
|
||||
Minecraft.getMinecraft().setServerData(new ServerData("Shared World", "shared:" + relay.address, false));
|
||||
}
|
||||
|
||||
public boolean doesGuiPauseGame() {
|
||||
|
@ -32,7 +32,7 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.*;
|
||||
*/
|
||||
public class LANServerController {
|
||||
|
||||
public static final Logger logger = LogManager.getLogger("IntegratedServerLAN");
|
||||
public static final Logger logger = LogManager.getLogger("LANServerController");
|
||||
|
||||
public static final List<String> currentICEServers = new ArrayList();
|
||||
|
||||
|
@ -154,7 +154,7 @@ public class IPacket {
|
||||
is.write(0);
|
||||
}else {
|
||||
int l = txt.length();
|
||||
is.write((l >> 8) & 0xFF);
|
||||
is.write((l >>> 8) & 0xFF);
|
||||
is.write(l & 0xFF);
|
||||
for(int i = 0; i < l; ++i) {
|
||||
is.write((int)txt.charAt(i));
|
||||
|
@ -41,8 +41,8 @@ public class EaglerChunkLoader extends AnvilChunkLoader {
|
||||
|
||||
char[] path = new char[12];
|
||||
for(int i = 5; i >= 0; --i) {
|
||||
path[i] = hex.charAt((unsignedX >> (i * 4)) & 0xF);
|
||||
path[i + 6] = hex.charAt((unsignedZ >> (i * 4)) & 0xF);
|
||||
path[i] = hex.charAt((unsignedX >>> (i << 2)) & 0xF);
|
||||
path[i + 6] = hex.charAt((unsignedZ >>> (i << 2)) & 0xF);
|
||||
}
|
||||
|
||||
return new String(path);
|
||||
|
@ -49,7 +49,7 @@ public class EPKCompiler {
|
||||
EagRuntime.fixDateFormat(new SimpleDateFormat("hh:mm:ss aa")).format(d) + "\n\n # world name: " + name + "\n\n")
|
||||
.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
os.write((comment.length >> 8) & 255);
|
||||
os.write((comment.length >>> 8) & 255);
|
||||
os.write(comment.length & 255);
|
||||
os.write(comment);
|
||||
|
||||
@ -134,9 +134,9 @@ public class EPKCompiler {
|
||||
|
||||
byte[] ret = os.toByteArray();
|
||||
|
||||
ret[lengthIntegerOffset] = (byte)((totalFileCount >> 24) & 0xFF);
|
||||
ret[lengthIntegerOffset + 1] = (byte)((totalFileCount >> 16) & 0xFF);
|
||||
ret[lengthIntegerOffset + 2] = (byte)((totalFileCount >> 8) & 0xFF);
|
||||
ret[lengthIntegerOffset] = (byte)(totalFileCount >>> 24);
|
||||
ret[lengthIntegerOffset + 1] = (byte)(totalFileCount >>> 16);
|
||||
ret[lengthIntegerOffset + 2] = (byte)(totalFileCount >>> 8);
|
||||
ret[lengthIntegerOffset + 3] = (byte)(totalFileCount & 0xFF);
|
||||
|
||||
return ret;
|
||||
@ -147,21 +147,21 @@ public class EPKCompiler {
|
||||
}
|
||||
|
||||
public static void writeInt(int i, OutputStream os) throws IOException {
|
||||
os.write((i >> 24) & 0xFF);
|
||||
os.write((i >> 16) & 0xFF);
|
||||
os.write((i >> 8) & 0xFF);
|
||||
os.write((i >>> 24) & 0xFF);
|
||||
os.write((i >>> 16) & 0xFF);
|
||||
os.write((i >>> 8) & 0xFF);
|
||||
os.write(i & 0xFF);
|
||||
}
|
||||
|
||||
public static void writeLong(long i, OutputStream os) throws IOException {
|
||||
os.write((int)((i >> 56) & 0xFF));
|
||||
os.write((int)((i >> 48) & 0xFF));
|
||||
os.write((int)((i >> 40) & 0xFF));
|
||||
os.write((int)((i >> 32) & 0xFF));
|
||||
os.write((int)((i >> 24) & 0xFF));
|
||||
os.write((int)((i >> 16) & 0xFF));
|
||||
os.write((int)((i >> 8) & 0xFF));
|
||||
os.write((int)(i & 0xFF));
|
||||
os.write((int)((i >>> 56l) & 0xFFl));
|
||||
os.write((int)((i >>> 48l) & 0xFFl));
|
||||
os.write((int)((i >>> 40l) & 0xFFl));
|
||||
os.write((int)((i >>> 32l) & 0xFFl));
|
||||
os.write((int)((i >>> 24l) & 0xFFl));
|
||||
os.write((int)((i >>> 16l) & 0xFFl));
|
||||
os.write((int)((i >>> 8l) & 0xFFl));
|
||||
os.write((int)(i & 0xFFl));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -89,9 +89,9 @@ public class IntegratedCapePackets {
|
||||
byte[] ret = new byte[1 + 16 + 4];
|
||||
ret[0] = (byte)PACKET_OTHER_CAPE_PRESET;
|
||||
IntegratedSkinPackets.UUIDToBytes(uuid, ret, 1);
|
||||
ret[17] = (byte)(presetId >> 24);
|
||||
ret[18] = (byte)(presetId >> 16);
|
||||
ret[19] = (byte)(presetId >> 8);
|
||||
ret[17] = (byte)(presetId >>> 24);
|
||||
ret[18] = (byte)(presetId >>> 16);
|
||||
ret[19] = (byte)(presetId >>> 8);
|
||||
ret[20] = (byte)(presetId & 0xFF);
|
||||
return ret;
|
||||
}
|
||||
|
@ -143,9 +143,9 @@ public class IntegratedSkinPackets {
|
||||
byte[] ret = new byte[1 + 16 + 4];
|
||||
ret[0] = (byte)PACKET_OTHER_SKIN_PRESET;
|
||||
UUIDToBytes(uuid, ret, 1);
|
||||
ret[17] = (byte)(presetId >> 24);
|
||||
ret[18] = (byte)(presetId >> 16);
|
||||
ret[19] = (byte)(presetId >> 8);
|
||||
ret[17] = (byte)(presetId >>> 24);
|
||||
ret[18] = (byte)(presetId >>> 16);
|
||||
ret[19] = (byte)(presetId >>> 8);
|
||||
ret[20] = (byte)(presetId & 0xFF);
|
||||
return ret;
|
||||
}
|
||||
@ -197,21 +197,21 @@ public class IntegratedSkinPackets {
|
||||
public static void UUIDToBytes(EaglercraftUUID uuid, byte[] bytes, int off) {
|
||||
long msb = uuid.getMostSignificantBits();
|
||||
long lsb = uuid.getLeastSignificantBits();
|
||||
bytes[off] = (byte)(msb >> 56l);
|
||||
bytes[off + 1] = (byte)(msb >> 48l);
|
||||
bytes[off + 2] = (byte)(msb >> 40l);
|
||||
bytes[off + 3] = (byte)(msb >> 32l);
|
||||
bytes[off + 4] = (byte)(msb >> 24l);
|
||||
bytes[off + 5] = (byte)(msb >> 16l);
|
||||
bytes[off + 6] = (byte)(msb >> 8l);
|
||||
bytes[off] = (byte)(msb >>> 56l);
|
||||
bytes[off + 1] = (byte)(msb >>> 48l);
|
||||
bytes[off + 2] = (byte)(msb >>> 40l);
|
||||
bytes[off + 3] = (byte)(msb >>> 32l);
|
||||
bytes[off + 4] = (byte)(msb >>> 24l);
|
||||
bytes[off + 5] = (byte)(msb >>> 16l);
|
||||
bytes[off + 6] = (byte)(msb >>> 8l);
|
||||
bytes[off + 7] = (byte)(msb & 0xFFl);
|
||||
bytes[off + 8] = (byte)(lsb >> 56l);
|
||||
bytes[off + 9] = (byte)(lsb >> 48l);
|
||||
bytes[off + 10] = (byte)(lsb >> 40l);
|
||||
bytes[off + 11] = (byte)(lsb >> 32l);
|
||||
bytes[off + 12] = (byte)(lsb >> 24l);
|
||||
bytes[off + 13] = (byte)(lsb >> 16l);
|
||||
bytes[off + 14] = (byte)(lsb >> 8l);
|
||||
bytes[off + 8] = (byte)(lsb >>> 56l);
|
||||
bytes[off + 9] = (byte)(lsb >>> 48l);
|
||||
bytes[off + 10] = (byte)(lsb >>> 40l);
|
||||
bytes[off + 11] = (byte)(lsb >>> 32l);
|
||||
bytes[off + 12] = (byte)(lsb >>> 24l);
|
||||
bytes[off + 13] = (byte)(lsb >>> 16l);
|
||||
bytes[off + 14] = (byte)(lsb >>> 8l);
|
||||
bytes[off + 15] = (byte)(lsb & 0xFFl);
|
||||
}
|
||||
|
||||
|
@ -239,9 +239,9 @@ public class IntegratedServerPlayerNetworkManager {
|
||||
byte[] compressedData;
|
||||
try {
|
||||
temporaryOutputStream.write(2);
|
||||
temporaryOutputStream.write((len >> 24) & 0xFF);
|
||||
temporaryOutputStream.write((len >> 16) & 0xFF);
|
||||
temporaryOutputStream.write((len >> 8) & 0xFF);
|
||||
temporaryOutputStream.write((len >>> 24) & 0xFF);
|
||||
temporaryOutputStream.write((len >>> 16) & 0xFF);
|
||||
temporaryOutputStream.write((len >>> 8) & 0xFF);
|
||||
temporaryOutputStream.write(len & 0xFF);
|
||||
try(OutputStream os = EaglerZLIB.newDeflaterOutputStream(temporaryOutputStream)) {
|
||||
temporaryBuffer.readBytes(os, len);
|
||||
|
@ -127,13 +127,13 @@ public class GuiUpdateVersionSlot extends GuiSlot {
|
||||
if(strs.size() > 2 && screen.mx > xx + iconSize && screen.my > yy + 8 && screen.mx < xx + getListWidth() - 5 && screen.my < yy + 25) {
|
||||
screen.tooltip = cert.bundleVersionComment;
|
||||
}
|
||||
char[] hexStr1 = new char[] { hexChars[(cert.bundleDataHash[0] >> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[1] & 0xF], hexChars[(cert.bundleDataHash[1] >> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[1] & 0xF], hexChars[(cert.bundleDataHash[2] >> 4) & 0xF],
|
||||
char[] hexStr1 = new char[] { hexChars[(cert.bundleDataHash[0] >>> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[1] & 0xF], hexChars[(cert.bundleDataHash[1] >>> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[1] & 0xF], hexChars[(cert.bundleDataHash[2] >>> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[2] & 0xF] };
|
||||
char[] hexStr2 = new char[] { hexChars[(cert.bundleDataHash[29] >> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[29] & 0xF], hexChars[(cert.bundleDataHash[30] >> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[30] & 0xF], hexChars[(cert.bundleDataHash[31] >> 4) & 0xF],
|
||||
char[] hexStr2 = new char[] { hexChars[(cert.bundleDataHash[29] >>> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[29] & 0xF], hexChars[(cert.bundleDataHash[30] >>> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[30] & 0xF], hexChars[(cert.bundleDataHash[31] >>> 4) & 0xF],
|
||||
hexChars[cert.bundleDataHash[31] & 0xF] };
|
||||
screen.drawString(mc.fontRendererObj,
|
||||
"Author: " + EnumChatFormatting.GRAY + cert.bundleAuthorName + EnumChatFormatting.WHITE + " Hash: "
|
||||
|
@ -141,7 +141,7 @@ public class UpdateCertificate {
|
||||
sha256.update(signaturePayload, 0, signaturePayload.length);
|
||||
sha256.doFinal(hash2048, 96);
|
||||
|
||||
hash2048[0] = (byte)((signaturePayload.length >> 8) & 0xFF);
|
||||
hash2048[0] = (byte)((signaturePayload.length >>> 8) & 0xFF);
|
||||
hash2048[1] = (byte)(signaturePayload.length & 0xFF);
|
||||
|
||||
if(!Arrays.equals(hash2048, rsa2048sumDec)) {
|
||||
|
@ -559,9 +559,9 @@ public class GuiVoiceMenu extends Gui {
|
||||
}
|
||||
|
||||
public static int attenuate(int cin, float r, float g, float b, float a) {
|
||||
float var10 = (float) (cin >> 24 & 255) / 255.0F;
|
||||
float var6 = (float) (cin >> 16 & 255) / 255.0F;
|
||||
float var7 = (float) (cin >> 8 & 255) / 255.0F;
|
||||
float var10 = (float) (cin >>> 24 & 255) / 255.0F;
|
||||
float var6 = (float) (cin >>> 16 & 255) / 255.0F;
|
||||
float var7 = (float) (cin >>> 8 & 255) / 255.0F;
|
||||
float var8 = (float) (cin & 255) / 255.0F;
|
||||
var10 *= a;
|
||||
var6 *= r;
|
||||
|
Reference in New Issue
Block a user