Advertisement
Guest User

Untitled

a guest
Aug 29th, 2024
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. but nothing works for me
  2.  
  3. is this right?
  4.  
  5.  
  6.  
  7. public void renderItemInFirstPerson(float partialTicks)
  8.  
  9. {
  10.  
  11. float f = 1.0F - (this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * partialTicks);
  12.  
  13. AbstractClientPlayer abstractclientplayer = this.mc.thePlayer;
  14.  
  15. float f1 = abstractclientplayer.getSwingProgress(partialTicks);
  16.  
  17. float f2 = abstractclientplayer.prevRotationPitch + (abstractclientplayer.rotationPitch - abstractclientplayer.prevRotationPitch) * partialTicks;
  18.  
  19. float f3 = abstractclientplayer.prevRotationYaw + (abstractclientplayer.rotationYaw - abstractclientplayer.prevRotationYaw) * partialTicks;
  20.  
  21. this.func_178101_a(f2, f3);
  22.  
  23. this.func_178109_a(abstractclientplayer);
  24.  
  25. this.func_178110_a((EntityPlayerSP)abstractclientplayer, partialTicks);
  26.  
  27. GlStateManager.enableRescaleNormal();
  28.  
  29. GlStateManager.pushMatrix();
  30.  
  31.  
  32.  
  33. if (this.itemToRender != null)
  34.  
  35. {
  36.  
  37. if (this.itemToRender.getItem() == Items.filled_map)
  38.  
  39. {
  40.  
  41. this.renderItemMap(abstractclientplayer, f2, f, f1);
  42.  
  43. }
  44.  
  45. else if (abstractclientplayer.getItemInUseCount() > 0)
  46.  
  47. {
  48.  
  49. EnumAction enumaction = this.itemToRender.getItemUseAction();
  50.  
  51.  
  52.  
  53. switch (enumaction)
  54.  
  55. {
  56.  
  57. case NONE:
  58.  
  59. this.transformFirstPersonItem(f, 0.0F);
  60.  
  61. break;
  62.  
  63.  
  64.  
  65. case EAT:
  66.  
  67. case DRINK:
  68.  
  69. this.func_178104_a(abstractclientplayer, partialTicks);
  70.  
  71. this.transformFirstPersonItem(f, 0.0F);
  72.  
  73. break;
  74.  
  75.  
  76.  
  77. case BLOCK:
  78.  
  79.  
  80. if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("1.8")){
  81.  
  82. this.transformFirstPersonItem(f, 0.0F);
  83.  
  84. this.func_178103_d();
  85.  
  86. break;
  87.  
  88. }
  89.  
  90. if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("1.7")){
  91.  
  92. this.transformFirstPersonItem(0.2F, f1);
  93.  
  94. this.func_178103_d();
  95.  
  96. GlStateManager.translate(-0.5F, 0.0F, 0.0F);
  97.  
  98. break;
  99.  
  100. }
  101.  
  102. if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("Exhibition")){
  103.  
  104. float var15 = MathHelper.sin(MathHelper.sqrt_float(f1) * (float) Math.PI);
  105.  
  106. this.transformFirstPersonItem(f / 2.5f, 0.0f);
  107.  
  108. GL11.glTranslatef(0.1f, 0.3f, -0.1f);
  109.  
  110. GL11.glRotated(-var15 * 20.0f, var15 / 2.0f, 0.0, 9.0);
  111.  
  112. GL11.glRotated(-var15 * 50.0f, 0.8f, var15 / 2.0f, 0.0);
  113.  
  114. this.func_178103_d();
  115.  
  116. break;
  117.  
  118. }
  119.  
  120. if(BedwarsClient.instance.settingsManager.getSettingByName("Block Mode").getValString().equalsIgnoreCase("Swing")){
  121.  
  122. float swingProgress = 0;
  123.  
  124. final float convertedProgress = MathHelper.sin(MathHelper.sqrt_float(swingProgress) * (float) Math.PI);
  125.  
  126. this.transformFirstPersonItem(-0.25F, 1.0F + convertedProgress / 10.0F);
  127.  
  128. GL11.glRotated(-convertedProgress * 25.0F, 1.0F, 0.0F, 0.0F);
  129.  
  130. this.func_178103_d();
  131.  
  132.  
  133.  
  134. break;
  135.  
  136. }
  137.  
  138. case BOW:
  139.  
  140. this.transformFirstPersonItem(f, 0.0F);
  141.  
  142. this.func_178098_a(partialTicks, abstractclientplayer);
  143.  
  144. }
  145.  
  146. }
  147.  
  148. else
  149.  
  150. {
  151.  
  152. //only needed if your target in Aura is not public static
  153. final Killaura aura = BedwarsClient.instance.modulemanager.getModuleByName();
  154.  
  155. if(aura.target != null &&KillAura.Enabled && BedwarsClient.instance.settingsManager.getSettingByName("Autoblock").getValBoolean() && mc.thePlayer.getCurrentEquippedItem() != null && mc.thePlayer.getCurrentEquippedItem().getItem() instanceof ItemSword ) {
  156. //paste in your animations in there with checking for the mode etc.
  157. this.transformFirstPersonItem(f, 0.0F);
  158.  
  159. this.func_178103_d();
  160.  
  161. }
  162. this.func_178105_d(f1);
  163.  
  164. this.transformFirstPersonItem(f, f1);
  165.  
  166. }
  167.  
  168.  
  169.  
  170. this.renderItem(abstractclientplayer, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON);
  171.  
  172. }
  173.  
  174. else if (!abstractclientplayer.isInvisible())
  175.  
  176. {
  177.  
  178. this.func_178095_a(abstractclientplayer, f, f1);
  179.  
  180. }
  181.  
  182.  
  183.  
  184. GlStateManager.popMatrix();
  185.  
  186. GlStateManager.disableRescaleNormal();
  187.  
  188. RenderHelper.disableStandardItemLighting();
  189.  
  190. }
  191.  
  192.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement