This commit is contained in:
IzzelAliz 2020-08-08 14:41:14 +08:00
parent 3158d42a9f
commit cd226dea76

View File

@ -1174,7 +1174,7 @@ public abstract class ServerPlayNetHandlerMixin implements ServerPlayNetHandlerB
if (net.minecraftforge.common.ForgeHooks.onInteractEntityAt(player, entity, packetIn.getHitVec(), hand) != null) if (net.minecraftforge.common.ForgeHooks.onInteractEntityAt(player, entity, packetIn.getHitVec(), hand) != null)
return; return;
ActionResultType result = entity.applyPlayerInteraction(this.player, packetIn.getHitVec(), hand); ActionResultType result = entity.applyPlayerInteraction(this.player, packetIn.getHitVec(), hand);
if (result.isSuccess()) { if (result == ActionResultType.SUCCESS) {
this.player.swingArm(hand); this.player.swingArm(hand);
} }
if (!itemInHand.isEmpty() && itemInHand.getCount() <= -1) { if (!itemInHand.isEmpty() && itemInHand.getCount() <= -1) {