Search in sources :

Example 1 with ItemPickaxe

use of net.minecraft.item.ItemPickaxe in project Minechem by iopleke.

the class AugmentedItem method renderOverlay.

@Override
public void renderOverlay(FontRenderer fontRenderer, TextureManager textureManager, ItemStack itemStack, int left, int top, float z) {
    RenderHelper.enableBlend();
    RenderHelper.setOpacity(1.0F);
    textureManager.bindTexture(TextureMap.locationItemsTexture);
    ItemStack wrappedItemStack = getWrappedItemStack(itemStack);
    if (wrappedItemStack != null) {
        Item wrappedItem = wrappedItemStack.getItem();
        if (wrappedItem instanceof ItemAxe) {
            RenderHelper.drawTexturedRectUV(left, top, z + 10, 16, 16, augmentIcon[AXEICON]);
        } else if (wrappedItem instanceof ItemHoe) {
            RenderHelper.drawTexturedRectUV(left, top, z + 10, 16, 16, augmentIcon[HOEICON]);
        } else if (wrappedItem instanceof ItemPickaxe) {
            RenderHelper.drawTexturedRectUV(left, top, z + 10, 16, 16, augmentIcon[PICKICON]);
        } else if (wrappedItem instanceof ItemSpade) {
            RenderHelper.drawTexturedRectUV(left, top, z + 10, 16, 16, augmentIcon[SHOVELICON]);
        } else if (wrappedItem instanceof ItemSword) {
            RenderHelper.drawTexturedRectUV(left, top, z + 10, 16, 16, augmentIcon[SWORDICON]);
        } else {
            RenderHelper.drawTexturedRectUV(left, top, z + 10, 16, 16, augmentIcon[DEFAULTICON]);
        }
    }
    RenderHelper.resetOpacity();
    RenderHelper.disableBlend();
}
Also used : ItemSword(net.minecraft.item.ItemSword) Item(net.minecraft.item.Item) EntityItem(net.minecraft.entity.item.EntityItem) WrapperItem(minechem.item.prefab.WrapperItem) ItemAxe(net.minecraft.item.ItemAxe) ItemHoe(net.minecraft.item.ItemHoe) ItemSpade(net.minecraft.item.ItemSpade) ItemPickaxe(net.minecraft.item.ItemPickaxe) ItemStack(net.minecraft.item.ItemStack)

Aggregations

WrapperItem (minechem.item.prefab.WrapperItem)1 EntityItem (net.minecraft.entity.item.EntityItem)1 Item (net.minecraft.item.Item)1 ItemAxe (net.minecraft.item.ItemAxe)1 ItemHoe (net.minecraft.item.ItemHoe)1 ItemPickaxe (net.minecraft.item.ItemPickaxe)1 ItemSpade (net.minecraft.item.ItemSpade)1 ItemStack (net.minecraft.item.ItemStack)1 ItemSword (net.minecraft.item.ItemSword)1