Skip to content

Commit

Permalink
1.19.4 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
TonimatasDEV committed Nov 6, 2023
1 parent f705c0f commit a9c1c6f
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@

@Mixin(value = CustomPayloadC2SPacket.class, priority = 9999)
public class CustomPayloadC2SPacketMixin {
// <= 1.20.1
@ModifyConstant(method = "<init>(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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@

@Mixin(value = CustomPayloadS2CPacket.class, priority = 9999)
public class CustomPayloadS2CPacketMixin {
// <= 1.20.1
@ModifyConstant(method = "<init>*", 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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@

@Mixin(value = LoginQueryRequestS2CPacket.class, priority = 9999)
public class LoginQueryRequestS2CPacketMixin {
// <= 1.20.1
@ModifyConstant(method = "<init>(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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<init>(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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@

@Mixin(value = ClientboundCustomPayloadPacket.class, priority = 9999)
public class ClientboundCustomPayloadPacketMixin {
// 1.20.1 >
@ModifyConstant(method = "<init>*", 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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
//}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,8 @@

@Mixin(value = ServerboundCustomQueryPacket.class, priority = 9999)
public class ServerboundCustomQueryPacketMixin {
// <= 1.18
//@ModifyConstant(method = "<init>(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 = "<init>(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;
//}
}
50 changes: 4 additions & 46 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
yarnMappings=1.19.4+build.2

0 comments on commit a9c1c6f

Please sign in to comment.