Search in sources :

Example 1 with YetaWrenchPacketProcessor

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));
}
Also used : ConduitDisplayMode(crazypants.enderio.base.conduit.ConduitDisplayMode) YetaWrenchPacketProcessor(crazypants.enderio.base.item.yetawrench.YetaWrenchPacketProcessor)

Aggregations

ConduitDisplayMode (crazypants.enderio.base.conduit.ConduitDisplayMode)1 YetaWrenchPacketProcessor (crazypants.enderio.base.item.yetawrench.YetaWrenchPacketProcessor)1