Search in sources :

Example 1 with EventSwingHand

use of org.bleachhack.event.events.EventSwingHand in project BleachHack by BleachDrinker420.

the class MixinClientPlayerEntity method swingHand.

@Overwrite
public void swingHand(Hand hand) {
    EventSwingHand event = new EventSwingHand(hand);
    BleachHack.eventBus.post(event);
    if (!event.isCancelled()) {
        super.swingHand(event.getHand());
    }
    networkHandler.sendPacket(new HandSwingC2SPacket(hand));
}
Also used : HandSwingC2SPacket(net.minecraft.network.packet.c2s.play.HandSwingC2SPacket) EventSwingHand(org.bleachhack.event.events.EventSwingHand) Overwrite(org.spongepowered.asm.mixin.Overwrite)

Aggregations

HandSwingC2SPacket (net.minecraft.network.packet.c2s.play.HandSwingC2SPacket)1 EventSwingHand (org.bleachhack.event.events.EventSwingHand)1 Overwrite (org.spongepowered.asm.mixin.Overwrite)1