Advertisement
Guest User

My Entity Layering Attempt

a guest
Jul 10th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.14 KB | None | 0 0
  1. /**
  2. * This mod element is always locked. Enter your code in the methods below.
  3. * If you don't need some of these methods, you can remove them as they
  4. * are overrides of the base class ArgonianModelModElements.ModElement.
  5. *
  6. * You can register new events in this class too.
  7. *
  8. * As this class is loaded into mod element list, it NEEDS to extend
  9. * ModElement class. If you remove this extend statement or remove the
  10. * constructor, the compilation will fail.
  11. *
  12. * If you want to make a plain independent class, create it in
  13. * "Workspace" -> "Source" menu.
  14. *
  15. * If you change workspace package, modid or prefix, you will need
  16. * to manually adapt this file to these changes or remake it.
  17. */
  18. package net.mcreator.theminecraftanimemod;
  19.  
  20. import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
  21. import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
  22. import com.google.common.collect.ImmutableList;
  23. import com.mojang.blaze3d.matrix.MatrixStack;
  24. import com.mojang.blaze3d.vertex.IVertexBuilder;
  25. import net.minecraft.client.renderer.entity.model.AgeableModel;
  26. import net.minecraft.client.renderer.model.ModelRenderer;
  27. import net.minecraft.entity.LivingEntity;
  28. import com.mojang.blaze3d.matrix.MatrixStack;
  29. import com.mojang.blaze3d.vertex.IVertexBuilder;
  30. import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
  31. import net.minecraft.client.renderer.IRenderTypeBuffer;
  32. import net.minecraft.util.math.MathHelper;
  33. import net.minecraft.client.renderer.ItemRenderer;
  34. import net.minecraft.client.renderer.entity.IEntityRenderer;
  35. import net.minecraft.client.renderer.entity.layers.LayerRenderer;
  36. import net.minecraft.client.renderer.entity.model.EntityModel;
  37. import net.minecraft.client.renderer.texture.OverlayTexture;
  38. import net.minecraft.entity.LivingEntity;
  39. import net.minecraft.entity.player.PlayerEntity;
  40. import net.minecraft.client.renderer.entity.*;
  41. import net.minecraftforge.common.MinecraftForge;
  42. import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
  43. import net.minecraftforge.eventbus.api.SubscribeEvent;
  44. import net.minecraft.client.renderer.entity.model.PlayerModel;
  45. import net.minecraft.client.Minecraft;
  46. import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
  47. import java.util.List;
  48. import java.util.Map;
  49. import net.minecraft.util.ResourceLocation;
  50. import net.minecraftforge.fml.common.Mod;
  51. import net.minecraftforge.api.distmarker.OnlyIn;
  52. import net.minecraftforge.api.distmarker.Dist;
  53.  
  54. @Mod.EventBusSubscriber(modid = "the_minecraft_anime_mod", bus = Mod.EventBusSubscriber.Bus.MOD)
  55. @ArgonianModelModElements.ModElement.Tag
  56. public class EntityLayer extends ArgonianModelModElements.ModElement {
  57. /**
  58. * Do not remove this constructor
  59. */
  60. public EntityLayer(EntityLayerModElements instance) {
  61. super(instance, 1);
  62. }
  63.  
  64. @Override
  65. public void initElements() {
  66. }
  67.  
  68. @OnlyIn(Dist.CLIENT)
  69. @Override
  70. public void clientLoad(FMLClientSetupEvent event)
  71. {
  72. Map<String, PlayerRenderer> playerSkinMap = Minecraft.getInstance().getRenderManager().getSkinMap();
  73. EntityLayer.addPlayerLayers(playerSkinMap.get("default"));
  74. EntityLayer.addPlayerLayers(playerSkinMap.get("slim"));
  75. }
  76.  
  77. @Override
  78. public void init(FMLCommonSetupEvent event) {
  79. }
  80.  
  81. @Override
  82. public void serverLoad(FMLServerStartingEvent event) {
  83. }
  84.  
  85. public static void addPlayerLayers(PlayerRenderer renderer)
  86. {
  87. List<LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>>> layers = ObfuscationReflectionHelper.getPrivateValue(LivingRenderer.class, renderer, "field_177097_h");
  88. if(layers != null)
  89. {
  90. layers.add(new playerlayer<>(renderer));
  91. }
  92. }
  93.  
  94. public static class player<T extends LivingEntity> extends AgeableModel<T> {
  95.  
  96. private final ModelRenderer head_joint;
  97. private final ModelRenderer bang_right_1;
  98. private final ModelRenderer bang_right_2;
  99. private final ModelRenderer bang_right_3;
  100. private final ModelRenderer bang_right_4;
  101. private final ModelRenderer bang_middle;
  102. private final ModelRenderer bang_left_1;
  103. private final ModelRenderer bang_left_2;
  104. private final ModelRenderer bang_left_3;
  105. private final ModelRenderer bang_left_4;
  106. private final ModelRenderer bang_left_5;
  107. private final ModelRenderer hair_right_1;
  108. private final ModelRenderer hair_right_2;
  109. private final ModelRenderer hair_right_3;
  110. private final ModelRenderer hair_right_4;
  111. private final ModelRenderer hair_left_1;
  112. private final ModelRenderer hair_left_2;
  113. private final ModelRenderer hair_left_3;
  114. private final ModelRenderer hair_left_4;
  115. private final ModelRenderer hair_left_5;
  116. private final ModelRenderer hair_left_6;
  117. private final ModelRenderer hair_left_7;
  118. private final ModelRenderer hair_left_8;
  119. private final ModelRenderer hair_left_9;
  120. private final ModelRenderer hair_left_10;
  121. private final ModelRenderer hair_right_6;
  122. private final ModelRenderer hair_right_7;
  123. private final ModelRenderer hair_right_8;
  124. private final ModelRenderer hair_right_9;
  125. private final ModelRenderer hair_right_10;
  126. private final ModelRenderer hair_right_11;
  127. private final ModelRenderer hair_right_12;
  128. private final ModelRenderer hair_right_13;
  129. private final ModelRenderer hair_left_12;
  130. private final ModelRenderer hair_left_13;
  131. private final ModelRenderer hair_left_14;
  132. private final ModelRenderer hair_left_15;
  133. private final ModelRenderer hair_left_16;
  134. private final ModelRenderer hair_right_14;
  135. private final ModelRenderer hair_right_15;
  136. private final ModelRenderer hair_right_17;
  137. private final ModelRenderer hair_right_18;
  138. private final ModelRenderer hair_right_19;
  139. private final ModelRenderer hair_right_20;
  140. private final ModelRenderer hair_right_21;
  141. private final ModelRenderer hair_right_22;
  142. private final ModelRenderer hair_left_17;
  143. private final ModelRenderer hair_left_18;
  144. private final ModelRenderer hair_left_19;
  145. private final ModelRenderer hair_left_20;
  146. private final ModelRenderer hair_left_21;
  147. private final ModelRenderer hair_left_22;
  148. private final ModelRenderer hair_left_23;
  149. private final ModelRenderer hair_left_24;
  150. private final ModelRenderer hair_left_25;
  151. private final ModelRenderer hair_right_23;
  152. private final ModelRenderer hair_left_26;
  153. private final ModelRenderer hair_left_27;
  154. private final ModelRenderer hair_left_28;
  155. private final ModelRenderer hair_left_29;
  156. private final ModelRenderer hair_left_30;
  157. private final ModelRenderer hair_left_31;
  158. private final ModelRenderer hair_left_32;
  159. private final ModelRenderer hair_right_24;
  160. private final ModelRenderer hair_right_25;
  161. private final ModelRenderer hair_left_33;
  162. private final ModelRenderer hair_left_34;
  163. private final ModelRenderer hair_left_35;
  164. private final ModelRenderer hair_left_35_1;
  165.  
  166. public player() {
  167. textureWidth = 64;
  168. textureHeight = 64;
  169.  
  170. head_joint = new ModelRenderer(this);
  171. head_joint.setRotationPoint(0.0F, 0.0F, 0.0F);
  172. head_joint.setTextureOffset(24, 0).addBox(-3.0F, -6.0F, -1.0F, 6.0F, 6.0F, 1.0F, 0.0F, false);
  173.  
  174. bang_right_1 = new ModelRenderer(this);
  175. bang_right_1.setRotationPoint(-2.5F, -9.5F, -5.5F);
  176. setRotationAngle(bang_right_1, 0.0F, 0.0F, 0.821F);
  177. bang_right_1.setTextureOffset(58, 0).addBox(0.7F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  178.  
  179. bang_right_2 = new ModelRenderer(this);
  180. bang_right_2.setRotationPoint(-4.4F, -7.5F, -5.5F);
  181. setRotationAngle(bang_right_2, 0.0F, 0.0F, 0.4691F);
  182. bang_right_2.setTextureOffset(58, 0).addBox(0.5F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  183.  
  184. bang_right_3 = new ModelRenderer(this);
  185. bang_right_3.setRotationPoint(-5.5F, -5.5F, -5.5F);
  186. setRotationAngle(bang_right_3, 0.0F, 0.0F, 0.1955F);
  187. bang_right_3.setTextureOffset(58, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  188.  
  189. bang_right_4 = new ModelRenderer(this);
  190. bang_right_4.setRotationPoint(-6.0F, -3.0F, -5.5F);
  191. bang_right_4.setTextureOffset(58, 0).addBox(0.2F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  192.  
  193. bang_middle = new ModelRenderer(this);
  194. bang_middle.setRotationPoint(-0.5F, -10.0F, -4.5F);
  195. setRotationAngle(bang_middle, -0.3519F, 0.0F, 0.5473F);
  196. bang_middle.setTextureOffset(58, 0).addBox(-0.2F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  197.  
  198. bang_left_1 = new ModelRenderer(this);
  199. bang_left_1.setRotationPoint(0.5F, -8.3F, -5.5F);
  200. setRotationAngle(bang_left_1, 0.0F, 0.0F, -0.6646F);
  201. bang_left_1.setTextureOffset(58, 0).addBox(-0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  202.  
  203. bang_left_2 = new ModelRenderer(this);
  204. bang_left_2.setRotationPoint(2.0F, -8.0F, -5.0F);
  205. setRotationAngle(bang_left_2, 0.0F, 0.0F, -0.821F);
  206. bang_left_2.setTextureOffset(58, 0).addBox(-0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  207.  
  208. bang_left_3 = new ModelRenderer(this);
  209. bang_left_3.setRotationPoint(1.8F, -7.0F, -5.5F);
  210. setRotationAngle(bang_left_3, 0.0F, 0.0F, -0.43F);
  211. bang_left_3.setTextureOffset(58, 0).addBox(-0.5F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  212.  
  213. bang_left_4 = new ModelRenderer(this);
  214. bang_left_4.setRotationPoint(3.0F, -4.7F, -5.5F);
  215. setRotationAngle(bang_left_4, 0.0F, 0.0F, -0.1955F);
  216. bang_left_4.setTextureOffset(58, 0).addBox(-0.7F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  217.  
  218. bang_left_5 = new ModelRenderer(this);
  219. bang_left_5.setRotationPoint(3.5F, -2.7F, -5.5F);
  220. bang_left_5.setTextureOffset(58, 0).addBox(-0.8F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  221.  
  222. hair_right_1 = new ModelRenderer(this);
  223. hair_right_1.setRotationPoint(-3.5F, -10.5F, -4.0F);
  224. setRotationAngle(hair_right_1, 0.0F, 0.0F, 0.2346F);
  225. hair_right_1.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  226.  
  227. hair_right_2 = new ModelRenderer(this);
  228. hair_right_2.setRotationPoint(-3.0F, -11.7F, -3.9F);
  229. setRotationAngle(hair_right_2, 0.0F, -0.1564F, 0.2346F);
  230. hair_right_2.setTextureOffset(57, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 3.0F, 1.0F, 0.0F, false);
  231.  
  232. hair_right_3 = new ModelRenderer(this);
  233. hair_right_3.setRotationPoint(-1.3F, -11.9F, -4.0F);
  234. setRotationAngle(hair_right_3, -0.1955F, -0.4691F, 0.3128F);
  235. hair_right_3.setTextureOffset(57, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  236.  
  237. hair_right_4 = new ModelRenderer(this);
  238. hair_right_4.setRotationPoint(-0.2F, -11.9F, -2.6F);
  239. setRotationAngle(hair_right_4, -0.1955F, 0.3519F, 0.0391F);
  240. hair_right_4.setTextureOffset(57, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  241.  
  242. hair_left_1 = new ModelRenderer(this);
  243. hair_left_1.setRotationPoint(2.8F, -12.1F, -2.3F);
  244. setRotationAngle(hair_left_1, -0.391F, 0.0391F, 0.0782F);
  245. hair_left_1.setTextureOffset(56, 0).addBox(0.6F, 0.0F, 0.0F, 1.0F, 4.0F, 3.0F, 0.0F, false);
  246.  
  247. hair_left_2 = new ModelRenderer(this);
  248. hair_left_2.setRotationPoint(3.0F, -14.0F, -1.0F);
  249. setRotationAngle(hair_left_2, -0.391F, 0.0391F, 0.0782F);
  250. hair_left_2.setTextureOffset(56, 0).addBox(-0.5F, 0.0F, 0.0F, 2.0F, 4.0F, 1.0F, 0.0F, false);
  251.  
  252. hair_left_3 = new ModelRenderer(this);
  253. hair_left_3.setRotationPoint(2.4F, -9.5F, -3.6F);
  254. setRotationAngle(hair_left_3, -0.391F, 0.0391F, 0.0782F);
  255. hair_left_3.setTextureOffset(56, 0).addBox(0.0F, 0.5F, 0.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);
  256.  
  257. hair_left_4 = new ModelRenderer(this);
  258. hair_left_4.setRotationPoint(3.0F, -12.1F, -2.3F);
  259. setRotationAngle(hair_left_4, -0.1564F, 0.0391F, -0.2737F);
  260. hair_left_4.setTextureOffset(56, 0).addBox(-0.7F, 0.0F, -1.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  261.  
  262. hair_left_5 = new ModelRenderer(this);
  263. hair_left_5.setRotationPoint(3.4F, -8.7F, -3.0F);
  264. setRotationAngle(hair_left_5, -0.1173F, 0.0391F, -0.391F);
  265. hair_left_5.setTextureOffset(56, 0).addBox(-0.1F, 0.5F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  266.  
  267. hair_left_6 = new ModelRenderer(this);
  268. hair_left_6.setRotationPoint(3.5F, -8.7F, -3.6F);
  269. setRotationAngle(hair_left_6, -0.1173F, 0.0391F, 0.391F);
  270. hair_left_6.setTextureOffset(56, 0).addBox(0.9F, 0.5F, 0.0F, 1.0F, 3.0F, 2.0F, 0.0F, false);
  271.  
  272. hair_left_7 = new ModelRenderer(this);
  273. hair_left_7.setRotationPoint(4.5F, -9.0F, -1.0F);
  274. setRotationAngle(hair_left_7, -0.1173F, -0.2737F, 0.4691F);
  275. hair_left_7.setTextureOffset(56, 0).addBox(0.9F, 0.5F, 0.0F, 1.0F, 3.0F, 2.0F, 0.0F, false);
  276.  
  277. hair_left_8 = new ModelRenderer(this);
  278. hair_left_8.setRotationPoint(4.4F, -6.0F, 0.0F);
  279. setRotationAngle(hair_left_8, -0.1173F, -0.2737F, 0.6255F);
  280. hair_left_8.setTextureOffset(56, 0).addBox(0.0F, -1.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  281.  
  282. hair_left_9 = new ModelRenderer(this);
  283. hair_left_9.setRotationPoint(4.0F, -6.7F, -3.2F);
  284. setRotationAngle(hair_left_9, -0.1173F, 0.0391F, 0.43F);
  285. hair_left_9.setTextureOffset(56, 0).addBox(-0.1F, 0.5F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  286.  
  287. hair_left_10 = new ModelRenderer(this);
  288. hair_left_10.setRotationPoint(1.0F, -14.5F, -1.0F);
  289. setRotationAngle(hair_left_10, -0.391F, 0.1564F, -0.0391F);
  290. hair_left_10.setTextureOffset(56, 0).addBox(0.5F, 0.5F, 0.0F, 2.0F, 2.0F, 1.0F, 0.0F, false);
  291.  
  292. hair_right_6 = new ModelRenderer(this);
  293. hair_right_6.setRotationPoint(-4.5F, -10.0F, -2.0F);
  294. setRotationAngle(hair_right_6, 0.0F, 0.2346F, -0.0782F);
  295. hair_right_6.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  296.  
  297. hair_right_7 = new ModelRenderer(this);
  298. hair_right_7.setRotationPoint(-5.3F, -8.8F, -0.5F);
  299. setRotationAngle(hair_right_7, -0.1564F, 0.1173F, -0.3519F);
  300. hair_right_7.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  301.  
  302. hair_right_8 = new ModelRenderer(this);
  303. hair_right_8.setRotationPoint(-5.5F, -10.0F, -0.1F);
  304. setRotationAngle(hair_right_8, -0.1955F, 0.1173F, -0.3519F);
  305. hair_right_8.setTextureOffset(56, 0).addBox(0.2F, 0.0F, 0.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);
  306.  
  307. hair_right_9 = new ModelRenderer(this);
  308. hair_right_9.setRotationPoint(-5.5F, -7.5F, -2.5F);
  309. setRotationAngle(hair_right_9, -0.1564F, 0.1173F, -0.3519F);
  310. hair_right_9.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  311.  
  312. hair_right_10 = new ModelRenderer(this);
  313. hair_right_10.setRotationPoint(-5.8F, -8.5F, 2.0F);
  314. setRotationAngle(hair_right_10, -0.1173F, 0.1173F, -0.5473F);
  315. hair_right_10.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  316.  
  317. hair_right_11 = new ModelRenderer(this);
  318. hair_right_11.setRotationPoint(-5.9F, -9.0F, -2.1F);
  319. setRotationAngle(hair_right_11, -0.1564F, 0.1955F, -0.3519F);
  320. hair_right_11.setTextureOffset(56, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  321.  
  322. hair_right_12 = new ModelRenderer(this);
  323. hair_right_12.setRotationPoint(-6.2F, -9.8F, 2.3F);
  324. setRotationAngle(hair_right_12, -0.1564F, 0.1173F, -0.5082F);
  325. hair_right_12.setTextureOffset(56, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 2.0F, 2.0F, 0.0F, false);
  326.  
  327. hair_right_13 = new ModelRenderer(this);
  328. hair_right_13.setRotationPoint(-6.0F, -6.0F, 1.0F);
  329. setRotationAngle(hair_right_13, -0.1173F, 0.1173F, -0.5473F);
  330. hair_right_13.setTextureOffset(56, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  331.  
  332. hair_left_12 = new ModelRenderer(this);
  333. hair_left_12.setRotationPoint(4.7F, -9.5F, 2.0F);
  334. setRotationAngle(hair_left_12, -0.1955F, -0.1173F, 0.7037F);
  335. hair_left_12.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  336.  
  337. hair_left_13 = new ModelRenderer(this);
  338. hair_left_13.setRotationPoint(5.5F, -10.3F, 2.4F);
  339. setRotationAngle(hair_left_13, -0.1955F, -0.1173F, 0.7037F);
  340. hair_left_13.setTextureOffset(56, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  341.  
  342. hair_left_14 = new ModelRenderer(this);
  343. hair_left_14.setRotationPoint(5.0F, -10.4F, -0.8F);
  344. setRotationAngle(hair_left_14, -0.1173F, -0.2737F, 0.4691F);
  345. hair_left_14.setTextureOffset(56, 0).addBox(-0.3F, 0.5F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  346.  
  347. hair_left_15 = new ModelRenderer(this);
  348. hair_left_15.setRotationPoint(-0.5F, -14.7F, -1.3F);
  349. setRotationAngle(hair_left_15, -0.2346F, -0.1955F, -0.1173F);
  350. hair_left_15.setTextureOffset(56, 0).addBox(0.5F, 0.5F, 0.0F, 2.0F, 7.0F, 1.0F, 0.0F, false);
  351.  
  352. hair_left_16 = new ModelRenderer(this);
  353. hair_left_16.setRotationPoint(-1.5F, -15.2F, 0.3F);
  354. setRotationAngle(hair_left_16, -0.3128F, -0.3128F, -0.1173F);
  355. hair_left_16.setTextureOffset(56, 0).addBox(-0.5F, 0.0F, 0.0F, 2.0F, 8.0F, 1.0F, 0.0F, false);
  356.  
  357. hair_right_14 = new ModelRenderer(this);
  358. hair_right_14.setRotationPoint(-0.9F, -14.5F, -1.3F);
  359. setRotationAngle(hair_right_14, -0.2346F, -0.3128F, 0.3484F);
  360. hair_right_14.setTextureOffset(56, 0).addBox(0.5F, 0.0F, 0.0F, 2.0F, 7.0F, 1.0F, 0.0F, false);
  361.  
  362. hair_right_15 = new ModelRenderer(this);
  363. hair_right_15.setRotationPoint(-2.3F, -15.0F, -0.4F);
  364. setRotationAngle(hair_right_15, -0.2346F, -0.3128F, 0.192F);
  365. hair_right_15.setTextureOffset(56, 0).addBox(0.5F, 0.0F, 0.0F, 2.0F, 8.0F, 1.0F, 0.0F, false);
  366.  
  367. hair_right_17 = new ModelRenderer(this);
  368. hair_right_17.setRotationPoint(-2.8F, -12.0F, -1.3F);
  369. setRotationAngle(hair_right_17, -0.2346F, -0.3128F, 0.192F);
  370. hair_right_17.setTextureOffset(56, 0).addBox(0.7F, 0.0F, 0.0F, 1.0F, 3.0F, 2.0F, 0.0F, false);
  371.  
  372. hair_right_18 = new ModelRenderer(this);
  373. hair_right_18.setRotationPoint(-2.4F, -15.5F, 1.5F);
  374. setRotationAngle(hair_right_18, -0.1955F, 0.0F, 0.192F);
  375. hair_right_18.setTextureOffset(56, 0).addBox(0.5F, 0.0F, 0.0F, 2.0F, 4.0F, 1.0F, 0.0F, false);
  376.  
  377. hair_right_19 = new ModelRenderer(this);
  378. hair_right_19.setRotationPoint(-3.1F, -12.0F, 0.5F);
  379. setRotationAngle(hair_right_19, -0.2346F, -0.1564F, 0.192F);
  380. hair_right_19.setTextureOffset(56, 0).addBox(0.0F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  381.  
  382. hair_right_20 = new ModelRenderer(this);
  383. hair_right_20.setRotationPoint(-2.9F, -11.0F, 2.5F);
  384. setRotationAngle(hair_right_20, -0.2346F, 0.1564F, 0.192F);
  385. hair_right_20.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  386.  
  387. hair_right_21 = new ModelRenderer(this);
  388. hair_right_21.setRotationPoint(-2.3F, -12.8F, 3.0F);
  389. setRotationAngle(hair_right_21, -0.2346F, 0.1564F, 0.192F);
  390. hair_right_21.setTextureOffset(56, 0).addBox(0.9F, 0.0F, 0.0F, 1.0F, 4.0F, 2.0F, 0.0F, false);
  391.  
  392. hair_right_22 = new ModelRenderer(this);
  393. hair_right_22.setRotationPoint(-2.0F, -14.0F, 3.2F);
  394. setRotationAngle(hair_right_22, -0.2346F, 0.1564F, 0.192F);
  395. hair_right_22.setTextureOffset(56, 0).addBox(0.7F, 0.0F, -1.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  396.  
  397. hair_left_17 = new ModelRenderer(this);
  398. hair_left_17.setRotationPoint(0.0F, -15.8F, 0.3F);
  399. setRotationAngle(hair_left_17, -0.1955F, -0.3128F, 0.0782F);
  400. hair_left_17.setTextureOffset(56, 0).addBox(-0.5F, 0.5F, 0.0F, 2.0F, 8.0F, 1.0F, 0.0F, false);
  401.  
  402. hair_left_18 = new ModelRenderer(this);
  403. hair_left_18.setRotationPoint(0.8F, -15.0F, 0.7F);
  404. setRotationAngle(hair_left_18, -0.1955F, -0.3128F, -0.0782F);
  405. hair_left_18.setTextureOffset(56, 0).addBox(-0.5F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  406.  
  407. hair_left_19 = new ModelRenderer(this);
  408. hair_left_19.setRotationPoint(0.9F, -12.8F, -2.0F);
  409. setRotationAngle(hair_left_19, -0.391F, 0.1564F, -0.0391F);
  410. hair_left_19.setTextureOffset(56, 0).addBox(0.7F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  411.  
  412. hair_left_20 = new ModelRenderer(this);
  413. hair_left_20.setRotationPoint(0.8F, -11.0F, -2.4F);
  414. setRotationAngle(hair_left_20, -0.1955F, 0.1564F, -0.0782F);
  415. hair_left_20.setTextureOffset(56, 0).addBox(0.7F, 0.0F, 0.0F, 1.0F, 4.0F, 2.0F, 0.0F, false);
  416.  
  417. hair_left_21 = new ModelRenderer(this);
  418. hair_left_21.setRotationPoint(0.9F, -12.5F, 0.0F);
  419. setRotationAngle(hair_left_21, -0.1955F, -0.3128F, -0.0782F);
  420. hair_left_21.setTextureOffset(56, 0).addBox(0.9F, 0.0F, 0.0F, 1.0F, 5.0F, 2.0F, 0.0F, false);
  421.  
  422. hair_left_22 = new ModelRenderer(this);
  423. hair_left_22.setRotationPoint(2.0F, -10.8F, 2.2F);
  424. setRotationAngle(hair_left_22, -0.2737F, -0.0782F, -0.1599F);
  425. hair_left_22.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  426.  
  427. hair_left_23 = new ModelRenderer(this);
  428. hair_left_23.setRotationPoint(1.5F, -12.8F, 2.8F);
  429. setRotationAngle(hair_left_23, -0.2346F, -0.0391F, -0.2381F);
  430. hair_left_23.setTextureOffset(56, 0).addBox(0.9F, 0.0F, 0.0F, 1.0F, 4.0F, 2.0F, 0.0F, false);
  431.  
  432. hair_left_24 = new ModelRenderer(this);
  433. hair_left_24.setRotationPoint(0.9F, -14.0F, 3.3F);
  434. setRotationAngle(hair_left_24, -0.2346F, 0.0391F, -0.3161F);
  435. hair_left_24.setTextureOffset(56, 0).addBox(-0.5F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  436.  
  437. hair_left_25 = new ModelRenderer(this);
  438. hair_left_25.setRotationPoint(2.0F, -10.3F, 4.5F);
  439. setRotationAngle(hair_left_25, -0.7821F, -0.1173F, 0.0391F);
  440. hair_left_25.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  441.  
  442. hair_right_23 = new ModelRenderer(this);
  443. hair_right_23.setRotationPoint(-3.2F, -10.3F, 4.5F);
  444. setRotationAngle(hair_right_23, -0.7821F, -0.1173F, 0.2346F);
  445. hair_right_23.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  446.  
  447. hair_left_26 = new ModelRenderer(this);
  448. hair_left_26.setRotationPoint(-0.5F, -9.0F, 4.5F);
  449. setRotationAngle(hair_left_26, -0.5866F, -0.43F, 0.0782F);
  450. hair_left_26.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  451.  
  452. hair_left_27 = new ModelRenderer(this);
  453. hair_left_27.setRotationPoint(-0.5F, -11.2F, 4.0F);
  454. setRotationAngle(hair_left_27, -0.5866F, -0.43F, 0.0782F);
  455. hair_left_27.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 5.0F, 2.0F, 0.0F, false);
  456.  
  457. hair_left_28 = new ModelRenderer(this);
  458. hair_left_28.setRotationPoint(-0.7F, -12.5F, 4.9F);
  459. setRotationAngle(hair_left_28, -0.5866F, -0.43F, 0.0782F);
  460. hair_left_28.setTextureOffset(56, 0).addBox(-0.1F, 0.0F, 0.0F, 2.0F, 5.0F, 1.0F, 0.0F, false);
  461.  
  462. hair_left_29 = new ModelRenderer(this);
  463. hair_left_29.setRotationPoint(-0.7F, -10.5F, 5.5F);
  464. setRotationAngle(hair_left_29, -0.5866F, -0.43F, 0.0782F);
  465. hair_left_29.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  466.  
  467. hair_left_30 = new ModelRenderer(this);
  468. hair_left_30.setRotationPoint(1.9F, -11.3F, 5.5F);
  469. setRotationAngle(hair_left_30, -0.7821F, -0.1173F, 0.0391F);
  470. hair_left_30.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  471.  
  472. hair_left_31 = new ModelRenderer(this);
  473. hair_left_31.setRotationPoint(0.0F, -6.2F, 2.8F);
  474. setRotationAngle(hair_left_31, -0.5866F, -0.43F, 0.0782F);
  475. hair_left_31.setTextureOffset(56, 0).addBox(0.5F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  476.  
  477. hair_left_32 = new ModelRenderer(this);
  478. hair_left_32.setRotationPoint(3.2F, -8.0F, 3.4F);
  479. setRotationAngle(hair_left_32, -0.5866F, -0.6646F, 0.5864F);
  480. hair_left_32.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  481.  
  482. hair_right_24 = new ModelRenderer(this);
  483. hair_right_24.setRotationPoint(-3.0F, -8.0F, 3.4F);
  484. setRotationAngle(hair_right_24, -0.5866F, -0.6646F, 0.1173F);
  485. hair_right_24.setTextureOffset(56, 0).addBox(0.3F, 0.0F, 0.0F, 2.0F, 4.0F, 2.0F, 0.0F, false);
  486.  
  487. hair_right_25 = new ModelRenderer(this);
  488. hair_right_25.setRotationPoint(-2.7F, -6.6F, 2.6F);
  489. setRotationAngle(hair_right_25, -0.5866F, -0.6646F, 0.1173F);
  490. hair_right_25.setTextureOffset(56, 0).addBox(0.5F, 0.0F, 0.0F, 2.0F, 3.0F, 2.0F, 0.0F, false);
  491.  
  492. hair_left_33 = new ModelRenderer(this);
  493. hair_left_33.setRotationPoint(0.0F, -12.5F, 1.7F);
  494. setRotationAngle(hair_left_33, -0.1955F, -0.3128F, -0.0782F);
  495. hair_left_33.setTextureOffset(56, 0).addBox(0.9F, 0.0F, 0.0F, 1.0F, 5.0F, 2.0F, 0.0F, false);
  496.  
  497. hair_left_34 = new ModelRenderer(this);
  498. hair_left_34.setRotationPoint(-0.2F, -14.0F, 1.9F);
  499. setRotationAngle(hair_left_34, -0.1955F, -0.3128F, -0.0782F);
  500. hair_left_34.setTextureOffset(56, 0).addBox(0.9F, 0.0F, 0.0F, 1.0F, 4.0F, 2.0F, 0.0F, false);
  501.  
  502. hair_left_35 = new ModelRenderer(this);
  503. hair_left_35.setRotationPoint(-1.7F, -12.5F, 4.0F);
  504. setRotationAngle(hair_left_35, -0.1955F, 0.2737F, -0.0782F);
  505. hair_left_35.setTextureOffset(56, 0).addBox(0.1F, 0.0F, 0.0F, 2.0F, 5.0F, 2.0F, 0.0F, false);
  506.  
  507. hair_left_35_1 = new ModelRenderer(this);
  508. hair_left_35_1.setRotationPoint(4.0F, -12.5F, -0.1F);
  509. setRotationAngle(hair_left_35_1, -0.1564F, -0.3128F, 0.2737F);
  510. hair_left_35_1.setTextureOffset(56, 0).addBox(-0.1F, 0.0F, 0.0F, 2.0F, 5.0F, 2.0F, 0.0F, false);
  511. }
  512.  
  513. @Override
  514. public void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){
  515. //previously the render function, render code was moved to a method below
  516. }
  517.  
  518. this.head_joint.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  519. this.bang_right_1.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  520. this.bang_right_2.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  521. this.bang_right_3.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  522. this.bang_right_4.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  523. this.bang_middle.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  524. this.bang_left_1.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  525. this.bang_left_2.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  526. this.bang_left_3.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  527. this.bang_left_4.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  528. this.bang_left_5.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  529. this.hair_right_1.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  530. this.hair_right_2.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  531. this.hair_right_3.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  532. this.hair_right_4.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  533. this.hair_left_1.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  534. this.hair_left_2.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  535. this.hair_left_3.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  536. this.hair_left_4.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  537. this.hair_left_5.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  538. this.hair_left_6.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  539. this.hair_left_7.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  540. this.hair_left_8.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  541. this.hair_left_9.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  542. this.hair_left_10.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  543. this.hair_right_6.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  544. this.hair_right_7.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  545. this.hair_right_8.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  546. this.hair_right_9.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  547. this.hair_right_10.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  548. this.hair_right_11.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  549. this.hair_right_12.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  550. this.hair_right_13.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  551. this.hair_left_12.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  552. this.hair_left_13.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  553. this.hair_left_14.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  554. this.hair_left_15.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  555. this.hair_left_16.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  556. this.hair_right_14.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  557. this.hair_right_15.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  558. this.hair_right_17.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  559. this.hair_right_18.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  560. this.hair_right_19.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  561. this.hair_right_20.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  562. this.hair_right_21.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  563. this.hair_right_22.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  564. this.hair_left_17.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  565. this.hair_left_18.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  566. this.hair_left_19.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  567. this.hair_left_20.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  568. this.hair_left_21.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  569. this.hair_left_22.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  570. this.hair_left_23.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  571. this.hair_left_24.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  572. this.hair_left_25.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  573. this.hair_right_23.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  574. this.hair_left_26.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  575. this.hair_left_27.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  576. this.hair_left_28.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  577. this.hair_left_29.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  578. this.hair_left_30.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  579. this.hair_left_31.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  580. this.hair_left_32.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  581. this.hair_right_24.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  582. this.hair_right_25.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  583. this.hair_left_33.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  584. this.hair_left_34.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  585. this.hair_left_35.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  586. this.hair_left_35_1.rotateAngleY = netHeadYaw * ((float) Math.PI / 180F);
  587. //add back the other two if this fails.
  588.  
  589. this.head_joint.rotateAngleX = headPitch * ((float) Math.PI / 180F);
  590. if (entityIn instanceof PlayerEntity) {
  591. if (entityIn.isCrouching()) {
  592. this.bang_right_1.rotationPointY = 4.2F;
  593. this.bang_right_2.rotationPointY = 4.2F;
  594. this.bang_right_3.rotationPointY = 4.2F;
  595. this.bang_right_4.rotationPointY = 4.2F;
  596. this.bang_middle.rotationPointY = 4.2F;
  597. this.bang_left_1.rotationPointY = 4.2F;
  598. this.bang_left_2.rotationPointY = 4.2F;
  599. this.bang_left_3.rotationPointY = 4.2F;
  600. this.bang_left_4.rotationPointY = 4.2F;
  601. this.bang_left_5.rotationPointY = 4.2F;
  602. this.hair_right_1.rotationPointY = 4.2F;
  603. this.hair_right_2.rotationPointY = 4.2F;
  604. this.hair_right_3.rotationPointY = 4.2F;
  605. this.hair_right_4.rotationPointY = 4.2F;
  606. this.hair_left_1.rotationPointY = 4.2F;
  607. this.hair_left_2.rotationPointY = 4.2F;
  608. this.hair_left_3.rotationPointY = 4.2F;
  609. this.hair_left_4.rotationPointY = 4.2F;
  610. this.hair_left_5.rotationPointY = 4.2F;
  611. this.hair_left_6.rotationPointY = 4.2F;
  612. this.hair_left_7.rotationPointY = 4.2F;
  613. this.hair_left_8.rotationPointY = 4.2F;
  614. this.hair_left_9.rotationPointY = 4.2F;
  615. this.hair_left_10.rotationPointY = 4.2F;
  616. this.hair_right_6.rotationPointY = 4.2F;
  617. this.hair_right_7.rotationPointY = 4.2F;
  618. this.hair_right_8.rotationPointY = 4.2F;
  619. this.hair_right_9.rotationPointY = 4.2F;
  620. this.hair_right_10.rotationPointY = 4.2F;
  621. this.hair_right_11.rotationPointY = 4.2F;
  622. this.hair_right_12.rotationPointY = 4.2F;
  623. this.hair_right_13.rotationPointY = 4.2F;
  624. this.hair_left_12.rotationPointY = 4.2F;
  625. this.hair_left_13.rotationPointY = 4.2F;
  626. this.hair_left_14.rotationPointY = 4.2F;
  627. this.hair_left_15.rotationPointY = 4.2F;
  628. this.hair_left_16.rotationPointY = 4.2F;
  629. this.hair_right_14.rotationPointY = 4.2F;
  630. this.hair_right_15.rotationPointY = 4.2F;
  631. this.hair_right_17.rotationPointY = 4.2F;
  632. this.hair_right_18.rotationPointY = 4.2F;
  633. this.hair_right_19.rotationPointY = 4.2F;
  634. this.hair_right_20.rotationPointY = 4.2F;
  635. this.hair_right_21.rotationPointY = 4.2F;
  636. this.hair_right_22.rotationPointY = 4.2F;
  637. this.hair_left_17.rotationPointY = 4.2F;
  638. this.hair_left_18.rotationPointY = 4.2F;
  639. this.hair_left_19.rotationPointY = 4.2F;
  640. this.hair_left_20.rotationPointY = 4.2F;
  641. this.hair_left_21.rotationPointY = 4.2F;
  642. this.hair_left_22.rotationPointY = 4.2F;
  643. this.hair_left_23.rotationPointY = 4.2F;
  644. this.hair_left_24.rotationPointY = 4.2F;
  645. this.hair_left_25.rotationPointY = 4.2F;
  646. this.hair_right_23.rotationPointY = 4.2F;
  647. this.hair_left_26.rotationPointY = 4.2F;
  648. this.hair_left_27.rotationPointY = 4.2F;
  649. this.hair_left_28.rotationPointY = 4.2F;
  650. this.hair_left_29.rotationPointY = 4.2F;
  651. this.hair_left_30.rotationPointY = 4.2F;
  652. this.hair_left_31.rotationPointY = 4.2F;
  653. this.hair_left_32.rotationPointY = 4.2F;
  654. this.hair_right_24.rotationPointY = 4.2F;
  655. this.hair_right_25.rotationPointY = 4.2F;
  656. this.hair_left_33.rotationPointY = 4.2F;
  657. this.hair_left_34.rotationPointY = 4.2F;
  658. this.hair_left_35.rotationPointY = 4.2F;
  659. this.hair_left_35_1.rotationPointY = 4.2F;
  660. } else {
  661. this.head_joint.rotationPointY = 0.0F;
  662. this.bang_right_1.rotationPointY = 0.0F;
  663. this.bang_right_2.rotationPointY = 0.0F;
  664. this.bang_right_3.rotationPointY = 0.0F;
  665. this.bang_right_4.rotationPointY = 0.0F;
  666. this.bang_middle.rotationPointY = 0.0F;
  667. this.bang_left_1.rotationPointY = 0.0F;
  668. this.bang_left_2.rotationPointY = 0.0F;
  669. this.bang_left_3.rotationPointY = 0.0F;
  670. this.bang_left_4.rotationPointY = 0.0F;
  671. this.bang_left_5.rotationPointY = 0.0F;
  672. this.hair_right_1.rotationPointY = 0.0F;
  673. this.hair_right_2.rotationPointY = 0.0F;
  674. this.hair_right_3.rotationPointY = 0.0F;
  675. this.hair_right_4.rotationPointY = 0.0F;
  676. this.hair_left_1.rotationPointY = 0.0F;
  677. this.hair_left_2.rotationPointY = 0.0F;
  678. this.hair_left_3.rotationPointY = 0.0F;
  679. this.hair_left_4.rotationPointY = 0.0F;
  680. this.hair_left_5.rotationPointY = 0.0F;
  681. this.hair_left_6.rotationPointY = 0.0F;
  682. this.hair_left_7.rotationPointY = 0.0F;
  683. this.hair_left_8.rotationPointY = 0.0F;
  684. this.hair_left_9.rotationPointY = 0.0F;
  685. this.hair_left_10.rotationPointY = 0.0F;
  686. this.hair_right_6.rotationPointY = 0.0F;
  687. this.hair_right_7.rotationPointY = 0.0F;
  688. this.hair_right_8.rotationPointY = 0.0F;
  689. this.hair_right_9.rotationPointY = 0.0F;
  690. this.hair_right_10.rotationPointY = 0.0F;
  691. this.hair_right_11.rotationPointY = 0.0F;
  692. this.hair_right_12.rotationPointY = 0.0F;
  693. this.hair_right_13.rotationPointY = 0.0F;
  694. this.hair_left_12.rotationPointY = 0.0F;
  695. this.hair_left_13.rotationPointY = 0.0F;
  696. this.hair_left_14.rotationPointY = 0.0F;
  697. this.hair_left_15.rotationPointY = 0.0F;
  698. this.hair_left_16.rotationPointY = 0.0F;
  699. this.hair_right_14.rotationPointY = 0.0F;
  700. this.hair_right_15.rotationPointY = 0.0F;
  701. this.hair_right_17.rotationPointY = 0.0F;
  702. this.hair_right_18.rotationPointY = 0.0F;
  703. this.hair_right_19.rotationPointY = 0.0F;
  704. this.hair_right_20.rotationPointY = 0.0F;
  705. this.hair_right_21.rotationPointY = 0.0F;
  706. this.hair_right_22.rotationPointY = 0.0F;
  707. this.hair_left_17.rotationPointY = 0.0F;
  708. this.hair_left_18.rotationPointY = 0.0F;
  709. this.hair_left_19.rotationPointY = 0.0F;
  710. this.hair_left_20.rotationPointY = 0.0F;
  711. this.hair_left_21.rotationPointY = 0.0F;
  712. this.hair_left_22.rotationPointY = 0.0F;
  713. this.hair_left_23.rotationPointY = 0.0F;
  714. this.hair_left_24.rotationPointY = 0.0F;
  715. this.hair_left_25.rotationPointY = 0.0F;
  716. this.hair_right_23.rotationPointY = 0.0F;
  717. this.hair_left_26.rotationPointY = 0.0F;
  718. this.hair_left_27.rotationPointY = 0.0F;
  719. this.hair_left_28.rotationPointY = 0.0F;
  720. this.hair_left_29.rotationPointY = 0.0F;
  721. this.hair_left_30.rotationPointY = 0.0F;
  722. this.hair_left_31.rotationPointY = 0.0F;
  723. this.hair_left_32.rotationPointY = 0.0F;
  724. this.hair_right_24.rotationPointY = 0.0F;
  725. this.hair_right_25.rotationPointY = 0.0F;
  726. this.hair_left_33.rotationPointY = 0.0F;
  727. this.hair_left_34.rotationPointY = 0.0F;
  728. this.hair_left_35.rotationPointY = 0.0F;
  729. this.hair_left_35_1.rotationPointY = 0.0F;
  730. }
  731. }
  732. }
  733.  
  734. @Override
  735. protected Iterable<ModelRenderer> getHeadParts() {
  736. return ImmutableList.of(this.head_joint);
  737. return ImmutableList.of(this.bang_right_1);
  738. return ImmutableList.of(this.bang_right_2);
  739. return ImmutableList.of(this.bang_right_3);
  740. return ImmutableList.of(this.bang_right_4);
  741. return ImmutableList.of(this.bang_middle);
  742. return ImmutableList.of(this.bang_left_1);
  743. return ImmutableList.of(this.bang_left_2);
  744. return ImmutableList.of(this.bang_left_3);
  745. return ImmutableList.of(this.bang_left_4);
  746. return ImmutableList.of(this.bang_left_5);
  747. return ImmutableList.of(this.hair_right_1);
  748. return ImmutableList.of(this.hair_right_2);
  749. return ImmutableList.of(this.hair_right_3);
  750. return ImmutableList.of(this.hair_right_4);
  751. return ImmutableList.of(this.hair_left_1);
  752. return ImmutableList.of(this.hair_left_2);
  753. return ImmutableList.of(this.hair_left_3);
  754. return ImmutableList.of(this.hair_left_4);
  755. return ImmutableList.of(this.hair_left_5);
  756. return ImmutableList.of(this.hair_left_6);
  757. return ImmutableList.of(this.hair_left_7);
  758. return ImmutableList.of(this.hair_left_8);
  759. return ImmutableList.of(this.hair_left_9);
  760. return ImmutableList.of(this.hair_left_10);
  761. return ImmutableList.of(this.hair_right_6);
  762. return ImmutableList.of(this.hair_right_7);
  763. return ImmutableList.of(this.hair_right_8);
  764. return ImmutableList.of(this.hair_right_9);
  765. return ImmutableList.of(this.hair_right_10);
  766. return ImmutableList.of(this.hair_right_11);
  767. return ImmutableList.of(this.hair_right_12);
  768. return ImmutableList.of(this.hair_right_13);
  769. return ImmutableList.of(this.hair_left_12);
  770. return ImmutableList.of(this.hair_left_13);
  771. return ImmutableList.of(this.hair_left_14);
  772. return ImmutableList.of(this.hair_left_15);
  773. return ImmutableList.of(this.hair_left_16);
  774. return ImmutableList.of(this.hair_right_14);
  775. return ImmutableList.of(this.hair_right_15);
  776. return ImmutableList.of(this.hair_right_17);
  777. return ImmutableList.of(this.hair_right_18);
  778. return ImmutableList.of(this.hair_right_19);
  779. return ImmutableList.of(this.hair_right_20);
  780. return ImmutableList.of(this.hair_right_21);
  781. return ImmutableList.of(this.hair_right_22);
  782. return ImmutableList.of(this.hair_left_17);
  783. return ImmutableList.of(this.hair_left_18);
  784. return ImmutableList.of(this.hair_left_19);
  785. return ImmutableList.of(this.hair_left_20);
  786. return ImmutableList.of(this.hair_left_21);
  787. return ImmutableList.of(this.hair_left_22);
  788. return ImmutableList.of(this.hair_left_23);
  789. return ImmutableList.of(this.hair_left_24);
  790. return ImmutableList.of(this.hair_left_25);
  791. return ImmutableList.of(this.hair_right_23);
  792. return ImmutableList.of(this.hair_left_26);
  793. return ImmutableList.of(this.hair_left_27);
  794. return ImmutableList.of(this.hair_left_28);
  795. return ImmutableList.of(this.hair_left_29);
  796. return ImmutableList.of(this.hair_left_30);
  797. return ImmutableList.of(this.hair_left_31);
  798. return ImmutableList.of(this.hair_left_32);
  799. return ImmutableList.of(this.hair_right_24);
  800. return ImmutableList.of(this.hair_right_25);
  801. return ImmutableList.of(this.hair_left_33);
  802. return ImmutableList.of(this.hair_left_34);
  803. return ImmutableList.of(this.hair_left_35);
  804. return ImmutableList.of(this.hair_left_35_1);
  805. }
  806.  
  807. public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
  808. modelRenderer.rotateAngleX = x;
  809. modelRenderer.rotateAngleY = y;
  810. modelRenderer.rotateAngleZ = z;
  811. }
  812. }
  813. public static class playerlayer<T extends LivingEntity, M extends EntityModel<T>> extends LayerRenderer<T, M> {
  814.  
  815. private static ResourceLocation resource = new ResourceLocation("the_minecraft_anime_mod", "textures/steve.png");
  816. private player model = new player();
  817.  
  818. public playerlayer(IEntityRenderer<T, M> entityRendererIn) {
  819. super(entityRendererIn);
  820. }
  821.  
  822. @Override
  823. public void render(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) {
  824. if (entitylivingbaseIn instanceof AbstractClientPlayerEntity) {
  825. matrixStackIn.push();
  826. this.getEntityModel().copyModelAttributesTo(this.model);
  827. this.model.setRotationAngles(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch);
  828. IVertexBuilder ivertexbuilder = ItemRenderer.getBuffer(bufferIn, this.model.getRenderType(((AbstractClientPlayerEntity) entitylivingbaseIn).getLocationSkin()), false, false);
  829. this.model.render(matrixStackIn, ivertexbuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
  830. matrixStackIn.pop();
  831. }
  832.  
  833. }
  834. }
  835. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement