use of crazypants.enderio.base.item.yetawrench.YetaWrenchPacketProcessor in project EnderIO by SleepyTrousers.
the class ToolTickHandler method changeDisplayMode.
private static void changeDisplayMode(@Nonnull ItemStack stack, @Nonnull EntityPlayer player, int dWheel) {
if (!((IConduitControl) stack.getItem()).showOverlay(stack, player)) {
return;
}
ConduitDisplayMode mode = ConduitDisplayMode.getDisplayMode(stack);
mode = dWheel < 0 ? mode.next() : mode.previous();
ConduitDisplayMode.setDisplayMode(stack, mode);
PacketHandler.INSTANCE.sendToServer(new YetaWrenchPacketProcessor(player.inventory.currentItem, mode));
}
Aggregations