mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-03-04 01:01:29 +01:00
Fix Mixins even harder
This commit is contained in:
parent
234e44cbaf
commit
fb0e870535
1 changed files with 9 additions and 4 deletions
|
@ -5,7 +5,10 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.*;
|
import org.spongepowered.asm.mixin.injection.*;
|
||||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||||
|
|
||||||
|
import net.minecraft.network.packet.c2s.play.*;
|
||||||
import net.minecraft.server.network.*;
|
import net.minecraft.server.network.*;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
@Mixin(value = {
|
@Mixin(value = {
|
||||||
ServerPlayerInteractionManager.class,
|
ServerPlayerInteractionManager.class,
|
||||||
|
@ -13,10 +16,12 @@ import net.minecraft.server.network.*;
|
||||||
})
|
})
|
||||||
abstract class MixinReachDistanceFix {
|
abstract class MixinReachDistanceFix {
|
||||||
@Redirect(
|
@Redirect(
|
||||||
method = {
|
target = {
|
||||||
"processBlockBreakingAction",
|
@Desc(owner = ServerPlayerInteractionManager.class, value = "processBlockBreakingAction", args = {
|
||||||
"onPlayerInteractBlock",
|
BlockPos.class, PlayerActionC2SPacket.Action.class, Direction.class, int.class, int.class
|
||||||
"onPlayerInteractEntity"
|
}),
|
||||||
|
@Desc(owner = ServerPlayNetworkHandler.class, value = "onPlayerInteractBlock", args = { PlayerInteractBlockC2SPacket.class }),
|
||||||
|
@Desc(owner = ServerPlayNetworkHandler.class, value = "onPlayerInteractEntity", args = { PlayerInteractEntityC2SPacket.class })
|
||||||
},
|
},
|
||||||
at = @At(
|
at = @At(
|
||||||
value = "FIELD",
|
value = "FIELD",
|
||||||
|
|
Loading…
Add table
Reference in a new issue