Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. /*
  2. * Decompiled with CFR 0_118.
  3. *
  4. * Could not load the following classes:
  5. * api.player.model.ModelPlayer
  6. * api.player.model.ModelPlayerAPI
  7. * api.player.model.ModelPlayerBase
  8. * net.minecraft.entity.Entity
  9. * net.minecraft.entity.player.EntityPlayer
  10. * net.minecraft.profiler.Profiler
  11. * net.minecraft.util.StringUtils
  12. * net.minecraft.world.World
  13. * org.lwjgl.opengl.GL11
  14. */
  15. package net.xtrafrancyz.mods.MiniDot.items;
  16.  
  17. import net.minecraft.entity.Entity;
  18. import net.minecraft.entity.player.EntityPlayer;
  19. import net.xtrafrancyz.mods.MiniDot.MiniDotMod;
  20. import net.xtrafrancyz.mods.MiniDot.MiniDotPlayer;
  21.  
  22. import org.lwjgl.opengl.GL11;
  23.  
  24. import api.player.model.ModelPlayerAPI;
  25. import api.player.model.ModelPlayerBase;
  26.  
  27. public class PlayerModelManager extends ModelPlayerBase{
  28.  
  29. public PlayerModelManager(ModelPlayerAPI api){
  30. super(api);
  31. }
  32.  
  33. public void render(Entity entity, float var2, float var3, float time, float var5, float var6, float scale){
  34. super.render(entity, var2, var3, time, var5, var6, scale);
  35. if(entity.isInvisible()){
  36. return;
  37. }
  38. entity.worldObj.theProfiler.startSection("MiniDot");
  39. EntityPlayer player = (EntityPlayer)entity;
  40. MiniDotPlayer pi = MiniDotPlayer.forPlayer(player);
  41. if(pi != null){
  42. boolean blendEnabled = GL11.glIsEnabled(3042);
  43. int depthFunc = GL11.glGetInteger(2932);
  44. GL11.glMatrixMode(5890);
  45. GL11.glLoadIdentity();
  46. GL11.glMatrixMode(5888);
  47. GL11.glColor3f(1.0f, 1.0f, 1.0f);
  48. GL11.glEnable(2896);
  49. GL11.glEnable(3553);
  50. GL11.glBlendFunc(770, 771);
  51. if(!blendEnabled){
  52. GL11.glEnable(3042);
  53. }
  54. GL11.glDepthFunc(513);
  55. for(int id : pi.items){
  56. if(id < 0){
  57. continue;
  58. }
  59. BaseItem item = MiniDotMod.items.get(id);
  60. try{
  61. if(item == null || item.getType().ordinal() >= 4)
  62. continue;
  63. entity.worldObj.theProfiler.startSection("render");
  64. item.render(modelPlayer, player, scale, time, pi);
  65. entity.worldObj.theProfiler.endSection();
  66. }catch(Exception e){
  67. MiniDotMod.logger.error(e);
  68. }
  69. }
  70. if(blendEnabled){
  71. GL11.glEnable(3042);
  72. }
  73. GL11.glDepthFunc(depthFunc);
  74. }
  75. entity.worldObj.theProfiler.endSection();
  76. }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement