diff --git a/gradle.properties b/gradle.properties index 71473d13..66d66e6c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,8 +18,8 @@ raknet_transport_version=1.0.0.CR1-SNAPSHOT classic4j_version=2.0.1 # viaversion (and required) libs -viaversion_version=4.9.0-23w41a-SNAPSHOT -viabackwards_version=4.9.0-23w41a-SNAPSHOT +viaversion_version=4.9.0-23w42a-SNAPSHOT +viabackwards_version=4.9.0-23w42a-SNAPSHOT vialoader_version=2.2.11-SNAPSHOT diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/classic/ClassicWorldHeightInjection.java b/src/main/java/de/florianmichael/viafabricplus/definition/classic/ClassicWorldHeightInjection.java index 33d27f31..8a4f91a1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/classic/ClassicWorldHeightInjection.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/classic/ClassicWorldHeightInjection.java @@ -24,11 +24,11 @@ import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection; import com.viaversion.viaversion.api.protocol.remapper.PacketHandler; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.type.Type; +import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_17; import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag; import com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag; import com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag; import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag; -import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.types.Chunk1_17Type; import de.florianmichael.viafabricplus.protocolhack.ProtocolHack; import net.raphimc.vialoader.util.VersionEnum; import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.model.ClassicLevel; @@ -73,8 +73,8 @@ public class ClassicWorldHeightInjection { if (ProtocolHack.getTargetVersion(wrapper.user().getChannel()).isOlderThanOrEqualTo(VersionEnum.c0_28toc0_30)) { wrapper.resetReader(); - final Chunk chunk = wrapper.read(new Chunk1_17Type(16)); - wrapper.write(new Chunk1_17Type(chunk.getSections().length), chunk); + final Chunk chunk = wrapper.read(new ChunkType1_17(16)); + wrapper.write(new ChunkType1_17(chunk.getSections().length), chunk); final ClassicWorldHeightProvider heightProvider = Via.getManager().getProviders().get(ClassicWorldHeightProvider.class); if (chunk.getSections().length < heightProvider.getMaxChunkSectionCount(wrapper.user())) { // Increase available sections to match new world height diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java index 2ff6b004..1969088e 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/compat/ipnext/MixinAutoRefillHandler_ItemSlotMonitor.java @@ -33,7 +33,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; * Fixes https://github.com/ViaVersion/ViaFabricPlus/issues/209 */ @Pseudo -@Mixin(targets = "org.anti_ad.mc.ipnext.event.AutoRefillHandler$ItemSlotMonitor") +@Mixin(targets = "org.anti_ad.mc.ipnext.event.AutoRefillHandler$ItemSlotMonitor", remap = false) public class MixinAutoRefillHandler_ItemSlotMonitor { @Shadow diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinNamedCompoundTagType.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinNamedCompoundTagType.java index 87de8280..7d606cf5 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinNamedCompoundTagType.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinNamedCompoundTagType.java @@ -17,7 +17,7 @@ */ package de.florianmichael.viafabricplus.injection.mixin.fixes.viaversion; -import com.viaversion.viaversion.api.type.types.minecraft.NamedCompoundTagType; +import com.viaversion.viaversion.api.type.types.misc.NamedCompoundTagType; import com.viaversion.viaversion.libs.opennbt.tag.limiter.TagLimiter; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9_1to1_9/MixinProtocol1_9_1To1_9.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9_1to1_9/MixinProtocol1_9_1To1_9.java index f2a5b920..53582976 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9_1to1_9/MixinProtocol1_9_1To1_9.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9_1to1_9/MixinProtocol1_9_1To1_9.java @@ -17,10 +17,10 @@ */ package de.florianmichael.viafabricplus.injection.mixin.fixes.viaversion.protocol1_9_1to1_9; +import com.viaversion.viaversion.api.minecraft.ClientWorld; import com.viaversion.viaversion.api.protocol.AbstractProtocol; +import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_1; import com.viaversion.viaversion.protocols.protocol1_9_1to1_9.Protocol1_9_1To1_9; -import com.viaversion.viaversion.protocols.protocol1_9_1to1_9.types.Chunk1_9_1_2Type; -import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.protocol1_9to1_8.ServerboundPackets1_9; import org.spongepowered.asm.mixin.Mixin; @@ -34,7 +34,7 @@ public class MixinProtocol1_9_1To1_9 extends AbstractProtocol { - wrapper.passthrough(new Chunk1_9_1_2Type(wrapper.user().get(ClientWorld.class))); + wrapper.passthrough(new ChunkType1_9_1(wrapper.user().get(ClientWorld.class))); wrapper.clearInputBuffer(); }); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunkType1_8.java similarity index 82% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunkType1_8.java index 91e28497..12357fd5 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunkType1_8.java @@ -19,7 +19,7 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.viaversion.protoco import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.minecraft.chunks.*; -import com.viaversion.viaversion.protocols.protocol1_9to1_8.types.Chunk1_8Type; +import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_8; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -28,15 +28,15 @@ import org.spongepowered.asm.mixin.injection.Redirect; import java.util.ArrayList; import java.util.logging.Level; -@Mixin(value = Chunk1_8Type.class, remap = false) -public abstract class MixinChunk1_8Type { +@Mixin(value = ChunkType1_8.class, remap = false) +public abstract class MixinChunkType1_8 { @Shadow public static Chunk deserialize(int chunkX, int chunkZ, boolean fullChunk, boolean skyLight, int bitmask, byte[] data) { return null; } - @Redirect(method = "read(Lio/netty/buffer/ByteBuf;Lcom/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/storage/ClientWorld;)Lcom/viaversion/viaversion/api/minecraft/chunks/Chunk;", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/protocols/protocol1_9to1_8/types/Chunk1_8Type;deserialize(IIZZI[B)Lcom/viaversion/viaversion/api/minecraft/chunks/Chunk;")) + @Redirect(method = "read(Lio/netty/buffer/ByteBuf;Lcom/viaversion/viaversion/api/minecraft/ClientWorld;)Lcom/viaversion/viaversion/api/minecraft/chunks/Chunk;", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/type/types/chunk/ChunkType1_8;deserialize(IIZZI[B)Lcom/viaversion/viaversion/api/minecraft/chunks/Chunk;")) private Chunk fixAegis(int chunkX, int chunkZ, boolean fullChunk, boolean skyLight, int bitmask, byte[] data) { try { return deserialize(chunkX, chunkZ, fullChunk, skyLight, bitmask, data); diff --git a/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java b/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java index 9996aaf7..dd439653 100644 --- a/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java +++ b/src/main/java/de/florianmichael/viafabricplus/mappings/PackFormatsMappings.java @@ -33,6 +33,7 @@ public class PackFormatsMappings { private final static Map protocolMap = new HashMap<>(); public static void load() { + registerVersion(VersionEnum.r1_20_3, 19, "23w42a"); registerVersion(VersionEnum.r1_20_2, 18, "1.20.2"); registerVersion(VersionEnum.r1_20tor1_20_1, 15, "1.20.1"); // 1.20 and 1.20.1 are the same, why care... registerVersion(VersionEnum.r1_19_4, 13, "1.19.4"); diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index 7efc730c..b43c3086 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -167,7 +167,7 @@ "fixes.viaversion.protocol1_19_3to1_19_1.MixinProtocol1_19_3To1_19_1", "fixes.viaversion.protocol1_19to1_18_2.MixinWorldPackets", "fixes.viaversion.protocol1_9_1to1_9.MixinProtocol1_9_1To1_9", - "fixes.viaversion.protocol1_9to1_8.MixinChunk1_8Type", + "fixes.viaversion.protocol1_9to1_8.MixinChunkType1_8", "fixes.viaversion.protocol1_9to1_8.MixinCommandBlockProvider", "fixes.viaversion.protocol1_9to1_8.MixinEntityPackets_6_1", "fixes.viaversion.protocol1_9to1_8.MixinEntityTracker1_9",