Skip to content

Commit 777a601

Browse files
committed
fix: <init>* doesn't work correctly
1 parent 926308b commit 777a601

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

fabric/java17/v1_18/src/main/java/dev/tonimatas/packetfixer/mixins/v1_18_fabric/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

fabric/java17/v1_19/src/main/java/dev/tonimatas/packetfixer/mixins/v1_19_fabric/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

fabric/java17/v1_19_3/src/main/java/dev/tonimatas/packetfixer/mixins/v1_19_3_fabric/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

forge/java17/v1_18/src/main/java/dev/tonimatas/packetfixer/mixins/v1_18_forge/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

forge/java17/v1_19/src/main/java/dev/tonimatas/packetfixer/mixins/v1_19_forge/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

forge/java17/v1_19_3/src/main/java/dev/tonimatas/packetfixer/mixins/v1_19_3_forge/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

forge/java17/v1_19_4/src/main/java/dev/tonimatas/packetfixer/mixins/v1_19_4_forge/ClientboundCustomPayloadPacketMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
@Mixin(ClientboundCustomPayloadPacket.class)
1111
public class ClientboundCustomPayloadPacketMixin {
12-
@ModifyConstant(method = "<init>*", constant = @Constant(intValue = 1048576))
12+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(intValue = 1048576))
1313
private int packetfixer$newSize(int value) {
1414
return Config.getPacketSize();
1515
}
1616

17-
@ModifyConstant(method = "<init>*", constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
17+
@ModifyConstant(method = {"<init>(Lnet/minecraft/network/FriendlyByteBuf;)V", "<init>(Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/network/FriendlyByteBuf;)V"}, constant = @Constant(stringValue = "Payload may not be larger than 1048576 bytes"))
1818
private String packetfixer$newMessage(String value) {
1919
return Messages.getPayloadMessage();
2020
}

0 commit comments

Comments
 (0)