u26 + v1.2.3

This commit is contained in:
radmanplays 2024-03-06 15:41:37 +03:30
parent 5a3472512b
commit 149227f121
15 changed files with 137 additions and 26 deletions

View File

@ -18,18 +18,13 @@
~ ArrayList<BlockPos> arraylist = Lists.newArrayList();
> INSERT 3 : 4 @ 3
+ BlockPos tmp = new BlockPos(0, 0, 0);
> CHANGE 5 : 9 @ 5 : 7
> CHANGE 8 : 11 @ 8 : 9
~ EnumFacing[] facings = EnumFacing._VALUES;
~ for (int k = 0; k < facings.length; ++k) {
~ EnumFacing enumfacing = facings[k];
~ BlockPos blockpos1 = blockpos.offsetEvenFaster(enumfacing, tmp);
> CHANGE 15 : 17 @ 15 : 17
> CHANGE 16 : 18 @ 16 : 18
~ for (int j = 0, l = arraylist.size(); j < l; ++j) {
~ worldIn.notifyNeighborsOfStateChange(arraylist.get(j), Blocks.air);

View File

@ -5,8 +5,10 @@
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 17
> CHANGE 2 : 6 @ 2 : 17
~ import static net.eaglerforge.EaglerForge.removeanvil;
~
~ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL._wglBindFramebuffer;
~
@ -161,8 +163,9 @@
> DELETE 9 @ 9 : 11
> CHANGE 4 : 5 @ 4 : 7
> CHANGE 3 : 5 @ 3 : 7
~ public static ResourceLocation mojangLogo;
~ private final List<FutureTask<?>> scheduledTasks = new LinkedList();
> INSERT 14 : 18 @ 14
@ -300,10 +303,11 @@
~ mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
> INSERT 2 : 4 @ 2
> INSERT 2 : 5 @ 2
+ this.displayGuiScreen(new GuiScreenEditProfile(mainMenu));
+
+ removeanvil();
> DELETE 3 @ 3 : 6

View File

@ -59,7 +59,11 @@
~ I18n.format("options.debugConsoleButton", new Object[0])));
~ btn.enabled = EagRuntime.getPlatformType() != EnumPlatformType.DESKTOP;
> CHANGE 24 : 25 @ 24 : 25
> INSERT 17 : 18 @ 17
+ SingleplayerServerController.setDifficulty(-1);
> CHANGE 7 : 8 @ 7 : 8
~ protected void actionPerformed(GuiButton parGuiButton) {

View File

@ -9,9 +9,12 @@
> DELETE 4 @ 4 : 6
> INSERT 1 : 19 @ 1
> INSERT 1 : 22 @ 1
+
+ import net.eaglerforge.api.BaseData;
+ import net.eaglerforge.api.ModAPI;
+ import net.eaglerforge.api.ModData;
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
@ -56,7 +59,11 @@
> DELETE 32 @ 32 : 34
> CHANGE 3 : 4 @ 3 : 4
> CHANGE 1 : 2 @ 1 : 2
~ public class NetHandlerPlayClient extends ModData implements INetHandlerPlayClient {
> CHANGE 1 : 2 @ 1 : 2
~ private final EaglercraftNetworkManager netManager;
@ -148,7 +155,22 @@
> DELETE 7 @ 7 : 8
> DELETE 23 @ 23 : 24
> CHANGE 23 : 37 @ 23 : 24
~ ModData eventData = new ModData();
~ eventData.set("preventDefault", false);
~ eventData.set("type", packetIn.type);
~ eventData.set("chat", packetIn.chatComponent.getFormattedText());
~ BaseData newEvent = ModAPI.callEvent("packetchat", eventData);
~ if (newEvent.has("preventDefault") && newEvent.getBoolean("preventDefault") == true) {
~ return;
~ }
~ packetIn.type = newEvent.has("type") ? newEvent.getByte("type") : packetIn.type;
~ if (newEvent.has("chat")
~ && (newEvent.getString("chat").length() != packetIn.chatComponent.getFormattedText().length())) {
~ packetIn.chatComponent = new ChatComponentText(newEvent.getString("chat"));
~ }
~
> DELETE 9 @ 9 : 10

View File

@ -9,4 +9,9 @@
+
> CHANGE 6 : 8 @ 6 : 8
~ public IChatComponent chatComponent;
~ public byte type;
> EOF

View File

@ -9,4 +9,14 @@
+
> CHANGE 22 : 25 @ 22 : 23
~ int i = parPacketBuffer.readUnsignedByte();
~ this.difficulty = EnumDifficulty.getDifficultyEnum(i & 3);
~ this.difficultyLocked = (i & 4) != 0;
> CHANGE 3 : 4 @ 3 : 4
~ parPacketBuffer.writeByte(this.difficulty.getDifficultyId() | (this.difficultyLocked ? 4 : 0));
> EOF

View File

@ -30,7 +30,9 @@
> DELETE 8 @ 8 : 11
> DELETE 1 @ 1 : 3
> CHANGE 1 : 2 @ 1 : 3
~ import net.minecraft.network.play.server.S41PacketServerDifficulty;
> DELETE 1 @ 1 : 2
@ -118,8 +120,13 @@
> DELETE 1 @ 1 : 2
> CHANGE 39 : 44 @ 39 : 40
> DELETE 32 @ 32 : 35
> CHANGE 3 : 11 @ 3 : 5
~ if (this.worldServers[0].getWorldInfo().getDifficulty() == null) {
~ this.setDifficultyForAllWorlds(this.getDifficulty());
~ }
~ this.isSpawnChunksLoaded = this.worldServers[0].getWorldInfo().getGameRulesInstance()
~ .getBoolean("loadSpawnChunks");
~ if (this.isSpawnChunksLoaded) {
@ -248,7 +255,24 @@
> DELETE 4 @ 4 : 8
> DELETE 35 @ 35 : 55
> INSERT 16 : 19 @ 16
+ this.getConfigurationManager().sendPacketToAllPlayers(new S41PacketServerDifficulty(
+ this.worldServers[0].getDifficulty(), this.worldServers[0].getWorldInfo().isDifficultyLocked()));
+ }
> INSERT 1 : 9 @ 1
+ public void setDifficultyLockedForAllWorlds(boolean locked) {
+ for (int i = 0; i < this.worldServers.length; ++i) {
+ WorldServer worldserver = this.worldServers[i];
+ if (worldserver != null) {
+ worldserver.getWorldInfo().setDifficultyLocked(locked);
+ }
+ }
+
> DELETE 18 @ 18 : 38
> DELETE 13 @ 13 : 64

View File

@ -2,11 +2,13 @@ package net.eaglerforge;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
import net.minecraft.client.Minecraft;
import org.teavm.jso.JSBody;
import static net.minecraft.client.Minecraft.mojangLogo;
import net.eaglerforge.api.ModLoader;
public class EaglerForge {
private static Minecraft mc;
public static final Logger log = LogManager.getLogger();
@JSBody(params = { "message" }, script = "alert(message)")
public static native void jsalert(String message);
@ -19,10 +21,18 @@ public class EaglerForge {
@JSBody(params = { "message", "default_text" }, script = "prompt(message, default_text)")
public static native void jspromptdt(String message, String default_text);
@JSBody(script = "displayanvil()")
public static native void displayanvil();
@JSBody(script = "var img = document.getElementById('anvil');\n" +
"if (img) img.remove();")
public static native void removeanvil();
public static void init() {
log.info("Starting EaglerForge!");
displayanvil();
log.info("Loading Mods...");
}
}

View File

@ -188,6 +188,7 @@ public class ModAPI {
newEvent("sendpacketcustompayload");
newEvent("sendpacketspectate");
newEvent("sendpacketresourcepackstatus");*/
newEvent("packetchat");
globalsFunctor(this);
globalsRequireFunctor(this);
globalsUpdateFunctor(this);

View File

@ -12,7 +12,7 @@ public class EaglercraftVersion {
/// Customize these to fit your fork:
public static final String projectForkName = "EaglerForge";
public static final String projectForkVersion = "v1.2.2";
public static final String projectForkVersion = "v1.2.3";
public static final String projectForkVendor = "radmanplays";
public static final String projectForkURL = "https://github.com/eaglerforge/EaglerForge";
@ -22,7 +22,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 = "u24";
public static final String projectOriginVersion = "u26";
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
@ -33,7 +33,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 = 24;
public static final int updateBundlePackageVersionInt = 26;
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;

View File

@ -257,7 +257,11 @@ public class EaglerIntegratedServerWorker {
case IPCPacket0ASetWorldDifficulty.ID: {
IPCPacket0ASetWorldDifficulty pkt = (IPCPacket0ASetWorldDifficulty)ipc;
if(!isServerStopped()) {
if(pkt.difficulty == (byte)-1) {
currentProcess.setDifficultyLockedForAllWorlds(true);
}else {
currentProcess.setDifficultyForAllWorlds(EnumDifficulty.getDifficultyEnum(pkt.difficulty));
}
}else {
logger.warn("Client tried to set difficulty while server was stopped");
}

File diff suppressed because one or more lines are too long

View File

@ -8,8 +8,8 @@
<title>EaglercraftX 1.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8 Offline" />
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<meta property="og:title" content="EaglercraftX 1.8" />
<meta property="og:description" content="Play minecraft 1.8 in your browser" />
<script type="text/javascript">
"use strict";
const relayId = Math.floor(Math.random() * 3);
@ -31,10 +31,15 @@ window.eaglercraftXOptsHints = {
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</script>
<style type="eaglercraft" id="eaglercraftXClientSignature">data:application/octet-stream;base64,${client_signature}</style>
<style type="eaglercraft" id="eaglercraftXClientBundle">data:application/octet-stream;base64,${client_bundle}</style>
<script type="text/javascript">
"use strict";
window.eaglercraftXClientSignature = "data:application/octet-stream;base64,${client_signature}";
window.eaglercraftXClientBundle = "data:application/octet-stream;base64,${client_bundle}";
(function(){
function eaglerBundleUnwrap(tagIn) { const e = document.getElementById(tagIn); const ret = e.innerText; e.remove(); return ret; }
window.eaglercraftXClientSignature = eaglerBundleUnwrap("eaglercraftXClientSignature");
window.eaglercraftXClientBundle = eaglerBundleUnwrap("eaglercraftXClientBundle");
})();
</script>
<script type="text/javascript">
"use strict";

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,7 @@
<script type="text/javascript" src="ModAPI.js"></script>
<script type="text/javascript" src="ModLoader.js"></script>
<script type="text/javascript" src="ModGUI.js"></script>
<script type="text/javascript" src="anvil.js"></script>
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript">
"use strict";