diff --git a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadC2SPacketMixin.java b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadC2SPacketMixin.java index 8237a78..b4a9f95 100644 --- a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadC2SPacketMixin.java +++ b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadC2SPacketMixin.java @@ -8,15 +8,8 @@ @Mixin(value = CustomPayloadC2SPacket.class, priority = 9999) public class CustomPayloadC2SPacketMixin { - // <= 1.20.1 @ModifyConstant(method = "(Lnet/minecraft/network/PacketByteBuf;)V", constant = @Constant(intValue = 32767)) private static int newSize(int value) { return Integer.MAX_VALUE; } - - // 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 32767)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadS2CPacketMixin.java b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadS2CPacketMixin.java index c84353c..d4a1bde 100644 --- a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadS2CPacketMixin.java +++ b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/CustomPayloadS2CPacketMixin.java @@ -7,15 +7,8 @@ @Mixin(value = CustomPayloadS2CPacket.class, priority = 9999) public class CustomPayloadS2CPacketMixin { - // <= 1.20.1 @ModifyConstant(method = "*", constant = @Constant(intValue = 1048576)) private static int newSize(int value) { return Integer.MAX_VALUE; } - - // 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 1048576)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryRequestS2CPacketMixin.java b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryRequestS2CPacketMixin.java index 72bed78..93922b7 100644 --- a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryRequestS2CPacketMixin.java +++ b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryRequestS2CPacketMixin.java @@ -7,15 +7,8 @@ @Mixin(value = LoginQueryRequestS2CPacket.class, priority = 9999) public class LoginQueryRequestS2CPacketMixin { - // <= 1.20.1 @ModifyConstant(method = "(Lnet/minecraft/network/PacketByteBuf;)V", constant = @Constant(intValue = 1048576)) private static int newSize(int value) { return Integer.MAX_VALUE; } - - // 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 1048576)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryResponseC2SPacketMixin.java b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryResponseC2SPacketMixin.java index 200d2ef..016bbb0 100644 --- a/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryResponseC2SPacketMixin.java +++ b/fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/LoginQueryResponseC2SPacketMixin.java @@ -4,22 +4,12 @@ import net.minecraft.network.packet.c2s.login.LoginQueryResponseC2SPacket; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Constant; -import org.spongepowered.asm.mixin.injection.ModifyConstant; import org.spongepowered.asm.mixin.injection.ModifyVariable; @Mixin(value = LoginQueryResponseC2SPacket.class, priority = 9999) public class LoginQueryResponseC2SPacketMixin { - // <= 1.20.1 @ModifyVariable(method = "(Lnet/minecraft/network/PacketByteBuf;)V", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/network/PacketByteBuf;readNullable(Lnet/minecraft/network/PacketByteBuf$PacketReader;)Ljava/lang/Object;"), index = 1, argsOnly = true) private PacketByteBuf redirectReadNullable(PacketByteBuf value) { return new PacketByteBuf(value.readBytes(value.readableBytes())); } - - - // 1.20.2 - //@ModifyConstant(method = "getVanillaPayload", constant = @Constant(intValue = 1048576)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomPayloadPacketMixin.java b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomPayloadPacketMixin.java index 6842edd..4c3c727 100644 --- a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomPayloadPacketMixin.java +++ b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomPayloadPacketMixin.java @@ -8,15 +8,8 @@ @Mixin(value = ClientboundCustomPayloadPacket.class, priority = 9999) public class ClientboundCustomPayloadPacketMixin { - // 1.20.1 > @ModifyConstant(method = "*", constant = @Constant(intValue = 1048576)) private static int newSize(int value) { return Integer.MAX_VALUE; } - - // 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 1048576)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomQueryPacketMixin.java b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomQueryPacketMixin.java index c470476..ca9b584 100644 --- a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomQueryPacketMixin.java +++ b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ClientboundCustomQueryPacketMixin.java @@ -11,10 +11,4 @@ public class ClientboundCustomQueryPacketMixin { private static int newSize(int value) { return Integer.MAX_VALUE; } - - // 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 1048576)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/NbtAccounterMixin.java b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/NbtAccounterMixin.java index 5a9be78..313578c 100644 --- a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/NbtAccounterMixin.java +++ b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/NbtAccounterMixin.java @@ -8,18 +8,6 @@ @Mixin(value = NbtAccounter.class, priority = 9999) public abstract class NbtAccounterMixin { - // <= 1.18 - //@Redirect(method = "accountBits", at = @At(value = "FIELD", target = "Lnet/minecraft/nbt/NbtAccounter;quota:J", opcode = Opcodes.GETFIELD)) - //public long accountBits(NbtAccounter instance) { - // return Long.MAX_VALUE; - //} - - // >= 1.19 - //@Redirect(method = "accountBytes", at = @At(value = "FIELD", target = "Lnet/minecraft/nbt/NbtAccounter;quota:J", opcode = Opcodes.GETFIELD)) - //public long accountBits(NbtAccounter instance) { - // return Long.MAX_VALUE; - //} - @Redirect(method = "accountBytes(J)V", at = @At(value = "FIELD", target = "Lnet/minecraft/nbt/NbtAccounter;quota:J", opcode = Opcodes.GETFIELD)) public long accountBits(NbtAccounter instance) { return Long.MAX_VALUE; diff --git a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomPayloadPacketMixin.java b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomPayloadPacketMixin.java index 298e6ef..f98db3f 100644 --- a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomPayloadPacketMixin.java +++ b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomPayloadPacketMixin.java @@ -11,10 +11,4 @@ public class ServerboundCustomPayloadPacketMixin { private static int newSize(int value) { return Integer.MAX_VALUE; } - - // 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 32767)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomQueryPacketMixin.java b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomQueryPacketMixin.java index bd00180..4225b35 100644 --- a/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomQueryPacketMixin.java +++ b/forge/src/main/java/net/tonimatasdev/packetfixerforge/mixin/ServerboundCustomQueryPacketMixin.java @@ -8,21 +8,8 @@ @Mixin(value = ServerboundCustomQueryPacket.class, priority = 9999) public class ServerboundCustomQueryPacketMixin { - // <= 1.18 - //@ModifyConstant(method = "(Lnet/minecraft/network/FriendlyByteBuf;)V", constant = @Constant(intValue = 1048576)) - //private int newSize(int value) { - // return Integer.MAX_VALUE; - //} - - // 1.19 to 1.20.1 @ModifyVariable(method = "(Lnet/minecraft/network/FriendlyByteBuf;)V", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/network/FriendlyByteBuf;readNullable(Lnet/minecraft/network/FriendlyByteBuf$Reader;)Ljava/lang/Object;"), index = 1, argsOnly = true) private FriendlyByteBuf redirectReadNullable(FriendlyByteBuf value) { return new FriendlyByteBuf(value.readBytes(value.readableBytes())); } - - // >= 1.20.2 - //@ModifyConstant(method = "readUnknownPayload", constant = @Constant(intValue = 1048576)) - //private static int newSize(int value) { - // return Integer.MAX_VALUE; - //} } diff --git a/gradle.properties b/gradle.properties index 0fa9fc3..e0a634e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,50 +4,8 @@ org.gradle.daemon=false # Mod Properties modVersion=1.1.9 -# --------------------------------- 1.20.1 - -#minecraftVersion=1.20.2 -#forgeVersion=48.0.13 -#forgeVersionRange=48 -#loaderVersion=0.14.22 -#yarnMappings=1.20.2+build.1 - -# --------------------------------- 1.20.1 - -minecraftVersion=1.20.1 -forgeVersion=47.1.44 -forgeVersionRange=47 +minecraftVersion=1.19.4 +forgeVersion=45.1.17 +forgeVersionRange=45 loaderVersion=0.14.22 -yarnMappings=1.20.1+build.10 - -# --------------------------------- 1.20 - -#minecraftVersion=1.20 -#forgeVersion=46.0.14 -#forgeVersionRange=46 -#loaderVersion=0.14.22 -#yarnMappings=1.20+build.1 - -# --------------------------------- 1.19.4 - -#minecraftVersion=1.19.4 -#forgeVersion=45.1.17 -#forgeVersionRange=45 -#loaderVersion=0.14.22 -#yarnMappings=1.19.4+build.2 - -# --------------------------------- 1.19.2 - -#minecraftVersion=1.19.2 -#forgeVersion=43.2.21 -#forgeVersionRange=43 -#loaderVersion=0.14.22 -#yarnMappings=1.19.2+build.28 - -# --------------------------------- 1.19.2 - -#minecraftVersion=1.18.2 -#forgeVersion=40.2.10 -#forgeVersionRange=40 -#loaderVersion=0.14.22 -#yarnMappings=1.18.2+build.4 \ No newline at end of file +yarnMappings=1.19.4+build.2 \ No newline at end of file