diff --git a/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinChunk.java b/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinChunk.java index 9b04d1c..389d274 100644 --- a/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinChunk.java +++ b/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinChunk.java @@ -14,7 +14,7 @@ public class MixinChunk { @Shadow public short[] blocks; @Inject(method = "setChunkData", at = @At("RETURN")) - public void onSetChunkData(byte[] data, int mix, int miy, int miz, int max, int may, int maz, int progress, CallbackInfoReturnable cir) { + public void onSetChunkData(byte[] data, int mix, int miy, int miz, int max, int may, int maz, boolean init, int progress, CallbackInfoReturnable cir) { if (ClientModLoader.Internal.networkChunkBytes == data) { for (int var17 = mix; var17 < max; ++var17) { for (int var31 = miy; var31 < may; ++var31) { diff --git a/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinNetClientHandler.java b/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinNetClientHandler.java index 641118f..a0817d8 100644 --- a/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinNetClientHandler.java +++ b/client/src/main/java/com/fox2code/foxloader/client/mixins/MixinNetClientHandler.java @@ -43,11 +43,11 @@ public void onHandleMultiBlockChange(Packet52MultiBlockChange packet52, Callback } @Redirect(method = "handleMapChunk", at = @At(value = "INVOKE", target = - "Lnet/minecraft/src/game/level/WorldClient;setChunkData(IIIIII[B)V")) - public void onSetChunkData(WorldClient instance, int mx, int my, int mz, int mxx, int mxy, int mxz, byte[] data) { + "Lnet/minecraft/src/game/level/WorldClient;setChunkData(IIIIIIZ[B)V")) + public void onSetChunkData(WorldClient instance, int mx, int my, int mz, int mxx, int mxy, int mxz, boolean init, byte[] data) { ClientModLoader.Internal.networkChunkBytes = data; try { - instance.setChunkData(mx, my, mz, mxx, mxy, mxz, data); + instance.setChunkData(mx, my, mz, mxx, mxy, mxz, init, data); } finally { ClientModLoader.Internal.networkChunkBytes = null; } diff --git a/final/src/main/java/com/fox2code/foxloader/installer/Main.java b/final/src/main/java/com/fox2code/foxloader/installer/Main.java index 067d843..00965b0 100644 --- a/final/src/main/java/com/fox2code/foxloader/installer/Main.java +++ b/final/src/main/java/com/fox2code/foxloader/installer/Main.java @@ -5,6 +5,7 @@ import com.fox2code.foxloader.launcher.ServerMain; import com.fox2code.foxloader.launcher.utils.SourceUtil; +import java.awt.GraphicsEnvironment; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; @@ -20,6 +21,10 @@ public class Main { static final String optJvmArgsWithMem = optJvmArgs + " -Xmn512M -Xms512M -Xmx2G"; static final File currentInstallerFile = SourceUtil.getSourceFile(Main.class); public static void main(String[] args) throws ReflectiveOperationException, MalformedURLException { + if (args.length == 0 && GraphicsEnvironment.isHeadless()) { + ServerMain.main(args); + return; + } boolean platform = false; boolean update = false; if (args.length >= 1) { diff --git a/gradle.properties b/gradle.properties index f8ea478..268853f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,16 +3,16 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx1024m -XX:-UseGCOverheadLimit -Dfile.encoding=UTF-8 # FoxLoader properties -foxloader.version=1.2.6 +foxloader.version=1.2.7 foxloader.lastReIndevTransformerChanges=1.2.4 # ReIndev properties -reindev.clientUrl=https://cdn.fox2code.com/files/reindev_2.8.1_02.jar -reindev.serverUrl=https://cdn.fox2code.com/files/reindev281-02_server.jar -reindev.clientJar=reindev_2.8.1_02.jar -reindev.serverJar=reindev281-02_server.jar -reindev.version=2.8.1_2 -reindev.version.allowFrom=2.8.1_1 +reindev.clientUrl=https://cdn.fox2code.com/files/reindev_2.8.1_03.jar +reindev.serverUrl=https://cdn.fox2code.com/files/reindev281-03_server.jar +reindev.clientJar=reindev_2.8.1_03.jar +reindev.serverJar=reindev281-03_server.jar +reindev.version=2.8.1_3 +reindev.version.allowFrom=2.8.1_2 #Spark properties spark.dependency=maven.modrinth:spark:1.10.37-fabric diff --git a/server/src/main/java/com/fox2code/foxloader/server/mixins/MixinItemStack.java b/server/src/main/java/com/fox2code/foxloader/server/mixins/MixinItemStack.java index d6fc9b0..e969dd8 100644 --- a/server/src/main/java/com/fox2code/foxloader/server/mixins/MixinItemStack.java +++ b/server/src/main/java/com/fox2code/foxloader/server/mixins/MixinItemStack.java @@ -11,7 +11,8 @@ public abstract class MixinItemStack implements RegisteredItemStack { @Shadow public int stackSize; - @Shadow int itemDamage; + @Shadow + public int itemDamage; @Shadow public abstract Item getItem(); @Shadow public abstract String getDisplayName();