Bump to 1.20.4

This commit is contained in:
Linnea Gräf
2024-01-21 14:06:34 +01:00
parent 18ebd21cb0
commit 3e1f75e322
11 changed files with 47 additions and 39 deletions

View File

@@ -21,7 +21,7 @@ import java.util.Objects;
@Mixin(ClientPlayNetworkHandler.class)
public class DisableCommonPacketWarnings {
@Inject(method = "method_52801", at = @At("HEAD"), cancellable = true)
@Inject(method = "warnOnUnknownPayload", at = @At("HEAD"), cancellable = true)
public void onCustomPacketError(CustomPayload customPayload, CallbackInfo ci) {
if (Objects.equals(customPayload.id(), Identifier.of("badlion", "mods"))) {
ci.cancel();
@@ -38,8 +38,8 @@ public class DisableCommonPacketWarnings {
// Ignore data for unknown teams, since HyPixel just sends a lot of invalid team data.
}
@Redirect(method = "onPlayerList", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false))
public void onOnPlayerList(Logger instance, String s, Object o) {
@Redirect(method = "onPlayerList", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false))
public void onOnPlayerList(Logger instance, String s, Object o, Object o2) {
// Ignore invalid player info, since HyPixel just sends a lot of invalid player info
}