Search in sources :

Example 6 with ItemQuadCollector

use of crazypants.enderio.base.render.util.ItemQuadCollector in project EnderIO by SleepyTrousers.

the class KillerJoeRenderMapper method mapItemDynamicOverlayRender.

@Override
@SideOnly(Side.CLIENT)
public ItemQuadCollector mapItemDynamicOverlayRender(@Nonnull Block block, @Nonnull ItemStack stack) {
    if (stack.hasTagCompound()) {
        ItemQuadCollector result = new ItemQuadCollector();
        result.addQuads(null, renderFuel(stack));
        result.addBlockState(block.getStateFromMeta(stack.getMetadata()).withProperty(EnumRenderMode.RENDER, EnumRenderMode.FRONT_ON), stack);
        // TODO: render sword here if it's a killer joe
        return result;
    } else {
        return null;
    }
}
Also used : ItemQuadCollector(crazypants.enderio.base.render.util.ItemQuadCollector) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ItemQuadCollector (crazypants.enderio.base.render.util.ItemQuadCollector)6 ArrayList (java.util.ArrayList)4 BakedQuad (net.minecraft.client.renderer.block.model.BakedQuad)4 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)4 SmartTank (com.enderio.core.common.fluid.SmartTank)2 HalfBakedList (crazypants.enderio.base.render.util.HalfBakedQuad.HalfBakedList)2 Registerable (crazypants.enderio.base.init.IModObject.Registerable)1 IBlockPaintableBlock (crazypants.enderio.base.paint.IPaintable.IBlockPaintableBlock)1 IWrenchHideablePaint (crazypants.enderio.base.paint.IPaintable.IWrenchHideablePaint)1 IRenderMapper (crazypants.enderio.base.render.IRenderMapper)1 IItemRenderMapper (crazypants.enderio.base.render.IRenderMapper.IItemRenderMapper)1 ISmartRenderAwareBlock (crazypants.enderio.base.render.ISmartRenderAwareBlock)1 ITESRItemBlock (crazypants.enderio.base.render.ITESRItemBlock)1 CollectedItemQuadBakedBlockModel (crazypants.enderio.base.render.model.CollectedItemQuadBakedBlockModel)1 FillGaugeBakery (crazypants.enderio.powertools.machine.capbank.render.FillGaugeBakery)1 List (java.util.List)1 Nonnull (javax.annotation.Nonnull)1 Block (net.minecraft.block.Block)1 IBlockState (net.minecraft.block.state.IBlockState)1 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)1