Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.01 KB | None | 0 0
  1. package net.minecraft.client.addon.tchestplate.armors.models;
  2.  
  3. import net.minecraft.client.addon.tchestplate.armors.models.ModelDemonShelm;
  4. import net.minecraft.client.addon.tchestplate.player.ExtendedPlayer;
  5. import net.minecraft.client.model.ModelBiped;
  6. import net.minecraft.client.model.ModelRenderer;
  7. import net.minecraft.entity.Entity;
  8. import net.minecraft.entity.player.EntityPlayer;
  9. import net.minecraft.util.MathHelper;
  10. import org.lwjgl.opengl.GL11;
  11.  
  12. public class ModelBaseLavaArmor extends ModelBiped {
  13. static final int[] lightColors = new int[]{16777215, 6557696, 16714430, 25855, 12566272, 16762880, 16711710, 460548, 2633000, 1317140, 200, 255, 984325, '됀', 16711680, 197379, 16777215, 16777215};
  14. public int color = -1;
  15. public int invise = 1;
  16. public float alpha = 1.0F;
  17. public int swing;
  18. ModelDemonShelm aorus;
  19.  
  20. public String getTexture() {
  21. return null;
  22. }
  23.  
  24. protected void ExtRender(EntityPlayer par1Entity, float par2, float par3, float par4, float par5, float par6, float par7, ExtendedPlayer pi) {
  25. }
  26.  
  27. public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
  28. if(par1Entity instanceof EntityPlayer) {
  29. ExtendedPlayer flag111;
  30. if(this.invise > 0) {
  31. flag111 = ExtendedPlayer.get((EntityPlayer)par1Entity);
  32. this.ExtRender((EntityPlayer)par1Entity, par2, par3, par4, par5, par6, par7, flag111);
  33. GL11.glPushMatrix();
  34. GL11.glEnable(3042);
  35. GL11.glBlendFunc(1, 1);
  36. super.render(par1Entity, par2, par3, par4, par5, par6, par7);
  37. GL11.glDisable(3042);
  38. GL11.glPopMatrix();
  39. return;
  40. }
  41.  
  42. if(this.invise < 0 || this.invise == 0) {
  43. flag111 = ExtendedPlayer.get((EntityPlayer)par1Entity);
  44. this.ExtRender((EntityPlayer)par1Entity, par2, par3, par4, par5, par6, par7, flag111);
  45. if(flag111.PredatorMode == 50) {
  46. GL11.glPushMatrix();
  47. GL11.glEnable(3042);
  48. GL11.glBlendFunc(1, 1);
  49. super.render(par1Entity, par2, par3, par4, par5, par6, par7);
  50. GL11.glDisable(3042);
  51. GL11.glPopMatrix();
  52. return;
  53. }
  54. }
  55. }
  56.  
  57. boolean flag1111 = par1Entity != null;
  58. if(this.color > 0 && flag1111) {
  59. GL11.glPushMatrix();
  60. int var8 = lightColors[this.color];
  61. GL11.glColor4f((float)(var8 >> 16) / 255.0F, (float)(var8 >> 8 & 255) / 255.0F, (float)(var8 & 255) / 255.0F, 1.0F);
  62. }
  63.  
  64. super.render(par1Entity, par2, par3, par4, par5, par6, par7);
  65. if(this.color > 0 && flag1111) {
  66. GL11.glPopMatrix();
  67. }
  68.  
  69. }
  70.  
  71. public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) {
  72. super.bipedHead.rotateAngleY = par4 / 57.295776F;
  73. super.bipedHead.rotateAngleX = par5 / 57.295776F;
  74. super.bipedHeadwear.rotateAngleY = super.bipedHead.rotateAngleY;
  75. super.bipedHeadwear.rotateAngleX = super.bipedHead.rotateAngleX;
  76. super.bipedRightArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F + 3.1415927F) * 2.0F * par2 * 0.5F;
  77. super.bipedLeftArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 2.0F * par2 * 0.5F;
  78. super.bipedRightArm.rotateAngleZ = 0.0F;
  79. super.bipedLeftArm.rotateAngleZ = 0.0F;
  80. super.bipedRightLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 1.4F * par2;
  81. super.bipedLeftLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F + 3.1415927F) * 1.4F * par2;
  82. super.bipedRightLeg.rotateAngleY = 0.0F;
  83. super.bipedLeftLeg.rotateAngleY = 0.0F;
  84. ModelRenderer bipedRightArm7;
  85. ModelRenderer bipedLeftArm7;
  86. if(super.isRiding) {
  87. bipedRightArm7 = super.bipedRightArm;
  88. bipedRightArm7.rotateAngleX -= 0.62831855F;
  89. bipedLeftArm7 = super.bipedLeftArm;
  90. bipedLeftArm7.rotateAngleX -= 0.62831855F;
  91. super.bipedRightLeg.rotateAngleX = -1.2566371F;
  92. super.bipedLeftLeg.rotateAngleX = -1.2566371F;
  93. super.bipedRightLeg.rotateAngleY = 0.31415927F;
  94. super.bipedLeftLeg.rotateAngleY = -0.31415927F;
  95. }
  96.  
  97. if(super.heldItemLeft != 0) {
  98. super.bipedLeftArm.rotateAngleX = super.bipedLeftArm.rotateAngleX * 0.5F - 0.31415927F * (float)super.heldItemLeft;
  99. }
  100.  
  101. if(super.heldItemRight != 0) {
  102. super.bipedRightArm.rotateAngleX = super.bipedRightArm.rotateAngleX * 0.5F - 0.31415927F * (float)super.heldItemRight;
  103. }
  104.  
  105. super.bipedRightArm.rotateAngleY = 0.0F;
  106. super.bipedLeftArm.rotateAngleY = 0.0F;
  107. ModelRenderer bipedRightArm8;
  108. ModelRenderer bipedLeftArm8;
  109. float f6;
  110. float f7;
  111. ModelRenderer bipedRightArm9;
  112. float bipedRightArm71;
  113. if(this.swing > 0) {
  114. super.bipedRightArm.rotateAngleX = super.bipedRightArm.rotateAngleX * 0.5F - 0.31415927F * (float)this.swing;
  115. super.bipedRightArm.rotateAngleY = 0.0F;
  116. super.bipedLeftArm.rotateAngleY = 0.0F;
  117. bipedRightArm71 = (float)(this.swing + 100);
  118. super.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(bipedRightArm71) * 3.1415927F * 2.0F) * 0.2F;
  119. super.bipedRightArm.rotationPointZ = MathHelper.sin(super.bipedBody.rotateAngleY) * 5.0F;
  120. super.bipedRightArm.rotationPointX = -MathHelper.cos(super.bipedBody.rotateAngleY) * 5.0F;
  121. super.bipedLeftArm.rotationPointZ = -MathHelper.sin(super.bipedBody.rotateAngleY) * 5.0F;
  122. super.bipedLeftArm.rotationPointX = MathHelper.cos(super.bipedBody.rotateAngleY) * 5.0F;
  123. bipedLeftArm7 = super.bipedRightArm;
  124. bipedLeftArm7.rotateAngleY += super.bipedBody.rotateAngleY;
  125. bipedRightArm8 = super.bipedLeftArm;
  126. bipedRightArm8.rotateAngleY += super.bipedBody.rotateAngleY;
  127. bipedLeftArm8 = super.bipedLeftArm;
  128. bipedLeftArm8.rotateAngleX += super.bipedBody.rotateAngleY;
  129. bipedRightArm71 = 1.0F - (float)this.swing + 100.0F;
  130. bipedRightArm71 *= bipedRightArm71;
  131. bipedRightArm71 *= bipedRightArm71;
  132. bipedRightArm71 = 1.0F - bipedRightArm71;
  133. f6 = MathHelper.sin(bipedRightArm71 * 3.1415927F);
  134. f7 = MathHelper.sin((float)(this.swing + 100) * 3.1415927F) * -(super.bipedHead.rotateAngleX - 0.7F) * 0.75F;
  135. super.bipedRightArm.rotateAngleX -= (float)((double)f6 * 1.2D + (double)f7);
  136. bipedRightArm9 = super.bipedRightArm;
  137. bipedRightArm9.rotateAngleY += super.bipedBody.rotateAngleY * 2.0F;
  138. super.bipedRightArm.rotateAngleZ = MathHelper.sin((float)(this.swing + 100) * 3.1415927F) * -0.4F;
  139. }
  140.  
  141. if(super.onGround > -9990.0F) {
  142. bipedRightArm71 = super.onGround;
  143. super.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(bipedRightArm71) * 3.1415927F * 2.0F) * 0.2F;
  144. super.bipedRightArm.rotationPointZ = MathHelper.sin(super.bipedBody.rotateAngleY) * 5.0F;
  145. super.bipedRightArm.rotationPointX = -MathHelper.cos(super.bipedBody.rotateAngleY) * 5.0F;
  146. super.bipedLeftArm.rotationPointZ = -MathHelper.sin(super.bipedBody.rotateAngleY) * 5.0F;
  147. super.bipedLeftArm.rotationPointX = MathHelper.cos(super.bipedBody.rotateAngleY) * 5.0F;
  148. bipedLeftArm7 = super.bipedRightArm;
  149. bipedLeftArm7.rotateAngleY += super.bipedBody.rotateAngleY;
  150. bipedRightArm8 = super.bipedLeftArm;
  151. bipedRightArm8.rotateAngleY += super.bipedBody.rotateAngleY;
  152. bipedLeftArm8 = super.bipedLeftArm;
  153. bipedLeftArm8.rotateAngleX += super.bipedBody.rotateAngleY;
  154. bipedRightArm71 = 1.0F - super.onGround;
  155. bipedRightArm71 *= bipedRightArm71;
  156. bipedRightArm71 *= bipedRightArm71;
  157. bipedRightArm71 = 1.0F - bipedRightArm71;
  158. f6 = MathHelper.sin(bipedRightArm71 * 3.1415927F);
  159. f7 = MathHelper.sin(super.onGround * 3.1415927F) * -(super.bipedHead.rotateAngleX - 0.7F) * 0.75F;
  160. super.bipedRightArm.rotateAngleX -= (float)((double)f6 * 1.2D + (double)f7);
  161. bipedRightArm9 = super.bipedRightArm;
  162. bipedRightArm9.rotateAngleY += super.bipedBody.rotateAngleY * 2.0F;
  163. super.bipedRightArm.rotateAngleZ = MathHelper.sin(super.onGround * 3.1415927F) * -0.4F;
  164. }
  165.  
  166. if(super.isSneak) {
  167. super.bipedBody.rotateAngleX = 0.5F;
  168. bipedRightArm7 = super.bipedRightArm;
  169. bipedRightArm7.rotateAngleX += 0.4F;
  170. bipedLeftArm7 = super.bipedLeftArm;
  171. bipedLeftArm7.rotateAngleX += 0.4F;
  172. super.bipedRightLeg.rotationPointZ = 4.0F;
  173. super.bipedLeftLeg.rotationPointZ = 4.0F;
  174. super.bipedRightLeg.rotationPointY = 9.0F;
  175. super.bipedLeftLeg.rotationPointY = 9.0F;
  176. super.bipedHead.rotationPointY = 1.0F;
  177. super.bipedHeadwear.rotationPointY = 1.0F;
  178. } else {
  179. super.bipedBody.rotateAngleX = 0.0F;
  180. super.bipedRightLeg.rotationPointZ = 0.1F;
  181. super.bipedLeftLeg.rotationPointZ = 0.1F;
  182. super.bipedRightLeg.rotationPointY = 12.0F;
  183. super.bipedLeftLeg.rotationPointY = 12.0F;
  184. super.bipedHead.rotationPointY = 0.0F;
  185. super.bipedHeadwear.rotationPointY = 0.0F;
  186. }
  187.  
  188. bipedRightArm7 = super.bipedRightArm;
  189. bipedRightArm7.rotateAngleZ += MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
  190. bipedLeftArm7 = super.bipedLeftArm;
  191. bipedLeftArm7.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
  192. bipedRightArm8 = super.bipedRightArm;
  193. bipedRightArm8.rotateAngleX += MathHelper.sin(par3 * 0.067F) * 0.05F;
  194. bipedLeftArm8 = super.bipedLeftArm;
  195. bipedLeftArm8.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
  196. if(super.aimedBow) {
  197. f6 = 0.0F;
  198. f7 = 0.0F;
  199. super.bipedRightArm.rotateAngleZ = 0.0F;
  200. super.bipedLeftArm.rotateAngleZ = 0.0F;
  201. super.bipedRightArm.rotateAngleY = -0.1F + super.bipedHead.rotateAngleY;
  202. super.bipedLeftArm.rotateAngleY = 0.1F + super.bipedHead.rotateAngleY + 0.4F;
  203. super.bipedRightArm.rotateAngleX = -1.5707964F + super.bipedHead.rotateAngleX;
  204. super.bipedLeftArm.rotateAngleX = -1.5707964F + super.bipedHead.rotateAngleX;
  205. bipedRightArm9 = super.bipedRightArm;
  206. bipedRightArm9.rotateAngleX -= 0.0F;
  207. ModelRenderer bipedLeftArm9 = super.bipedLeftArm;
  208. bipedLeftArm9.rotateAngleX -= 0.0F;
  209. ModelRenderer bipedRightArm10 = super.bipedRightArm;
  210. bipedRightArm10.rotateAngleZ += MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
  211. ModelRenderer bipedLeftArm10 = super.bipedLeftArm;
  212. bipedLeftArm10.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
  213. ModelRenderer bipedRightArm11 = super.bipedRightArm;
  214. bipedRightArm11.rotateAngleX += MathHelper.sin(par3 * 0.067F) * 0.05F;
  215. ModelRenderer bipedLeftArm11 = super.bipedLeftArm;
  216. bipedLeftArm11.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
  217. }
  218.  
  219. }
  220. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement