daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class AccumulatorRenderer extends TileEntityRenderer<TileAccumulator> {
  2.     @Override
  3.     public void render(TileAccumulator tile, double x, double y, double z, float partialTicks, int destroyStage) {
  4.         GlStateManager.pushMatrix();
  5.  
  6.         // Translate to the location of our tile entity
  7.         GlStateManager.translated(x, y, z);
  8.         GlStateManager.disableRescaleNormal();
  9.  
  10.         // Render our item
  11.         renderItem(tile);
  12.  
  13.         GlStateManager.popMatrix();
  14.     }
  15.  
  16.     private void renderItem(TileAccumulator tile) {
  17.         ItemStack stack = tile.getStackInSlot(0);
  18.         if (!stack.isEmpty()) {
  19.             RenderHelper.enableStandardItemLighting();
  20.             GlStateManager.enableLighting();
  21.             GlStateManager.pushMatrix();
  22.             // Translate to the center of the block and .9 points higher
  23.             GlStateManager.translated(0.5, 0.5, 1.5);
  24.             GlStateManager.scalef(.4f, .4f, .4f);
  25.  
  26.             Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.NONE);
  27.  
  28.             GlStateManager.popMatrix();
  29.         }
  30.     }
  31.  
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top