minsto

problem minecraft forge 1.12.2 serveur crash

Jul 1st, 2022 (edited)
742
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.85 KB | None | 0 0
  1. public class Renderoldiumchest  extends TileEntitySpecialRenderer <Tileoldiumchest> {
  2.     private static final ResourceLocation TEXTURE = new ResourceLocation(References.MOD_ID + ":textures/blocks/oldiumchest.png");
  3.     private final ModelOldiumchest MODEL = new ModelOldiumhest();
  4.  
  5.  
  6.     public void render(TileOldiumchest te, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
  7.     {
  8.         GlStateManager.enableDepth();
  9.         GlStateManager.depthFunc(515);
  10.         GlStateManager.depthMask(true);
  11.  
  12.         ModelOldiumchestt model = MODEL;
  13.  
  14.         if (destroyStage >= 0)
  15.         {
  16.             this.bindTexture(DESTROY_STAGES[destroyStage]);
  17.             GlStateManager.matrixMode(5890);
  18.             GlStateManager.pushMatrix();
  19.             GlStateManager.scale(4.0F, 4.0F, 1.0F);
  20.             GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
  21.             GlStateManager.matrixMode(5888);
  22.         }
  23.         else this.bindTexture(TEXTURE);
  24.  
  25.         GlStateManager.pushMatrix();
  26.         GlStateManager.enableRescaleNormal();
  27.         GlStateManager.translate((float)x, (float)y + 1.0F, (float)z + 1.0F);
  28.         GlStateManager.scale(1.0F, -1.0F, -1.0F);
  29.         GlStateManager.translate(0.5F, 0.5F, 0.5F);
  30.         GlStateManager.translate(-0.5F, -0.5F, -0.5F);
  31.  
  32.         float f = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;
  33.         f = 1.0F - f;
  34.         f = 1.0F - f * f * f;
  35.         model.chestLid.rotateAngleX = -(f * ((float)Math.PI / 2F));
  36.         model.renderAll();
  37.         GlStateManager.disableRescaleNormal();
  38.         GlStateManager.popMatrix();
  39.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  40.  
  41.         if (destroyStage >= 0)
  42.         {
  43.             GlStateManager.matrixMode(5890);
  44.             GlStateManager.popMatrix();
  45.             GlStateManager.matrixMode(5888);
  46.         }
  47.     }
  48. }
Add Comment
Please, Sign In to add comment