diff --git a/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorPieceData.java b/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorPieceData.java index 3eddc9be2..1d6db8066 100644 --- a/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorPieceData.java +++ b/c2me-fixes-worldgen-threading-issues/src/main/java/com/ishland/c2me/fixes/worldgen/threading_issues/mixin/threading/MixinNetherFortressGeneratorPieceData.java @@ -23,7 +23,7 @@ private int redirectGetGeneratedCount(NetherFortressGenerator.PieceData pieceDat @SuppressWarnings("MixinAnnotationTarget") @Dynamic - @Redirect(method = "*", at = @At(value = "FIELD", target = "Lnet/minecraft/structure/NetherFortressGenerator$PieceData;generatedCount:I", opcode = Opcodes.PUTFIELD), require = 0) + @Redirect(method = "*", at = @At(value = "FIELD", target = "Lnet/minecraft/structure/NetherFortressGenerator$PieceData;generatedCount:I", opcode = Opcodes.PUTFIELD), require = 0, expect = 0) private void redirectSetGeneratedCount(NetherFortressGenerator.PieceData pieceData, int value) { this.generatedCountAtomic.set(value); } diff --git a/c2me-opts-chunkio/src/main/java/com/ishland/c2me/opts/chunkio/mixin/compression/increase_buffer_size/MixinChunkStreamVersion.java b/c2me-opts-chunkio/src/main/java/com/ishland/c2me/opts/chunkio/mixin/compression/increase_buffer_size/MixinChunkStreamVersion.java deleted file mode 100644 index 54fb85105..000000000 --- a/c2me-opts-chunkio/src/main/java/com/ishland/c2me/opts/chunkio/mixin/compression/increase_buffer_size/MixinChunkStreamVersion.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.ishland.c2me.opts.chunkio.mixin.compression.increase_buffer_size; - -import net.minecraft.world.storage.ChunkStreamVersion; -import org.spongepowered.asm.mixin.Dynamic; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.zip.Deflater; -import java.util.zip.DeflaterOutputStream; -import java.util.zip.GZIPInputStream; -import java.util.zip.GZIPOutputStream; -import java.util.zip.Inflater; -import java.util.zip.InflaterInputStream; - -@SuppressWarnings("InvalidInjectorMethodSignature") -@Mixin(ChunkStreamVersion.class) -public class MixinChunkStreamVersion { - - @SuppressWarnings({"InvalidMemberReference", "MixinAnnotationTarget"}) - @Dynamic - @Redirect(method = "", at = @At(value = "NEW", target = "(ILnet/minecraft/world/storage/ChunkStreamVersion$Wrapper;Lnet/minecraft/world/storage/ChunkStreamVersion$Wrapper;)Lnet/minecraft/world/storage/ChunkStreamVersion;")) - private static ChunkStreamVersion redirectChunkStreamVersionConstructor(int id, ChunkStreamVersion.Wrapper inputStreamWrapper, ChunkStreamVersion.Wrapper outputStreamWrapper) { - if (id == 1) { // GZIP - return new ChunkStreamVersion(id, in -> new GZIPInputStream(in, 16 * 1024), out -> new GZIPOutputStream(out, 16 * 1024)); - } else if (id == 2) { // DEFLATE - return new ChunkStreamVersion(id, in -> new InflaterInputStream(in, new Inflater(), 16 * 1024), out -> new DeflaterOutputStream(out, new Deflater(), 16 * 1024)); - } else if (id == 3) { // UNCOMPRESSED - return new ChunkStreamVersion(id, BufferedInputStream::new, BufferedOutputStream::new); - } else { - return new ChunkStreamVersion(id, inputStreamWrapper, outputStreamWrapper); - } - } - -} diff --git a/c2me-opts-chunkio/src/main/resources/c2me-opts-chunkio.mixins.json b/c2me-opts-chunkio/src/main/resources/c2me-opts-chunkio.mixins.json index a9e72a64a..3024421f6 100644 --- a/c2me-opts-chunkio/src/main/resources/c2me-opts-chunkio.mixins.json +++ b/c2me-opts-chunkio/src/main/resources/c2me-opts-chunkio.mixins.json @@ -4,7 +4,6 @@ "package": "com.ishland.c2me.opts.chunkio.mixin", "plugin": "com.ishland.c2me.opts.chunkio.MixinPlugin", "mixins": [ - "compression.increase_buffer_size.MixinChunkStreamVersion", "compression.modify_default_chunk_compression.MixinRegionFile", "hide_sync_disk_writes_behind_flag.MixinRegionBasedStorage", "limit_nbt_cache.MixinStorageIoWorker"