New Modder, Setting Rotation Angles on Custom Model - Mac

Started by AnUnusualVisitor on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
New Modder, Setting Rotation Angles on Custom Model - Mac
Sun, 02/03/2019 - 21:07 (edited)

Hi! I'm pretty new to modding - I've dabbled in code, but not much more than that.

I'm trying to create a mod in which you can ride reindeer. I created a custom model in Qubble, since I use a Mac and can't download Techne. I exported multiple versions of the model - java, JSON, and some files that turned out not to be supported by MCreator - and so far the java seems to work okay.

In terms of creating the mod itself, I applied the horse AI to it, since it would act almost exactly the same. I realize this might have had some unintended side effects, but I don't think that's the cause of this particular problem.

However, the client crashes whenever I attempt to run it. Here's the log:

/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:229: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.Tail, 0.45291295420833394F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:309: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.Neck, 0.45291295420833394F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:326: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.LAntler1, -0.39618975351851826F, -0.39618975351851826F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:331: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.LAntler2a, 0.22636920864419643F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:340: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.LAntler3c, -0.28309239268925535F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:345: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.LAntler3a, 0.5660102817480832F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:354: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.LAntler2b, 0.0F, 0.39618975351851826F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:359: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.RAntler1, -0.39618975351851826F, 0.39618975351851826F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:364: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.RAntler2a, 0.22636920864419643F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:373: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.RAntler3c, -0.28309239268925535F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:378: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.RAntler3a, 0.5660102817480832F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:387: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.RAntler2b, 0.0F, -0.39618975351851826F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:392: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.LEar, 0.19809487675925913F, -1.8963002589234499F, 1.6132078329446808F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:397: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.REar, 0.05654866793106384F, 1.6414822147638888F, -1.6414822147638888F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
/Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java:402: error: no suitable method found for setRotationAngles(ModelRenderer,float,float,float)
			this.setRotationAngles(this.NeckFur, -1.5566592024643198F, 0.0F, 0.0F);
			    ^
    method ModelBase.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
    method Modelmodel_reindeer.setRotationAngles(float,float,float,float,float,float,Entity) is not applicable
      (actual and formal argument lists differ in length)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/carita/Desktop/Games/MCreator 1.8.2 [1.12.2] Mac-Linux 32-64bit/forge/build/sources/main/java/mod/mcreator/mcreator_reindeer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
15 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s

When I've looked up solutions for this error or similar ones, other posts indicate that they solved the problem by importing rotation data through copying code from a vanilla block (or switching to Techne which, again, cannot do). I copied some code from the Railway code, but it doesn't seem to have helped.

Here's my code for the Reindeer:

package mod.mcreator;

import org.lwjgl.opengl.GL11;

import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.client.registry.RenderingRegistry;

import net.minecraft.util.Rotation;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.World;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.DamageSource;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.init.Items;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIPanic;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.Entity;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.Minecraft;

public class mcreator_reindeer extends reindeerride.ModElement {

	public static int mobid = 3;
	public static int mobid2 = 4;

	@Override
	public void preInit(FMLPreInitializationEvent event) {
		EntityRegistry.registerModEntity(new ResourceLocation("reindeerride:reindeer"), Entityreindeer.class, "reindeer", mobid, instance, 64, 1,
				true, -13421824, -3881810);
		Biome[] spawnBiomes = {Biome.REGISTRY.getObject(new ResourceLocation("frozen_ocean")),
				Biome.REGISTRY.getObject(new ResourceLocation("frozen_river")), Biome.REGISTRY.getObject(new ResourceLocation("ice_flats")),
				Biome.REGISTRY.getObject(new ResourceLocation("ice_mountains")), Biome.REGISTRY.getObject(new ResourceLocation("taiga_cold")),
				Biome.REGISTRY.getObject(new ResourceLocation("taiga_cold_hills")),
				Biome.REGISTRY.getObject(new ResourceLocation("mutated_taiga_cold")),};
		EntityRegistry.addSpawn(Entityreindeer.class, 20, 2, 10, EnumCreatureType.CREATURE, spawnBiomes);
	}

	@Override
	public void registerRenderers() {
		RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new Modelmodel_reindeer(), 0) {

			protected ResourceLocation getEntityTexture(Entity par1Entity) {
				return new ResourceLocation("model_reindeerskin.png");
			}
		};
		RenderingRegistry.registerEntityRenderingHandler(Entityreindeer.class, customRender);
	}

	public static class Entityreindeer extends EntityAnimal {

		public Entityreindeer(World world) {
			super(world);
			setSize(0.6f, 1.8f);
			experienceValue = 5;
			this.isImmuneToFire = false;
			setNoAI(!true);
			this.tasks.addTask(1, new EntityAIWander(this, 1));
			this.tasks.addTask(2, new EntityAILookIdle(this));
			this.tasks.addTask(3, new EntityAISwimming(this));
			this.tasks.addTask(4, new EntityAILeapAtTarget(this, (float) 0.8));
			this.tasks.addTask(5, new EntityAIPanic(this, 1.2));
			this.targetTasks.addTask(6, new EntityAIHurtByTarget(this, false));
			this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
		}

		@Override
		public EnumCreatureAttribute getCreatureAttribute() {
			return EnumCreatureAttribute.UNDEFINED;
		}

		@Override
		protected Item getDropItem() {
			return null;
		}

		@Override
		public net.minecraft.util.SoundEvent getAmbientSound() {
			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.horse.breathe"));
		}

		@Override
		public net.minecraft.util.SoundEvent getHurtSound(DamageSource ds) {
			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.horse.hurt"));
		}

		@Override
		public net.minecraft.util.SoundEvent getDeathSound() {
			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.horse.death"));
		}

		@Override
		protected float getSoundVolume() {
			return 1.0F;
		}

		@Override
		public Entityreindeer createChild(EntityAgeable ageable) {
			return new Entityreindeer(world);
		}

		@Override
		public float getEyeHeight() {
			return this.isChild() ? this.height : 1.3F;
		}

		@Override
		public boolean isBreedingItem(ItemStack stack) {
			if (stack == null)
				return false;
			if (new ItemStack(Items.GOLDEN_APPLE, (int) (1)).getItem() == stack.getItem())
				return true;
			return false;
		}

		@Override
		public void travel(float ti, float tj, float tk) {
			Entity entity = this.getPassengers().isEmpty() ? null : (Entity) this.getPassengers().get(0);
			if (this.isBeingRidden() && this.canBeSteered()) {
				this.rotationYaw = entity.rotationYaw;
				this.prevRotationYaw = this.rotationYaw;
				this.rotationPitch = entity.rotationPitch * 0.5F;
				this.setRotation(this.rotationYaw, this.rotationPitch);
				this.renderYawOffset = this.rotationYaw;
				this.rotationYawHead = this.rotationYaw;
				this.stepHeight = 1.0F;
				this.jumpMovementFactor = this.getAIMoveSpeed() * 0.1F;
				if (this.canPassengerSteer()) {
					float f = (float) this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue() * 0.225F;
					this.setAIMoveSpeed(f);
					super.travel(0.0F, 0.0F, 1.0F);
				} else {
					this.motionX = 0.0D;
					this.motionY = 0.0D;
					this.motionZ = 0.0D;
				}
				this.prevLimbSwingAmount = this.limbSwingAmount;
				double d1 = this.posX - this.prevPosX;
				double d0 = this.posZ - this.prevPosZ;
				float f1 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;
				if (f1 > 1.0F)
					f1 = 1.0F;
				this.limbSwingAmount += (f1 - this.limbSwingAmount) * 0.4F;
				this.limbSwing += this.limbSwingAmount;
			} else {
				this.stepHeight = 0.5F;
				this.jumpMovementFactor = 0.02F;
				super.travel(ti, tj, tk);
			}
		}
	}

	/**
	 * model_reindeer by Unknown
	 */
	@SideOnly(Side.CLIENT)
	public static class Modelmodel_reindeer extends ModelBase {

		public ModelRenderer body;
		public ModelRenderer Tail;
		public ModelRenderer fLeg_left1;
		public ModelRenderer fLeg_left2;
		public ModelRenderer fLeg_left3;
		public ModelRenderer fLeg_left4a;
		public ModelRenderer fLeg_left4b;
		public ModelRenderer fLeg_right1;
		public ModelRenderer fLeg_right2;
		public ModelRenderer fLeg_right3;
		public ModelRenderer fLeg_right4a;
		public ModelRenderer fLeg_right4b;
		public ModelRenderer bLeg_right1;
		public ModelRenderer bLeg_right2;
		public ModelRenderer bLeg_right3;
		public ModelRenderer bLeg_right4a;
		public ModelRenderer bLeg_right4b;
		public ModelRenderer bLeg_left1;
		public ModelRenderer bLeg_left2;
		public ModelRenderer bLeg_left3;
		public ModelRenderer bLeg_left4a;
		public ModelRenderer bLeg_left4b;
		public ModelRenderer Neck;
		public ModelRenderer Head;
		public ModelRenderer Snout1;
		public ModelRenderer Snout2;
		public ModelRenderer LAntler1;
		public ModelRenderer LAntler2a;
		public ModelRenderer LAntler3b;
		public ModelRenderer LAntler3c;
		public ModelRenderer LAntler3a;
		public ModelRenderer LAntler3d;
		public ModelRenderer LAntler2b;
		public ModelRenderer RAntler1;
		public ModelRenderer RAntler2a;
		public ModelRenderer RAntler3b;
		public ModelRenderer RAntler3c;
		public ModelRenderer RAntler3a;
		public ModelRenderer RAntler3d;
		public ModelRenderer RAntler2b;
		public ModelRenderer LEar;
		public ModelRenderer REar;
		public ModelRenderer NeckFur;

		public Modelmodel_reindeer() {
			this.textureWidth = 96;
			this.textureHeight = 96;
			this.body = new ModelRenderer(this, 28, 63);
			this.body.setRotationPoint(0.0F, 0.0F, 0.0F);
			this.body.addBox(0.0F, 0.0F, 0.0F, 10, 9, 24);
			this.Tail = new ModelRenderer(this, 81, 36);
			this.Tail.setRotationPoint(3.5F, 0.0F, 22.5F);
			this.Tail.addBox(0.0F, 0.0F, 0.0F, 3, 2, 3);
			this.setRotationAngles(this.Tail, 0.45291295420833394F, 0.0F, 0.0F);
			this.fLeg_left1 = new ModelRenderer(this, 0, 84);
			this.fLeg_left1.setRotationPoint(0.0F, 4.0F, 0.0F);
			this.fLeg_left1.addBox(0.0F, 0.0F, 0.0F, 3, 8, 4);
			this.fLeg_left2 = new ModelRenderer(this, 0, 76);
			this.fLeg_left2.setRotationPoint(0.0F, 8.0F, 0.5F);
			this.fLeg_left2.addBox(0.0F, 0.0F, 0.0F, 3, 5, 3);
			this.fLeg_left1.addChild(this.fLeg_left2);
			this.fLeg_left3 = new ModelRenderer(this, 0, 69);
			this.fLeg_left3.setRotationPoint(-0.5F, 5.0F, -0.5F);
			this.fLeg_left3.addBox(0.0F, 0.0F, 0.0F, 4, 3, 4);
			this.fLeg_left2.addChild(this.fLeg_left3);
			this.fLeg_left4a = new ModelRenderer(this, 0, 63);
			this.fLeg_left4a.setRotationPoint(0.0F, 1.0F, -1.1F);
			this.fLeg_left4a.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.fLeg_left3.addChild(this.fLeg_left4a);
			this.fLeg_left4b = new ModelRenderer(this, 17, 57);
			this.fLeg_left4b.setRotationPoint(3.0F, 1.0F, -1.1F);
			this.fLeg_left4b.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.fLeg_left3.addChild(this.fLeg_left4b);
			this.fLeg_right1 = new ModelRenderer(this, 14, 84);
			this.fLeg_right1.setRotationPoint(7.0F, 4.0F, 0.0F);
			this.fLeg_right1.addBox(0.0F, 0.0F, 0.0F, 3, 8, 4);
			this.fLeg_right2 = new ModelRenderer(this, 16, 76);
			this.fLeg_right2.setRotationPoint(0.0F, 8.0F, 0.5F);
			this.fLeg_right2.addBox(0.0F, 0.0F, 0.0F, 3, 5, 3);
			this.fLeg_right1.addChild(this.fLeg_right2);
			this.fLeg_right3 = new ModelRenderer(this, 16, 69);
			this.fLeg_right3.setRotationPoint(-0.5F, 5.0F, -0.5F);
			this.fLeg_right3.addBox(0.0F, 0.0F, 0.0F, 4, 3, 4);
			this.fLeg_right2.addChild(this.fLeg_right3);
			this.fLeg_right4a = new ModelRenderer(this, 17, 63);
			this.fLeg_right4a.setRotationPoint(0.0F, 1.0F, -1.1F);
			this.fLeg_right4a.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.fLeg_right3.addChild(this.fLeg_right4a);
			this.fLeg_right4b = new ModelRenderer(this, 0, 57);
			this.fLeg_right4b.setRotationPoint(3.0F, 1.0F, -1.1F);
			this.fLeg_right4b.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.fLeg_right3.addChild(this.fLeg_right4b);
			this.bLeg_right1 = new ModelRenderer(this, 78, 73);
			this.bLeg_right1.setRotationPoint(6.5F, 3.0F, 18.5F);
			this.bLeg_right1.addBox(0.0F, 0.0F, 0.0F, 4, 9, 5);
			this.bLeg_right2 = new ModelRenderer(this, 84, 65);
			this.bLeg_right2.setRotationPoint(0.7F, 9.0F, 1.0F);
			this.bLeg_right2.addBox(0.0F, 0.0F, 0.0F, 3, 5, 3);
			this.bLeg_right1.addChild(this.bLeg_right2);
			this.bLeg_right3 = new ModelRenderer(this, 80, 53);
			this.bLeg_right3.setRotationPoint(-0.5F, 5.0F, -0.5F);
			this.bLeg_right3.addBox(0.0F, 0.0F, 0.0F, 4, 3, 4);
			this.bLeg_right2.addChild(this.bLeg_right3);
			this.bLeg_right4a = new ModelRenderer(this, 83, 41);
			this.bLeg_right4a.setRotationPoint(0.0F, 1.0F, -1.1F);
			this.bLeg_right4a.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.bLeg_right3.addChild(this.bLeg_right4a);
			this.bLeg_right4b = new ModelRenderer(this, 83, 47);
			this.bLeg_right4b.setRotationPoint(3.0F, 1.0F, -1.1F);
			this.bLeg_right4b.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.bLeg_right3.addChild(this.bLeg_right4b);
			this.bLeg_left1 = new ModelRenderer(this, 28, 73);
			this.bLeg_left1.setRotationPoint(-0.5F, 3.0F, 18.5F);
			this.bLeg_left1.addBox(0.0F, 0.0F, 0.0F, 4, 9, 5);
			this.bLeg_left2 = new ModelRenderer(this, 28, 65);
			this.bLeg_left2.setRotationPoint(0.7F, 9.0F, 1.0F);
			this.bLeg_left2.addBox(0.0F, 0.0F, 0.0F, 3, 5, 3);
			this.bLeg_left1.addChild(this.bLeg_left2);
			this.bLeg_left3 = new ModelRenderer(this, 27, 58);
			this.bLeg_left3.setRotationPoint(-0.5F, 5.0F, -0.5F);
			this.bLeg_left3.addBox(0.0F, 0.0F, 0.0F, 4, 3, 4);
			this.bLeg_left2.addChild(this.bLeg_left3);
			this.bLeg_left4a = new ModelRenderer(this, 30, 52);
			this.bLeg_left4a.setRotationPoint(0.0F, 1.0F, -1.1F);
			this.bLeg_left4a.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.bLeg_left3.addChild(this.bLeg_left4a);
			this.bLeg_left4b = new ModelRenderer(this, 30, 46);
			this.bLeg_left4b.setRotationPoint(3.0F, 1.0F, -1.1F);
			this.bLeg_left4b.addBox(0.0F, 0.0F, 0.0F, 1, 2, 4);
			this.bLeg_left3.addChild(this.bLeg_left4b);
			this.Neck = new ModelRenderer(this, 53, 46);
			this.Neck.setRotationPoint(3.0F, -3.9F, -3.5F);
			this.Neck.addBox(0.0F, 0.0F, 0.0F, 4, 12, 5);
			this.setRotationAngles(this.Neck, 0.45291295420833394F, 0.0F, 0.0F);
			this.Head = new ModelRenderer(this, 49, 15);
			this.Head.setRotationPoint(-1.0F, -6.0F, -1.0F);
			this.Head.addBox(0.0F, 0.0F, 0.0F, 6, 6, 7);
			this.Head.mirror = true;
			this.Neck.addChild(this.Head);
			this.Snout1 = new ModelRenderer(this, 53, 7);
			this.Snout1.setRotationPoint(1.0F, 0.5F, -5.0F);
			this.Snout1.addBox(0.0F, 0.0F, 0.0F, 4, 3, 5);
			this.Head.addChild(this.Snout1);
			this.Snout2 = new ModelRenderer(this, 53, 1);
			this.Snout2.setRotationPoint(1.0F, 3.6F, -4.5F);
			this.Snout2.addBox(0.0F, 0.0F, 0.0F, 4, 1, 5);
			this.Head.addChild(this.Snout2);
			this.LAntler1 = new ModelRenderer(this, 47, 80);
			this.LAntler1.setRotationPoint(0.5F, -5.5F, 6.5F);
			this.LAntler1.addBox(0.0F, 0.0F, 0.0F, 1, 6, 1);
			this.setRotationAngles(this.LAntler1, -0.39618975351851826F, -0.39618975351851826F, 0.0F);
			this.Head.addChild(this.LAntler1);
			this.LAntler2a = new ModelRenderer(this, 46, 72);
			this.LAntler2a.setRotationPoint(0.0F, -3.5F, -1.1F);
			this.LAntler2a.addBox(0.0F, 0.0F, 0.0F, 1, 6, 2);
			this.setRotationAngles(this.LAntler2a, 0.22636920864419643F, 0.0F, 0.0F);
			this.LAntler1.addChild(this.LAntler2a);
			this.LAntler3b = new ModelRenderer(this, 43, 58);
			this.LAntler3b.setRotationPoint(0.0F, 2.5F, 0.0F);
			this.LAntler3b.addBox(0.0F, 0.0F, 0.0F, 1, 1, 4);
			this.LAntler2a.addChild(this.LAntler3b);
			this.LAntler3c = new ModelRenderer(this, 45, 54);
			this.LAntler3c.setRotationPoint(0.0F, 4.5F, 0.5F);
			this.LAntler3c.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3);
			this.setRotationAngles(this.LAntler3c, -0.28309239268925535F, 0.0F, 0.0F);
			this.LAntler2a.addChild(this.LAntler3c);
			this.LAntler3a = new ModelRenderer(this, 42, 63);
			this.LAntler3a.setRotationPoint(0.0F, 1.2F, 0.0F);
			this.LAntler3a.addBox(0.0F, 0.0F, 0.0F, 1, 1, 4);
			this.setRotationAngles(this.LAntler3a, 0.5660102817480832F, 0.0F, 0.0F);
			this.LAntler2a.addChild(this.LAntler3a);
			this.LAntler3d = new ModelRenderer(this, 73, 50);
			this.LAntler3d.setRotationPoint(0.0F, -2.0F, 0.0F);
			this.LAntler3d.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1);
			this.LAntler2a.addChild(this.LAntler3d);
			this.LAntler2b = new ModelRenderer(this, 44, 68);
			this.LAntler2b.setRotationPoint(-0.9F, 5.0F, -2.0F);
			this.LAntler2b.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3);
			this.setRotationAngles(this.LAntler2b, 0.0F, 0.39618975351851826F, 0.0F);
			this.LAntler1.addChild(this.LAntler2b);
			this.RAntler1 = new ModelRenderer(this, 73, 80);
			this.RAntler1.setRotationPoint(4.5F, -5.5F, 6.5F);
			this.RAntler1.addBox(0.0F, 0.0F, 0.0F, 1, 6, 1);
			this.setRotationAngles(this.RAntler1, -0.39618975351851826F, 0.39618975351851826F, 0.0F);
			this.Head.addChild(this.RAntler1);
			this.RAntler2a = new ModelRenderer(this, 72, 72);
			this.RAntler2a.setRotationPoint(0.0F, -3.5F, -1.1F);
			this.RAntler2a.addBox(0.0F, 0.0F, 0.0F, 1, 6, 2);
			this.setRotationAngles(this.RAntler2a, 0.22636920864419643F, 0.0F, 0.0F);
			this.RAntler1.addChild(this.RAntler2a);
			this.RAntler3b = new ModelRenderer(this, 71, 58);
			this.RAntler3b.setRotationPoint(0.0F, 2.5F, 0.0F);
			this.RAntler3b.addBox(0.0F, 0.0F, 0.0F, 1, 1, 4);
			this.RAntler2a.addChild(this.RAntler3b);
			this.RAntler3c = new ModelRenderer(this, 71, 54);
			this.RAntler3c.setRotationPoint(0.0F, 4.5F, 0.5F);
			this.RAntler3c.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3);
			this.setRotationAngles(this.RAntler3c, -0.28309239268925535F, 0.0F, 0.0F);
			this.RAntler2a.addChild(this.RAntler3c);
			this.RAntler3a = new ModelRenderer(this, 72, 63);
			this.RAntler3a.setRotationPoint(0.0F, 1.2F, 0.0F);
			this.RAntler3a.addBox(0.0F, 0.0F, 0.0F, 1, 1, 4);
			this.setRotationAngles(this.RAntler3a, 0.5660102817480832F, 0.0F, 0.0F);
			this.RAntler2a.addChild(this.RAntler3a);
			this.RAntler3d = new ModelRenderer(this, 47, 50);
			this.RAntler3d.setRotationPoint(0.0F, -2.0F, 0.0F);
			this.RAntler3d.addBox(0.0F, 0.0F, 0.0F, 1, 3, 1);
			this.RAntler2a.addChild(this.RAntler3d);
			this.RAntler2b = new ModelRenderer(this, 72, 68);
			this.RAntler2b.setRotationPoint(0.9F, 5.0F, -2.0F);
			this.RAntler2b.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3);
			this.setRotationAngles(this.RAntler2b, 0.0F, -0.39618975351851826F, 0.0F);
			this.RAntler1.addChild(this.RAntler2b);
			this.LEar = new ModelRenderer(this, 49, 18);
			this.LEar.setRotationPoint(0.0F, 1.5F, 5.0F);
			this.LEar.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1);
			this.setRotationAngles(this.LEar, 0.19809487675925913F, -1.8963002589234499F, 1.6132078329446808F);
			this.Head.addChild(this.LEar);
			this.REar = new ModelRenderer(this, 69, 18);
			this.REar.setRotationPoint(5.5F, 0.9F, 6.5F);
			this.REar.addBox(0.0F, 0.0F, 0.0F, 2, 3, 1);
			this.setRotationAngles(this.REar, 0.05654866793106384F, 1.6414822147638888F, -1.6414822147638888F);
			this.Head.addChild(this.REar);
			this.NeckFur = new ModelRenderer(this, 45, 28);
			this.NeckFur.setRotationPoint(0.0F, 0.0F, 0.0F);
			this.NeckFur.addBox(0.0F, 0.0F, 0.0F, 4, 5, 13);
			this.setRotationAngles(this.NeckFur, -1.5566592024643198F, 0.0F, 0.0F);
			this.Neck.addChild(this.NeckFur);
		}

		@Override
		public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float rotationYaw, float rotationPitch,
				float scale) {
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.body.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.pushMatrix();
			GlStateManager.translate(this.Tail.offsetX, this.Tail.offsetY, this.Tail.offsetZ);
			GlStateManager.translate(this.Tail.rotationPointX * scale, this.Tail.rotationPointY * scale, this.Tail.rotationPointZ * scale);
			GlStateManager.scale(1.0F, 1.0F, 1.0F);
			GlStateManager.translate(-this.Tail.offsetX, -this.Tail.offsetY, -this.Tail.offsetZ);
			GlStateManager.translate(-this.Tail.rotationPointX * scale, -this.Tail.rotationPointY * scale, -this.Tail.rotationPointZ * scale);
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.Tail.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.popMatrix();
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.fLeg_left1.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.fLeg_right1.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.bLeg_right1.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.bLeg_left1.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.pushMatrix();
			GlStateManager.translate(this.Neck.offsetX, this.Neck.offsetY, this.Neck.offsetZ);
			GlStateManager.translate(this.Neck.rotationPointX * scale, this.Neck.rotationPointY * scale, this.Neck.rotationPointZ * scale);
			GlStateManager.scale(1.0F, 1.0F, 1.0F);
			GlStateManager.translate(-this.Neck.offsetX, -this.Neck.offsetY, -this.Neck.offsetZ);
			GlStateManager.translate(-this.Neck.rotationPointX * scale, -this.Neck.rotationPointY * scale, -this.Neck.rotationPointZ * scale);
			GlStateManager.enableBlend();
			GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
			GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
			this.Neck.render(scale);
			GlStateManager.disableBlend();
			GlStateManager.popMatrix();
		}

		public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) {
			super.setRotationAngles(f, f1, f2, f3, f4, f5, e);
			this.Neck.rotateAngleY = f3 / (180F / (float) Math.PI);
			this.Neck.rotateAngleX = f4 / (180F / (float) Math.PI);
			this.bLeg_left1.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;
			this.bLeg_right1.rotateAngleX = MathHelper.cos(f * 1.0F) * 1.0F * f1;
			this.fLeg_right1.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F;
			this.fLeg_left1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
		}
	}
}

In an attempt to fix the problem, I unparented all the limbs from the body, which I have a feeling I'm not supposed to do.

What's the problem here, and how can I fix it? In addition, is there anything here that might pose a problem later on?

Keep in mind that I'm an inexperienced coder, so you may have to simplify a bit so that I can understand.

Thanks!

Edited by AnUnusualVisitor on Sun, 02/03/2019 - 21:07
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately, it seems the…
Sun, 02/03/2019 - 21:06

Unfortunately, it seems the link in the description of the video isn't viable anymore. I also didn't see anything specifically about rotation... :/ :/ :/