diff options
author | lucko <git@lucko.me> | 2023-06-08 21:35:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 21:35:54 +0100 |
commit | 7e1fe4231d3b098f08ee9ebb68a551016e345a73 (patch) | |
tree | d4f6c92ce81256dbda05a3005534e0c0f0265d9c /spark-forge1710 | |
parent | e5b278047ccb7bc6b301d787474c51d162911867 (diff) | |
parent | a89e8d3cc42702e80e2f973e79aab6090e74a72e (diff) | |
download | spark-7e1fe4231d3b098f08ee9ebb68a551016e345a73.tar.gz spark-7e1fe4231d3b098f08ee9ebb68a551016e345a73.tar.bz2 spark-7e1fe4231d3b098f08ee9ebb68a551016e345a73.zip |
Merge pull request #332 from embeddedt/forge-1.7.10
1.7.10 update
Diffstat (limited to 'spark-forge1710')
3 files changed, 11 insertions, 4 deletions
diff --git a/spark-forge1710/build.gradle b/spark-forge1710/build.gradle index 8fd166d..f7c5724 100644 --- a/spark-forge1710/build.gradle +++ b/spark-forge1710/build.gradle @@ -74,6 +74,8 @@ shadowJar { relocate 'com.google.protobuf', 'me.lucko.spark.lib.protobuf' relocate 'org.objectweb.asm', 'me.lucko.spark.lib.asm' relocate 'one.profiler', 'me.lucko.spark.lib.asyncprofiler' + relocate 'me.lucko.bytesocks.client', 'me.lucko.spark.lib.bytesocks' + relocate 'com.neovisionaries.ws', 'me.lucko.spark.lib.websockets' exclude 'module-info.class' exclude 'META-INF/maven/**' @@ -89,4 +91,4 @@ artifacts { shadow shadowJar } -build.dependsOn(shadowJar)
\ No newline at end of file +build.dependsOn(shadowJar) diff --git a/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710WorldInfoProvider.java b/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710WorldInfoProvider.java index 7252d71..232f88b 100644 --- a/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710WorldInfoProvider.java +++ b/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710WorldInfoProvider.java @@ -99,7 +99,7 @@ public abstract class Forge1710WorldInfoProvider implements WorldInfoProvider { ArrayList<ForgeChunkInfo> list = new ArrayList<>(); IChunkProvider provider = level.getChunkProvider(); if(provider instanceof ChunkProviderClient) { - List<Chunk> chunks = ReflectionHelper.getPrivateValue(ChunkProviderClient.class, (ChunkProviderClient)provider, "chunkMapping", "field_73236_b"); + List<Chunk> chunks = ReflectionHelper.getPrivateValue(ChunkProviderClient.class, (ChunkProviderClient)provider, "chunkListing", "field_73237_c"); for(Chunk chunk : chunks) { list.add(new ForgeChunkInfo(chunk)); } diff --git a/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java b/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java index db9f299..03f55d7 100644 --- a/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java +++ b/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java @@ -38,7 +38,6 @@ import net.minecraft.server.MinecraftServer; import java.util.List; import java.util.Queue; -import java.util.concurrent.FutureTask; import java.util.stream.Stream; public class Forge1710ServerSparkPlugin extends Forge1710SparkPlugin { @@ -58,6 +57,12 @@ public class Forge1710ServerSparkPlugin extends Forge1710SparkPlugin { return plugin; } + @Override + public void disable() { + super.disable(); + FMLCommonHandler.instance().bus().unregister(this); + } + @SubscribeEvent public void onServerTickEnd(TickEvent.ServerTickEvent event) { if(event.phase == TickEvent.Phase.START) { @@ -76,7 +81,7 @@ public class Forge1710ServerSparkPlugin extends Forge1710SparkPlugin { super(mod); this.server = server; this.gameThreadDumper = new ThreadDumper.GameThread(); - this.scheduledServerTasks.add(() -> this.gameThreadDumper.setThread(Thread.currentThread())); + this.gameThreadDumper.setThread(Thread.currentThread()); } @Override |