Search in sources :

Example 1 with IBlockPainter

use of riskyken.armourersWorkshop.common.painting.IBlockPainter in project Armourers-Workshop by RiskyKen.

the class RenderBlockColourable method isPlayerHoldingPaintingTool.

private boolean isPlayerHoldingPaintingTool() {
    EntityClientPlayerMP player = mc.thePlayer;
    ItemStack stack = player.getCurrentEquippedItem();
    if (stack != null) {
        Item item = stack.getItem();
        if (item instanceof IBlockPainter) {
            return true;
        } else if (item == ModItems.colourPicker) {
            return true;
        } else if (item == ModItems.blockMarker) {
            return true;
        }
    }
    return false;
}
Also used : Item(net.minecraft.item.Item) IBlockPainter(riskyken.armourersWorkshop.common.painting.IBlockPainter) EntityClientPlayerMP(net.minecraft.client.entity.EntityClientPlayerMP) ItemStack(net.minecraft.item.ItemStack)

Aggregations

EntityClientPlayerMP (net.minecraft.client.entity.EntityClientPlayerMP)1 Item (net.minecraft.item.Item)1 ItemStack (net.minecraft.item.ItemStack)1 IBlockPainter (riskyken.armourersWorkshop.common.painting.IBlockPainter)1