mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-22 16:48:25 +01:00
Use MixinExtras for MixinClientPlayerInteractionManager#redirectPlayerPosPacket
This commit is contained in:
parent
ecd38de782
commit
de6db35397
@ -129,11 +129,9 @@ public abstract class MixinClientPlayerInteractionManager implements IClientPlay
|
||||
return new PlayerActionC2SPacket(action, pos, direction);
|
||||
}
|
||||
|
||||
@Redirect(method = "interactItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 0))
|
||||
private void redirectPlayerPosPacket(ClientPlayNetworkHandler instance, Packet<?> packet) {
|
||||
if (ProtocolHack.getTargetVersion().isNewerThan(VersionEnum.r1_16_4tor1_16_5)) {
|
||||
instance.sendPacket(packet);
|
||||
}
|
||||
@WrapWithCondition(method = "interactItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V", ordinal = 0))
|
||||
private boolean redirectPlayerPosPacket(ClientPlayNetworkHandler instance, Packet<?> packet) {
|
||||
return ProtocolHack.getTargetVersion().isNewerThan(VersionEnum.r1_16_4tor1_16_5);
|
||||
}
|
||||
|
||||
@ModifyVariable(method = "clickSlot", at = @At(value = "STORE"), ordinal = 0)
|
||||
|
Loading…
Reference in New Issue
Block a user