Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. private float getFOVModifier(float partialTicks, boolean p_78481_2_)
  2. {
  3. if (this.debugView)
  4. {
  5. return 90.0F;
  6. }
  7. else
  8. {
  9. Entity entity = this.mc.getRenderViewEntity();
  10. float f = 70.0F;
  11.  
  12. if (p_78481_2_)
  13. {
  14. f = this.mc.gameSettings.fovSetting;
  15. f = f * (this.fovModifierHandPrev + (this.fovModifierHand - this.fovModifierHandPrev) * partialTicks);
  16. }
  17.  
  18. boolean flag = false;
  19.  
  20. if (this.mc.currentScreen == null)
  21. {
  22. GameSettings gamesettings = this.mc.gameSettings;
  23. flag = GameSettings.isKeyDown(this.mc.gameSettings.ofKeyBindZoom);
  24. }
  25.  
  26. if (flag)
  27. {
  28. if (!Config.zoomMode)
  29. {
  30. Config.zoomMode = true;
  31. this.mc.gameSettings.smoothCamera = true;
  32. }
  33.  
  34. if (Config.zoomMode)
  35. {
  36. f /= 1.0F;
  37. }
  38. }
  39. else if (Config.zoomMode)
  40. {
  41. Config.zoomMode = false;
  42. this.mc.gameSettings.smoothCamera = false;
  43. this.mouseFilterXAxis = new MouseFilter();
  44. this.mouseFilterYAxis = new MouseFilter();
  45. this.mc.renderGlobal.displayListEntitiesDirty = true;
  46. }
  47.  
  48. if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).getHealth() <= 0.0F)
  49. {
  50. float f1 = (float)((EntityLivingBase)entity).deathTime + partialTicks;
  51. f /= (1.0F - 500.0F / (f1 + 500.0F)) * 2.0F + 1.0F;
  52. }
  53.  
  54. Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, entity, partialTicks);
  55.  
  56. if (block.getMaterial() == Material.water)
  57. {
  58. f = f * 60.0F / 70.0F;
  59. }
  60.  
  61. return f;
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement