Fix mixin again

This commit is contained in:
FlorianMichael 2024-08-31 23:09:59 +02:00
parent 58ec47937f
commit 17c7149681
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -33,21 +33,21 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(value = JoinPackets.class, remap = false)
public abstract class MixinJoinPackets {
@Redirect(method = "lambda$register$8", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/packet/PacketWrapper;read(Lcom/viaversion/viaversion/api/type/Type;)Ljava/lang/Object;", ordinal = 5))
@Redirect(method = "lambda$register$7", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/packet/PacketWrapper;read(Lcom/viaversion/viaversion/api/type/Type;)Ljava/lang/Object;", ordinal = 5))
private static Object trackWorldSeed(PacketWrapper instance, Type<LongLEType> tType) {
final Object seed = instance.read(tType);
instance.user().get(BedrockJoinGameTracker.class).setSeed((long) seed);
return seed;
}
@Redirect(method = "lambda$register$8", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/packet/PacketWrapper;read(Lcom/viaversion/viaversion/api/type/Type;)Ljava/lang/Object;", ordinal = 59))
@Redirect(method = "lambda$register$7", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/packet/PacketWrapper;read(Lcom/viaversion/viaversion/api/type/Type;)Ljava/lang/Object;", ordinal = 59))
private static Object trackLevelId(PacketWrapper instance, Type<StringType> tType) {
final Object levelId = instance.read(tType);
instance.user().get(BedrockJoinGameTracker.class).setLevelId((String) levelId);
return levelId;
}
@Redirect(method = "lambda$register$8", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/packet/PacketWrapper;read(Lcom/viaversion/viaversion/api/type/Type;)Ljava/lang/Object;", ordinal = 67))
@Redirect(method = "lambda$register$7", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/packet/PacketWrapper;read(Lcom/viaversion/viaversion/api/type/Type;)Ljava/lang/Object;", ordinal = 67))
private static Object trackEnchantmentSeed(PacketWrapper instance, Type<VarIntType> tType) {
final Object enchantmentSeed = instance.read(tType);
instance.user().get(BedrockJoinGameTracker.class).setEnchantmentSeed((Integer) enchantmentSeed);