Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GlStateManager.pushAttrib();
- GlStateManager.pushMatrix();
- GlStateManager.translate(x, y, z);
- GlStateManager.translate(0.375, 0.625, 0);
- long angle = (System.currentTimeMillis() / 10) % 360;
- GlStateManager.rotate(angle, 0, 0, 1);
- GlStateManager.translate(-0.375, -0.625, 0);
- World world = te.getWorld();
- // Translate back to local view coordinates so that we can do the acual rendering here
- GlStateManager.translate(-te.getPos().getX(), -te.getPos().getY(), -te.getPos().getZ());
- bindTexture(TextureMap.locationBlocksTexture);
- // bindTexture(new ResourceLocation(Reference.MOD_ID, "textures/blocks/rock_tumbler_barrel.png"));
- Tessellator tessellator = Tessellator.getInstance();
- tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
- Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModel(
- world,
- getBakedModel(),
- world.getBlockState(te.getPos()),
- te.getPos(),
- Tessellator.getInstance().getBuffer(), false);
- tessellator.draw();
- GlStateManager.popMatrix();
- GlStateManager.popAttrib();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement