Slight wrench cleanup.

This commit is contained in:
Sebastian Hartte
2020-08-24 20:34:57 +02:00
parent 9a81ebfa50
commit 90ad345672
@@ -92,18 +92,14 @@ public class QuartzWrenchItem extends AEBaseItem implements IAEWrench, AEToolIte
} }
if (block instanceof AEBaseBlock) { if (block instanceof AEBaseBlock) {
if (Platform.isClient()) { if (!world.isClient) {
// TODO 1.10-R - if we return FAIL on client, action will not be sent to server.
// Fix that in all Block#onItemUseFirst overrides.
return !world.isClient ? ActionResult.SUCCESS : ActionResult.PASS;
}
AEBaseBlock aeBlock = (AEBaseBlock) block; AEBaseBlock aeBlock = (AEBaseBlock) block;
if (aeBlock.rotateAroundFaceAxis(world, pos, context.getSide())) { if (aeBlock.rotateAroundFaceAxis(world, pos, context.getSide())) {
player.swingHand(context.getHand()); player.swingHand(context.getHand());
return !world.isClient ? ActionResult.SUCCESS : ActionResult.FAIL;
} }
} }
return ActionResult.SUCCESS;
}
return ActionResult.PASS; return ActionResult.PASS;
} }