Fix Mixins even harder

This commit is contained in:
Sollace 2022-09-18 22:31:31 +02:00
parent 234e44cbaf
commit fb0e870535

View file

@ -5,7 +5,10 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.*;
import com.minelittlepony.unicopia.entity.player.Pony;
import net.minecraft.network.packet.c2s.play.*;
import net.minecraft.server.network.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
@Mixin(value = {
ServerPlayerInteractionManager.class,
@ -13,10 +16,12 @@ import net.minecraft.server.network.*;
})
abstract class MixinReachDistanceFix {
@Redirect(
method = {
"processBlockBreakingAction",
"onPlayerInteractBlock",
"onPlayerInteractEntity"
target = {
@Desc(owner = ServerPlayerInteractionManager.class, value = "processBlockBreakingAction", args = {
BlockPos.class, PlayerActionC2SPacket.Action.class, Direction.class, int.class, int.class
}),
@Desc(owner = ServerPlayNetworkHandler.class, value = "onPlayerInteractBlock", args = { PlayerInteractBlockC2SPacket.class }),
@Desc(owner = ServerPlayNetworkHandler.class, value = "onPlayerInteractEntity", args = { PlayerInteractEntityC2SPacket.class })
},
at = @At(
value = "FIELD",