Search in sources :

Example 1 with RenderGate

use of com.mraof.minestuck.client.renderer.tileentity.RenderGate in project Minestuck by mraof.

the class ClientProxy method registerRenderers.

public static void registerRenderers() {
    Minecraft mc = Minecraft.getMinecraft();
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkaiaPortal.class, new RenderSkaiaPortal());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGate.class, new RenderGate());
    // MinecraftForgeClient.registerItemRenderer(Minestuck.captchaCard, new RenderCard());
    mc.getItemColors().registerItemColorHandler(new IItemColor() {

        @Override
        public int colorMultiplier(ItemStack stack, int tintIndex) {
            if (tintIndex == 0 || tintIndex == 1) {
                int color = stack.getMetadata() == 0 ? -1 : ColorCollector.getColor(stack.getMetadata() - 1);
                if (tintIndex == 1) {
                    int i0 = ((color & 255) + 255) / 2;
                    int i1 = (((color >> 8) & 255) + 255) / 2;
                    int i2 = (((color >> 16) & 255) + 255) / 2;
                    color = i0 | (i1 << 8) | (i2 << 16);
                }
                return color;
            } else
                return -1;
        }
    }, MinestuckItems.cruxiteDowel, MinestuckItems.cruxiteApple, MinestuckItems.cruxitePotion);
}
Also used : IItemColor(net.minecraft.client.renderer.color.IItemColor) RenderSkaiaPortal(com.mraof.minestuck.client.renderer.tileentity.RenderSkaiaPortal) RenderGate(com.mraof.minestuck.client.renderer.tileentity.RenderGate) ItemStack(net.minecraft.item.ItemStack) Minecraft(net.minecraft.client.Minecraft)

Aggregations

RenderGate (com.mraof.minestuck.client.renderer.tileentity.RenderGate)1 RenderSkaiaPortal (com.mraof.minestuck.client.renderer.tileentity.RenderSkaiaPortal)1 Minecraft (net.minecraft.client.Minecraft)1 IItemColor (net.minecraft.client.renderer.color.IItemColor)1 ItemStack (net.minecraft.item.ItemStack)1