Java Code Examples for net.minecraft.init.Blocks.TORCH

The following are Jave code examples for showing how to use TORCH of the net.minecraft.init.Blocks class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Torched   File: RenderTorch.java   View Source Code Vote up 6 votes
@Override
public void doRender(EntityTorch torch, double d, double d1, double d2, float f, float f1)
{
    Block block = Blocks.TORCH;
    GlStateManager.enableRescaleNormal();
    GlStateManager.pushMatrix();
    GlStateManager.translate(d, d1, d2);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    bindEntityTexture(torch);
    GlStateManager.disableLighting();
    GlStateManager.rotate(torch.prevRotationYaw + (torch.rotationYaw - torch.prevRotationYaw) * f1 - 90F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(90F + torch.prevRotationPitch + (torch.rotationPitch - torch.prevRotationPitch) * f1, 0.0F, 0.0F, 1.0F);

    IBlockState state = block.getStateFromMeta(0);
    RendererHelper.renderBakedModel(Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(state), -1, ItemStack.EMPTY);

    GlStateManager.enableLighting();

    GlStateManager.popMatrix();
    GlStateManager.disableRescaleNormal();
}
 
Example 2
Project: Torched   File: ItemRenderTorchGun.java   View Source Code Vote up 5 votes
public ItemRenderTorchGun()
{
    torchGunModel = new ModelTorchGun();
    rand = new Random();
    flintSteel = new ItemStack(Items.FLINT_AND_STEEL);
    powder = new ItemStack(Items.BLAZE_POWDER);
    torch = new ItemStack(Blocks.TORCH);
}