Jump to content

[1.7.2] Entity Mob Part Help[Partly Solved]


Heltrato

Recommended Posts

Hello Guys is there a way that makes only a specific mob to be broken part sorry for bad english .

 

This is how it works when my mob gets his health lower than 1500 the tail model part will be hidden.

It works but when i spawn many of my custom mob and one of my mob achieves the condition all of them tail will be hidden.

And how do i even set my tail wont spawn anymore if the condition changes

Heres my code

 

 

EntityCode

Here's what i did inside my entity code


public boolean showTail() {
	if(this.getMaxHealth() < 1500) {
		return false;
	}return true;
}



 

Link to comment
Share on other sites

sorry mate i dint looks like my post is little mess but yeah here it is

 

there :)

 

Entity

public boolean showTail() {
	if(this.getHealth() < 1500) {
		return false;
	}return true;
}

 

 

I cut all the other stuff since its way to many but


  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5){
animator.update((iMHFC)entity);
setAngles();
EntityTigrex tigrex = (EntityTigrex)entity;
animTick = MHFCMain.proxy.getPartialTick();
animate((EntityTigrex)entity,f,f1,f2,f3,f4,f5);
    Body.render(f5);
    boolean flag = tigrex.showTail();
    Tail.showModel = flag; <--- Heres my cut part
    
    
    
  }



Link to comment
Share on other sites

Ok ok im a messy coder ok so please dont be :)

I just need to find out how to specify the mob so the only mob i hit and match its conditions will be cut the tail

 

EntityTigrex.class

 

 

 

package mhfc.net.common.entity.mob;

import mhfc.net.MHFCMain;
import mhfc.net.client.model.mob.ModelTigrex;
import mhfc.net.common.ai.AITigrexAttack;
import mhfc.net.common.ai.AITigrexBite;
import mhfc.net.common.ai.AITigrexSpin;
import mhfc.net.common.ai.AITigrexThrow;
import mhfc.net.common.ai.AIWyvernAttackOnCollide;
import mhfc.net.common.core.registry.MHFCRegItem;
import mhfc.net.common.entity.type.EntityWyvern;
import mhfc.net.common.implement.iMHFC;
import mhfc.net.common.network.packet.PacketAITigrex;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;

public class EntityTigrex extends EntityWyvern implements iMHFC{

public int currentAttackID;
public int animTick;
public int deathTick;
public int rageLevel;
public int hungerLevel;
public int randMove;



public EntityTigrex(World par1World) {
	super(par1World);
	animTick = 0;
	width = 6F;
	height = 4F;
	getNavigator().setBreakDoors(true);
	getNavigator().setAvoidsWater(true);
	tasks.addTask(0, new EntityAISwimming(this));
	tasks.addTask(0, (new AITigrexAttack(this, 0.7f)));
	tasks.addTask(1, (new AITigrexBite(this)));
	tasks.addTask(1, (new AITigrexThrow(this)));
	tasks.addTask(1, (new AITigrexSpin(this)));
	tasks.addTask(3, (new EntityAIAttackOnCollide(this, 1.0D, false)));
	tasks.addTask(4, (new EntityAIWander(this, 0.8F)));
	targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityHorse.class, 0, true));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
	targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 0, true));
//	tasks.addTask(1, (new AITigrexLeap(this)));// <-- Reworking for more combo
	tasks.addTask(2, (new AIWyvernAttackOnCollide(this, EntityPlayer.class, 1f, false)).setMaxAttackTick(0));
 	tasks.addTask(2, (new AIWyvernAttackOnCollide(this, 1f, true)).setMaxAttackTick(0));





}


public int maxHealth(){
	return 4500;
}


public void onLivingUpdate(){
	super.onLivingUpdate();
	if (this.rand.nextInt(200) == 0)
        {
            this.getRandMove();
        }
	/*if(this.dimension != 0){
		this.setDead();
	}*/
}

public boolean showTail() {
	if(this.getMaxHealth() < 1500) {
		return false;
	}return true;
}



public void onUpdate()	{
	super.onUpdate();
	if(currentAttackID != 0)animTick++;
}


public double maxSpeed(){
	return 0.3D;
}

public double maxRange(){
	return 35D;
}

private void getRandMove() {
	randMove = 1;
}

public void applyEntityAttributes(){
	super.applyEntityAttributes();

	getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(1.5F);
	getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxHealth());
	getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(maxRange());
        getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(maxSpeed());
}




public void entityInit(){
   	 	super.entityInit();
   	 	dataWatcher.addObject(16, Byte.valueOf((byte)0));
   	 	dataWatcher.addObject(17, Byte.valueOf((byte)0));
}

 public void setThrownBlock(boolean flag){
	dataWatcher.updateObject(16, Byte.valueOf((byte)(flag ? 1 : 0)));
     }
     
     public boolean getThrownBlock(){
    	return dataWatcher.getWatchableObjectByte(16) == 1;
     }

protected boolean isAIEnabled(){
	return true;
}

public int getTotalArmorValue(){
	return 7;
}

private void dropItemRand(Item index, int par1){
	EntityItem var3 = new EntityItem(this.worldObj, posX + worldObj.rand.nextInt(5) - worldObj.rand.nextInt(5), posY + 1.0D, this.posZ + worldObj.rand.nextInt(5) - worldObj.rand.nextInt(5), new ItemStack(index, par1, 0));
    worldObj.spawnEntityInWorld(var3);
}
    
protected void dropFewItems(boolean par1, int par2)
    {
        int var4, i;
        for( var4 = 0; var4< 13; ++var4)
        {
        	dropItemRand(MHFCRegItem.MHFCItemTigrexScale, 2);
        }
        for (var4 = 0; var4 < 8; ++var4){
            dropItemRand(MHFCRegItem.MHFCItemTigrexShell, 1);
            dropItemRand(MHFCRegItem.mhfcitemtigrexfang, 1);
            dropItemRand(MHFCRegItem.mhfcitemtigrexclaw, 1);
        }
        for (var4 = 0; var4 < 1; ++var4){
            dropItemRand(MHFCRegItem.mhfcitemtigrextail, 2);
        }dropItemRand(MHFCRegItem.mhfcitemtigrexskullshell, 1);
    
    }


protected void fall(float f1){
}

protected String getLivingSound(){
	return "mhfc:tigrex.say";
}

protected String getHurtSound(){
	return null;
}
public int getMaxSpawnedInChunk(){
	return 1;
}
protected boolean canDespawn(){
	return false;
}

protected String getDeathSound(){
	return null;
}

public boolean attackEntityFrom(DamageSource source, float f){
     float dmg = f;
     Entity entity = source.getEntity();
    	 return super.attackEntityFrom(source, dmg);
     }

public void attackEntityAtDistSq(EntityLivingBase living, float f){
        if(!worldObj.isRemote)
  	{
        if(currentAttackID == 0 && onGround && rand.nextInt(20) == 0){
        	sendAttackPacket(1);
    	}
        if(currentAttackID == 0 && f < 1.0F && rand.nextInt(100) == 0){
        	sendAttackPacket(3);
        }
        
      }
    }

public boolean attackEntityAsMob(Entity entity){
    if(!worldObj.isRemote)
     {
    	
    	if(currentAttackID == 0 && rand.nextInt(4) == 0){
    		sendAttackPacket(3);
            }
    	if(currentAttackID == 0 && onGround){
    		sendAttackPacket(1);
        }
     }
    return true;
}

public void sendAttackPacket(int id){
	if (MHFCMain.isEffectiveClient()) return;
	this.currentAttackID = id;
	MHFCMain.packetPipeline.sendToAll(new PacketAITigrex((byte) id, this));
    }

public void setAnimID(int id){
	currentAttackID = id;
}

public void setAnimTick(int tick){
	animTick = tick;

}


public int getAnimID(){
	return currentAttackID;
}

public int getAnimTick(){
	return animTick;
}

/**
     * (abstract) Protected helper method to write subclass entity data to NBT.
     */
    public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
    {
        super.writeEntityToNBT(par1NBTTagCompound);
        par1NBTTagCompound.setShort("hunger", (short)hungerLevel);
    }

    /**
     * (abstract) Protected helper method to read subclass entity data from NBT.
     */
    public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
    {
        super.readEntityFromNBT(par1NBTTagCompound);
        this.hungerLevel = par1NBTTagCompound.getShort("hunger");
    }
    




}


 

This is the model

package mhfc.net.client.model.mob;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mhfc.net.MHFCMain;
import mhfc.net.client.model.MHFCAnimator;
import mhfc.net.common.entity.mob.EntityTigrex;
import mhfc.net.common.implement.iMHFC;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;

@SideOnly(Side.CLIENT)
public class ModelTigrex extends ModelBase
{
protected float animTick;
public static final float PI = 3.141593F;
private MHFCAnimator animator;
    ModelRenderer LFrontMiddleFinger;
    ModelRenderer LFrontMiddleNail;
    ModelRenderer LFrontRightNail;
    ModelRenderer LFrontLeftNail;
    ModelRenderer LeftShoulder;
    ModelRenderer Body;
    ModelRenderer LFrontWingFlap;
    ModelRenderer LFrontWingBone;
    ModelRenderer Chest;
    ModelRenderer Neck;
    ModelRenderer Head;
    ModelRenderer Nose;
    ModelRenderer Face;
    ModelRenderer Mouth;
    ModelRenderer Stomach;
    ModelRenderer Waist;
    ModelRenderer LeftHint;
    ModelRenderer RightHint;
    ModelRenderer RUpperFrontCanine;
    ModelRenderer UpperFrontTeeth;
    ModelRenderer LUpperFrontCanine;
    ModelRenderer UpperRightTeeth;
    ModelRenderer UpperLeftTeeth;
    ModelRenderer LUpperBackCanine;
    ModelRenderer LeftLeg;
    ModelRenderer RightLeg;
    ModelRenderer Tail;
    ModelRenderer TailStun;
    ModelRenderer TailEnd;
    ModelRenderer MiddleTailSpike;
    ModelRenderer LBackSoleFoot;
    ModelRenderer RBackSoleFoot;
    ModelRenderer RightTailSpikeB;
    ModelRenderer LeftTailSpikeB;
    ModelRenderer RightLowerTeeth;
    ModelRenderer LeftLowerTeeth;
    ModelRenderer LowerTeeth;
    ModelRenderer LBackRightFinger;
    ModelRenderer LBackMiddleFinger;
    ModelRenderer LBackLeftFinger;
    ModelRenderer RBackRightFinger;
    ModelRenderer RBackMiddleFinger;
    ModelRenderer RBackLeftFinger;
    ModelRenderer RBackMiddleNail;
    ModelRenderer RBackLeftNail;
    ModelRenderer RBackRightNail;
    ModelRenderer LBackRightNail;
    ModelRenderer LBackLeftNail;
    ModelRenderer LBackMiddleNail;
    ModelRenderer RUpperBackCanine;
    ModelRenderer RightShoulder;
    ModelRenderer RFrontMiddleFinger;
    ModelRenderer RFrontMiddleNail;
    ModelRenderer RFrontRightNail;
    ModelRenderer RFrontLeftNail;
    ModelRenderer RFrontWingBone;
    ModelRenderer RFrontWingFlap;
    ModelRenderer RLowerFrontCanine;
    ModelRenderer LLowerFrontCanine;
    ModelRenderer LeftTailSpikeA;
    ModelRenderer RightTailSpikeA;
    ModelRenderer LeftEar;
    ModelRenderer RightEar;
    ModelRenderer LFrontFoot;
    ModelRenderer LFrontLeftFinger;
    ModelRenderer LFrontRightFinger;
    ModelRenderer LFrontSoleFeet;
    ModelRenderer LFrontLowerLeg;
    ModelRenderer LFrontLeg;
    ModelRenderer RFrontLeg;
    ModelRenderer RFrontLowerLeg;
    ModelRenderer RFrontFoot;
    ModelRenderer RFrontSoleFeet;
    ModelRenderer RFrontRightFinger;
    ModelRenderer RFrontLeftFinger;
  
  public ModelTigrex()
  {
  animator = new MHFCAnimator(this);
      textureWidth = 256;
      textureHeight = 256;
      animTick = 0.0F;
      LFrontMiddleFinger = new ModelRenderer(this, 102, 105);
      LFrontMiddleFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      LFrontMiddleFinger.setRotationPoint(0F, 2F, -5F);
      LFrontMiddleFinger.setTextureSize(256, 256);
      LFrontMiddleFinger.mirror = true;
      setRotation(LFrontMiddleFinger, 0F, 0F, 0F);
      LFrontMiddleNail = new ModelRenderer(this, 88, 113);
      LFrontMiddleNail.addBox(-0.5F, -1F, -2F, 1, 2, 3);
      LFrontMiddleNail.setRotationPoint(0F, 0F, -5F);
      LFrontMiddleNail.setTextureSize(256, 256);
      LFrontMiddleNail.mirror = true;
      setRotation(LFrontMiddleNail, 0F, 0F, 0F);
      LFrontRightNail = new ModelRenderer(this, 88, 113);
      LFrontRightNail.addBox(-0.5F, -1F, -2F, 1, 2, 3);
      LFrontRightNail.setRotationPoint(0F, 1F, -4F);
      LFrontRightNail.setTextureSize(256, 256);
      LFrontRightNail.mirror = true;
      setRotation(LFrontRightNail, 0F, 0F, 0F);
      LFrontLeftNail = new ModelRenderer(this, 88, 113);
      LFrontLeftNail.addBox(-0.5F, -1F, -3F, 1, 2, 3);
      LFrontLeftNail.setRotationPoint(0F, 0F, -4F);
      LFrontLeftNail.setTextureSize(256, 256);
      LFrontLeftNail.mirror = true;
      setRotation(LFrontLeftNail, 0F, -0F, 0F);
      LeftShoulder = new ModelRenderer(this, 88, 58);
      LeftShoulder.addBox(0F, -3.5F, -3.5F, 14, 8, 7);
      LeftShoulder.setRotationPoint(7F, 0.5F, -2F);
      LeftShoulder.setTextureSize(256, 256);
      LeftShoulder.mirror = true;
      setRotation(LeftShoulder, 0F, 0F, 0.5235988F);
      Body = new ModelRenderer(this, 0, 90);
      Body.addBox(-10F, -10F, -10F, 20, 20, 20);
      Body.setRotationPoint(1F, -1F, 0F);
      Body.setTextureSize(256, 256);
      Body.mirror = true;   
      setRotation(Body, -0.1919862F, 0F, 0F);
      LFrontWingFlap = new ModelRenderer(this, 88, 149);
      LFrontWingFlap.addBox(-0.5F, -6F, 0F, 1, 12, 26);
      LFrontWingFlap.setRotationPoint(11F, 1F, -1F);
      LFrontWingFlap.setTextureSize(256, 256);
      LFrontWingFlap.mirror = true;
      setRotation(LFrontWingFlap, 0.2617994F, 0F, -1.5F);
      LFrontWingBone = new ModelRenderer(this, 88, 118);
      LFrontWingBone.addBox(-1.5F, -1.5F, 0F, 3, 3, 28);
      LFrontWingBone.setRotationPoint(-0.5F, 7, 0F);
      LFrontWingBone.setTextureSize(256, 256);
      LFrontWingBone.mirror = true;
      setRotation(LFrontWingBone, 0F, 0F, 0F);
      Chest = new ModelRenderer(this, 0, 68);
      Chest.addBox(-7F, -8F, -6F, 14, 16, 6);
      Chest.setRotationPoint(0F, -0F, -9F);
      Chest.setTextureSize(256, 256);
      Chest.mirror = true;
      setRotation(Chest, -0F, 0F, 0F);
      Neck = new ModelRenderer(this, 0, 44);
      Neck.addBox(-5F, -6F, -12F, 8, 12, 12);
      Neck.setRotationPoint(1F, -0F, -5F);
      Neck.setTextureSize(256, 256);
      Neck.mirror = true;
      setRotation(Neck, 0.1F, 0F, 0F);
      Head = new ModelRenderer(this, 0, 0);
      Head.addBox(-4.5F, -4F, -14F, 9, 8, 14);
      Head.setRotationPoint(-1F, -3F, -11F);
      Head.setTextureSize(256, 256);
      Head.mirror = true;
      setRotation(Head, 0F, 0F, 0F);
      Nose = new ModelRenderer(this, 46, 9);
      Nose.addBox(-4F, -2F, -4F, 9, 4, 3);
      Nose.setRotationPoint(-0.5F, 2F, -13F);
      Nose.setTextureSize(256, 256);
      Nose.mirror = true;
      setRotation(Nose, 0F, 0F, 0F);
      Face = new ModelRenderer(this, 46, 0);
      Face.addBox(-4F, -2F, -4F, 9, 5, 4);
      Face.setRotationPoint(-0.5F, -0F, -12F);
      Face.setTextureSize(256, 256);
      Face.mirror = true;
      setRotation(Face, -0.6457718F, 0F, 0F);
      Mouth = new ModelRenderer(this, 0, 22);
      Mouth.addBox(-4.5F, -2.5F, -17F, 9, 5, 17);
      Mouth.setRotationPoint(-1F, 2F, -11F);
      Mouth.setTextureSize(256, 256);
      Mouth.mirror = true;
      setRotation(Mouth, 0.7235988F, 0F, 0F);
      Stomach = new ModelRenderer(this, 0, 130);
      Stomach.addBox(-8.5F, -8.5F, 0F, 17, 17, 24);
      Stomach.setRotationPoint(0.5F, 0F, 7F);
      Stomach.setTextureSize(256, 256);
      Stomach.mirror = true;
      setRotation(Stomach, 0F, 0F, 0F);
      Waist = new ModelRenderer(this, 0, 171);
      Waist.addBox(-7F, -6.5F, 0F, 14, 13, 13);
      Waist.setRotationPoint(0F, 0F, 19F);
      Waist.setTextureSize(256, 256);
      Waist.mirror = true;
      setRotation(Waist, 0.2F, 0F, 0F);
      LeftHint = new ModelRenderer(this, 134, 0);
      LeftHint.addBox(0F, -3F, -4F, 6, 11, ;
      LeftHint.setRotationPoint(7F, 2F, 17F);
      LeftHint.setTextureSize(256, 256);
      LeftHint.mirror = true;
      setRotation(LeftHint, -0.5F, 0F, 0F);
      RightHint = new ModelRenderer(this, 134, 0);
      RightHint.addBox(-6F, -3F, -4F, 6, 11, ;
      RightHint.setRotationPoint(-7F, 2F, 17F);
      RightHint.setTextureSize(256, 256);
      RightHint.mirror = true;
      setRotation(RightHint, -0.5F, 0F, 0F);
      RUpperFrontCanine = new ModelRenderer(this, 52, 34);
      RUpperFrontCanine.addBox(-0.5F, 0F, -0.5F, 1, 3, 1);
      RUpperFrontCanine.setRotationPoint(0.5F, 0F, -3F);
      RUpperFrontCanine.setTextureSize(256, 256);
      RUpperFrontCanine.mirror = true;
      setRotation(RUpperFrontCanine, 0.1396263F, 0F, 0F);
      UpperFrontTeeth = new ModelRenderer(this, 52, 30);
      UpperFrontTeeth.addBox(-4F, 0F, -1F, 8, 1, 1);
      UpperFrontTeeth.setRotationPoint(0.5F, 2F, -2.6F);
      UpperFrontTeeth.setTextureSize(256, 256);
      UpperFrontTeeth.mirror = true;
      setRotation(UpperFrontTeeth, 0F, 0F, 0F);
      LUpperFrontCanine = new ModelRenderer(this, 52, 34);
      LUpperFrontCanine.addBox(-0.5F, 0F, 0.5F, 1, 3, 1);
      LUpperFrontCanine.setRotationPoint(0.5F, 0.3F, -4F);
      LUpperFrontCanine.setTextureSize(256, 256);
      LUpperFrontCanine.mirror = true;
      setRotation(LUpperFrontCanine, 0.1396263F, 0F, 0F);
      UpperRightTeeth = new ModelRenderer(this, 52, 16);
      UpperRightTeeth.addBox(0F, 0F, -4F, 1, 1, 13);
      UpperRightTeeth.setRotationPoint(-4F, 2F, 0.4F);
      UpperRightTeeth.setTextureSize(256, 256);
      UpperRightTeeth.mirror = true;
      setRotation(UpperRightTeeth, 0F, 0F, 0F);
      UpperLeftTeeth = new ModelRenderer(this, 52, 16);
      UpperLeftTeeth.addBox(0F, 0F, -4F, 1, 1, 13);
      UpperLeftTeeth.setRotationPoint(4F, 2F, 0.4F);
      UpperLeftTeeth.setTextureSize(256, 256);
      UpperLeftTeeth.mirror = true;
      setRotation(UpperLeftTeeth, 0F, 0F, 0F);
      LUpperBackCanine = new ModelRenderer(this, 56, 34);
      LUpperBackCanine.addBox(-0.5F, 0F, -0.5F, 1, 2, 1);
      LUpperBackCanine.setRotationPoint(0.5F, 0F, -0.5F);
      LUpperBackCanine.setTextureSize(256, 256);
      LUpperBackCanine.mirror = true;
      setRotation(LUpperBackCanine, 0.1396263F, 0F, 0F);
      LeftLeg = new ModelRenderer(this, 134, 19);
      LeftLeg.addBox(-3F, 0F, -3F, 6, 14, 6);
      LeftLeg.setRotationPoint(3F, 7F, -0F);
      LeftLeg.setTextureSize(256, 256);
      LeftLeg.mirror = true;
      setRotation(LeftLeg, 1F, 0F, 0F);
      RightLeg = new ModelRenderer(this, 134, 19);
      RightLeg.addBox(-3F, 0F, -3F, 6, 14, 6);
      RightLeg.setRotationPoint(-3F, 7F, -0F);
      RightLeg.setTextureSize(256, 256);
      RightLeg.mirror = true;
      setRotation(RightLeg, 1F, 0F, 0F);
      Tail = new ModelRenderer(this, 0, 197);
      Tail.addBox(-5F, -4.5F, 0F, 10, 9, 33);
      Tail.setRotationPoint(-0.5F, 0F, 10F);
      Tail.setTextureSize(256, 256);
      Tail.mirror = true;
      setRotation(Tail, -0F, 0F, 0F);
      TailStun = new ModelRenderer(this, 88, 0);
      TailStun.addBox(-5.5F, -5F, 0F, 11, 10, 12);
      TailStun.setRotationPoint(-0F, -0F, 18F);
      TailStun.setTextureSize(256, 256);
      TailStun.mirror = true;
      setRotation(TailStun, 0F, 0F, 0F);
      TailEnd = new ModelRenderer(this, 88, 22);
      TailEnd.addBox(-3.5F, -3F, 0F, 7, 6, 6);
      TailEnd.setRotationPoint(0F, 0F, 10F);
      TailEnd.setTextureSize(256, 256);
      TailEnd.mirror = true;
      setRotation(TailEnd, 0F, 0F, 0F);
      MiddleTailSpike = new ModelRenderer(this, 88, 45);
      MiddleTailSpike.addBox(-1.5F, -1.5F, 0F, 3, 3, 10);
      MiddleTailSpike.setRotationPoint(0F, 0F, 5F);
      MiddleTailSpike.setTextureSize(256, 256);
      MiddleTailSpike.mirror = true;
      setRotation(MiddleTailSpike, -0.0872665F, 0F, 0F);
      LBackSoleFoot = new ModelRenderer(this, 134, 39);
      LBackSoleFoot.addBox(-3F, 0F, -7F, 6, 4, 9);
      LBackSoleFoot.setRotationPoint(-0.2F, 12F, 1.3F);
      LBackSoleFoot.setTextureSize(256, 256);
      LBackSoleFoot.mirror = true;
      setRotation(LBackSoleFoot, -0.3F, 0F, 0F);
      RBackSoleFoot = new ModelRenderer(this, 134, 39);
      RBackSoleFoot.addBox(-3F, 0F, -7F, 6, 4, 9);
      RBackSoleFoot.setRotationPoint(0.2F, 12F, 1.3F);
      RBackSoleFoot.setTextureSize(256, 256);
      RBackSoleFoot.mirror = true;
      setRotation(RBackSoleFoot, -0.3F, 0F, 0F);
      RightTailSpikeB = new ModelRenderer(this, 88, 34);
      RightTailSpikeB.addBox(-1.5F, -1.5F, 0F, 3, 3, ;
      RightTailSpikeB.setRotationPoint(-4F, 0F, 3F);
      RightTailSpikeB.setTextureSize(256, 256);
      RightTailSpikeB.mirror = true;
      setRotation(RightTailSpikeB, -0.0872665F, -0.4363323F, 0F);
      LeftTailSpikeB = new ModelRenderer(this, 88, 34);
      LeftTailSpikeB.addBox(-1.5F, -1.5F, 0F, 3, 3, ;
      LeftTailSpikeB.setRotationPoint(4F, 0F, 3F);
      LeftTailSpikeB.setTextureSize(256, 256);
      LeftTailSpikeB.mirror = true;
      setRotation(LeftTailSpikeB, -0.0872665F, 0.4363323F, 0F);
      RightLowerTeeth = new ModelRenderer(this, 52, 16);
      RightLowerTeeth.addBox(0.5F, 0F, -4F, 1, 1, 13);
      RightLowerTeeth.setRotationPoint(-3.9F, -3F, -11F);
      RightLowerTeeth.setTextureSize(256, 256);
      RightLowerTeeth.mirror = true;
      setRotation(RightLowerTeeth, 0F, 0F, 0F);
      LeftLowerTeeth = new ModelRenderer(this, 52, 16);
      LeftLowerTeeth.addBox(0.5F, 0F, -4F, 1, 1, 13);
      LeftLowerTeeth.setRotationPoint(2.1F, -3F, -11F);
      LeftLowerTeeth.setTextureSize(256, 256);
      LeftLowerTeeth.mirror = true;
      setRotation(LeftLowerTeeth, 0F, 0F, 0F);
      LowerTeeth = new ModelRenderer(this, 52, 32);
      LowerTeeth.addBox(-4F, -1F, 0F, 7, 1, 1);
      LowerTeeth.setRotationPoint(0.6F, -2F, -15F);
      LowerTeeth.setTextureSize(256, 256);
      LowerTeeth.mirror = true;
      setRotation(LowerTeeth, 1.5F, -0.0058178F, 0F);
      LBackRightFinger = new ModelRenderer(this, 102, 105);
      LBackRightFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      LBackRightFinger.setRotationPoint(-2F, 2F, -6F);
      LBackRightFinger.setTextureSize(256, 256);
      LBackRightFinger.mirror = true;
      setRotation(LBackRightFinger, 0F, 0.5F, 0F);
      LBackMiddleFinger = new ModelRenderer(this, 102, 105);
      LBackMiddleFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      LBackMiddleFinger.setRotationPoint(0F, 2F, -5F);
      LBackMiddleFinger.setTextureSize(256, 256);
      LBackMiddleFinger.mirror = true;
      setRotation(LBackMiddleFinger, 0F, 0F, 0F);
      LBackLeftFinger = new ModelRenderer(this, 102, 105);
      LBackLeftFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      LBackLeftFinger.setRotationPoint(2F, 2F, -6F);
      LBackLeftFinger.setTextureSize(256, 256);
      LBackLeftFinger.mirror = true;
      setRotation(LBackLeftFinger, 0F, -0.5F, 0F);
      RBackRightFinger = new ModelRenderer(this, 102, 105);
      RBackRightFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      RBackRightFinger.setRotationPoint(-2F, 2F, -6F);
      RBackRightFinger.setTextureSize(256, 256);
      RBackRightFinger.mirror = true;
      setRotation(RBackRightFinger, 0F, 0.5F, 0F);
      RBackMiddleFinger = new ModelRenderer(this, 102, 105);
      RBackMiddleFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      RBackMiddleFinger.setRotationPoint(0F, 2F, -5F);
      RBackMiddleFinger.setTextureSize(256, 256);
      RBackMiddleFinger.mirror = true;
      setRotation(RBackMiddleFinger, 0F, 0F, 0F);
      RBackLeftFinger = new ModelRenderer(this, 102, 105);
      RBackLeftFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      RBackLeftFinger.setRotationPoint(0F, 2F, -4F);
      RBackLeftFinger.setTextureSize(256, 256);
      RBackLeftFinger.mirror = true;
      setRotation(RBackLeftFinger, 0F, -.5F, 0F);
      RBackMiddleNail = new ModelRenderer(this, 102, 113);
      RBackMiddleNail.addBox(-0.5F, -1F, -2F, 1, 2, 2);
      RBackMiddleNail.setRotationPoint(0F, 0F, -4F);
      RBackMiddleNail.setTextureSize(256, 256);
      RBackMiddleNail.mirror = true;
      setRotation(RBackMiddleNail, 0F, 0F, 0F);
      RBackLeftNail = new ModelRenderer(this, 102, 113);
      RBackLeftNail.addBox(-0.5F, -1F, -2F, 1, 2, 2);
      RBackLeftNail.setRotationPoint(0F, 0F, -4F);
      RBackLeftNail.setTextureSize(256, 256);
      RBackLeftNail.mirror = true;
      setRotation(RBackLeftNail, 0F, -0F, 0F);
      RBackRightNail = new ModelRenderer(this, 102, 113);
      RBackRightNail.addBox(-0.5F, -1F, -2F, 1, 2, 2);
      RBackRightNail.setRotationPoint(0F, 0F, -4F);
      RBackRightNail.setTextureSize(256, 256);
      RBackRightNail.mirror = true;
      setRotation(RBackRightNail, 0F, 0F, 0F);
      LBackRightNail = new ModelRenderer(this, 102, 113);
      LBackRightNail.addBox(-0.5F, -1F, -2F, 1, 2, 2);
      LBackRightNail.setRotationPoint(0F, 0F, -4F);
      LBackRightNail.setTextureSize(256, 256);
      LBackRightNail.mirror = true;
      setRotation(LBackRightNail, 0F, 0F, 0F);
      LBackLeftNail = new ModelRenderer(this, 102, 113);
      LBackLeftNail.addBox(-0.5F, -1F, -2F, 1, 2, 2);
      LBackLeftNail.setRotationPoint(0F, 0F, -4F);
      LBackLeftNail.setTextureSize(256, 256);
      LBackLeftNail.mirror = true;
      setRotation(LBackLeftNail, 0F, -0F, 0F);
      LBackMiddleNail = new ModelRenderer(this, 102, 113);
      LBackMiddleNail.addBox(-0.5F, -1F, -2F, 1, 2, 2);
      LBackMiddleNail.setRotationPoint(0F, 0F, -4F);
      LBackMiddleNail.setTextureSize(256, 256);
      LBackMiddleNail.mirror = true;
      setRotation(LBackMiddleNail, 0F, 0F, 0F);
      RUpperBackCanine = new ModelRenderer(this, 56, 34);
      RUpperBackCanine.addBox(-0.5F, 0F, -0.5F, 1, 2, 1);
      RUpperBackCanine.setRotationPoint(0.5F, 0F, -0.5F);
      RUpperBackCanine.setTextureSize(256, 256);
      RUpperBackCanine.mirror = true;
      setRotation(RUpperBackCanine, 0.1396263F, 0F, 0F);
      RightShoulder = new ModelRenderer(this, 88, 58);
      RightShoulder.addBox(-14F, -3.5F, -3.5F, 14, 8, 7);
      RightShoulder.setRotationPoint(-6F, -1.5F, -2F);
      RightShoulder.setTextureSize(256, 256);
      RightShoulder.mirror = true;
      setRotation(RightShoulder, 0F, 0F, -0.5235988F);
      RFrontMiddleFinger = new ModelRenderer(this, 102, 105);
      RFrontMiddleFinger.addBox(-1F, -1F, -4F, 2, 3, 4);
      RFrontMiddleFinger.setRotationPoint(0F, 2F, -5F);
      RFrontMiddleFinger.setTextureSize(256, 256);
      RFrontMiddleFinger.mirror = true;
      setRotation(RFrontMiddleFinger, 0F, 0F, 0F);
      RFrontMiddleNail = new ModelRenderer(this, 88, 113);
      RFrontMiddleNail.addBox(-0.5F, -1F, -2F, 1, 2, 3);
      RFrontMiddleNail.setRotationPoint(0F, 0F, -5F);
      RFrontMiddleNail.setTextureSize(256, 256);
      RFrontMiddleNail.mirror = true;
      setRotation(RFrontMiddleNail, 0F, 0F, 0F);
      RFrontRightNail = new ModelRenderer(this, 88, 113);
      RFrontRightNail.addBox(-0.5F, -1F, -2F, 1, 2, 3);
      RFrontRightNail.setRotationPoint(0F, 0F, -4F);
      RFrontRightNail.setTextureSize(256, 256);
      RFrontRightNail.mirror = true;
      setRotation(RFrontRightNail, 0F, 0F, 0F);
      RFrontLeftNail = new ModelRenderer(this, 88, 113);
      RFrontLeftNail.addBox(-0.5F, -1F, -3F, 1, 2, 3);
      RFrontLeftNail.setRotationPoint(0F, 0F, -4F);
      RFrontLeftNail.setTextureSize(256, 256);
      RFrontLeftNail.mirror = true;
      setRotation(RFrontLeftNail, 0F, 0F, 0F);
      RFrontWingBone = new ModelRenderer(this, 88, 118);
      RFrontWingBone.addBox(-1.5F, -1.5F, 0F, 3, 3, 28);
      RFrontWingBone.setRotationPoint(0.5F, 7, 0F);
      RFrontWingBone.setTextureSize(256, 256);
      RFrontWingBone.mirror = true;
      setRotation(RFrontWingBone, 0F, 0F, 0F);
      RFrontWingFlap = new ModelRenderer(this, 88, 149);
      RFrontWingFlap.addBox(-0.5F, -6F, 0F, 1, 12, 26);
      RFrontWingFlap.setRotationPoint(-11F, 1F, -1F);
      RFrontWingFlap.setTextureSize(256, 256);
      RFrontWingFlap.mirror = true;
      setRotation(RFrontWingFlap, 0.2617994F, 0F, 1.5F);
      RLowerFrontCanine = new ModelRenderer(this, 52, 34);
      RLowerFrontCanine.addBox(-0.5F, -2F, -0.5F, 1, 2, 1);
      RLowerFrontCanine.setRotationPoint(1F, 0F, -4F);
      RLowerFrontCanine.setTextureSize(256, 256);
      RLowerFrontCanine.mirror = true;
      setRotation(RLowerFrontCanine, -0.0349066F, 0F, 0F);
      LLowerFrontCanine = new ModelRenderer(this, 52, 34);
      LLowerFrontCanine.addBox(-0.5F, -2F, -0.5F, 1, 3, 1);
      LLowerFrontCanine.setRotationPoint(1F, 0F, -4F);
      LLowerFrontCanine.setTextureSize(256, 256);
      LLowerFrontCanine.mirror = true;
      setRotation(LLowerFrontCanine, -0.0349066F, 0F, 0F);
      LeftTailSpikeA = new ModelRenderer(this, 88, 34);
      LeftTailSpikeA.addBox(-1.5F, -1.5F, 0F, 3, 3, ;
      LeftTailSpikeA.setRotationPoint(4F, 0F, 5F);
      LeftTailSpikeA.setTextureSize(256, 256);
      LeftTailSpikeA.mirror = true;
      setRotation(LeftTailSpikeA, -0.0872665F, 0.6108652F, 0F);
      RightTailSpikeA = new ModelRenderer(this, 88, 34);
      RightTailSpikeA.addBox(-1.5F, -1.5F, 0F, 3, 3, ;
      RightTailSpikeA.setRotationPoint(-4F, 0F, 5F);
      RightTailSpikeA.setTextureSize(256, 256);
      RightTailSpikeA.mirror = true;
      setRotation(RightTailSpikeA, -0.0872665F, -0.6108652F, 0F);
      LeftEar = new ModelRenderer(this, 72, 0);
      LeftEar.addBox(-0.5F, -1F, 0F, 1, 3, 7);
      LeftEar.setRotationPoint(3F, -3F, -2F);
      LeftEar.setTextureSize(256, 256);
      LeftEar.mirror = true;
      setRotation(LeftEar, 0.3490659F, 0.3490659F, 0F);
      RightEar = new ModelRenderer(this, 72, 0);
      RightEar.addBox(-0.5F, -1F, 0F, 1, 3, 7);
      RightEar.setRotationPoint(-3F, -3F, -2F);
      RightEar.setTextureSize(256, 256);
      RightEar.mirror = true;
      setRotation(RightEar, 0.3490659F, -0.3490659F, 0F);
      LFrontFoot = new ModelRenderer(this, 116, 95);
      LFrontFoot.addBox(-3F, 0F, -5F, 7, 3, ;
      LFrontFoot.setRotationPoint(-0.5F, 1F, 1F);
      LFrontFoot.setTextureSize(256, 256);
      LFrontFoot.mirror = true;
      setRotation(LFrontFoot, 0F, 0F, 0F);
      LFrontLeftFinger = new ModelRenderer(this, 88, 105);
      LFrontLeftFinger.addBox(-1F, -1.5F, -5F, 2, 3, 5);
      LFrontLeftFinger.setRotationPoint(2F, 2F, -4F);
      LFrontLeftFinger.setTextureSize(256, 256);
      LFrontLeftFinger.mirror = true;
      setRotation(LFrontLeftFinger, 0F, -0.5F, 0F);
      LFrontRightFinger = new ModelRenderer(this, 88, 105);
      LFrontRightFinger.addBox(-1F, -1F, -5F, 2, 3, 5);
      LFrontRightFinger.setRotationPoint(-2F, 2F, -4F);
      LFrontRightFinger.setTextureSize(256, 256);
      LFrontRightFinger.mirror = true;
      setRotation(LFrontRightFinger, 0F, 0.5F, 0F);
      LFrontSoleFeet = new ModelRenderer(this, 88, 95);
      LFrontSoleFeet.addBox(-3F, 0F, -5F, 6, 2, ;
      LFrontSoleFeet.setRotationPoint(-0.2F, 6F, -0F);
      LFrontSoleFeet.setTextureSize(256, 256);
      LFrontSoleFeet.mirror = true;
      setRotation(LFrontSoleFeet, 0F, 0F, 0F);
      LFrontLowerLeg = new ModelRenderer(this, 88, 84);
      LFrontLowerLeg.addBox(-2.5F, 0F, -2.5F, 5, 6, 5);
      LFrontLowerLeg.setRotationPoint(14F, -0F, -0F);
      LFrontLowerLeg.setTextureSize(256, 256);
      LFrontLowerLeg.mirror = true;
      setRotation(LFrontLowerLeg, 0F, 0F, -1F);
      LFrontLeg = new ModelRenderer(this, 88, 73);
      LFrontLeg.addBox(0F, -2.5F, -2.5F, 15, 6, 5);
      LFrontLeg.setRotationPoint(11F, -1F, -0F);
      LFrontLeg.setTextureSize(256, 256);
      LFrontLeg.mirror = true;
      setRotation(LFrontLeg, 0F, 0F, 0.5F);
      RFrontLeg = new ModelRenderer(this, 88, 73);
      RFrontLeg.addBox(-15F, -2.5F, -2.5F, 15, 6, 5);
      RFrontLeg.setRotationPoint(-11F, -1F, -0F);
      RFrontLeg.setTextureSize(256, 256);
      RFrontLeg.mirror = true;
      setRotation(RFrontLeg, 0F, 0F, -0.5F);
      RFrontLowerLeg = new ModelRenderer(this, 88, 84);
      RFrontLowerLeg.addBox(-2.5F, 0F, -2.5F, 5, 6, 5);
      RFrontLowerLeg.setRotationPoint(-14F, 0.5F, -0F);
      RFrontLowerLeg.setTextureSize(256, 256);
      RFrontLowerLeg.mirror = true;
      setRotation(RFrontLowerLeg, 0F, 0F, 1F);
      RFrontFoot = new ModelRenderer(this, 116, 95);
      RFrontFoot.addBox(-3F, 0F, -5F, 7, 3, ;
      RFrontFoot.setRotationPoint(-0.5F, 1F, 1F);
      RFrontFoot.setTextureSize(256, 256);
      RFrontFoot.mirror = true;
      setRotation(RFrontFoot, 0F, 0F, 0F);
      RFrontSoleFeet = new ModelRenderer(this, 88, 95);
      RFrontSoleFeet.addBox(-3F, 0F, -5F, 6, 2, ;
      RFrontSoleFeet.setRotationPoint(0.2F, 6F, -0F);
      RFrontSoleFeet.setTextureSize(256, 256);
      RFrontSoleFeet.mirror = true;
      setRotation(RFrontSoleFeet, 0F, 0F, 0F);
      RFrontRightFinger = new ModelRenderer(this, 88, 105);
      RFrontRightFinger.addBox(-1F, -1F, -5F, 2, 3, 5);
      RFrontRightFinger.setRotationPoint(-2F, 2F, -4F);
      RFrontRightFinger.setTextureSize(256, 256);
      RFrontRightFinger.mirror = true;
      setRotation(RFrontRightFinger, 0F, 0.5F, 0F);
      RFrontLeftFinger = new ModelRenderer(this, 88, 105);
      RFrontLeftFinger.addBox(-1F, -1F, -5F, 2, 3, 5);
      RFrontLeftFinger.setRotationPoint(2F, 2F, -4F);
      RFrontLeftFinger.setTextureSize(256, 256);
      RFrontLeftFinger.mirror = true;
      setRotation(RFrontLeftFinger, 0F, -0.5F, 0F);
      
     /** Parts Adding Child 
      * DN: addChild<? = .<modelVar>
      */
      
      //Body
      Body.addChild(Chest);
      Body.addChild(Stomach);
      Chest.addChild(Neck);
      Stomach.addChild(Waist);
      
      //Arms & Legs
      Body.addChild(LeftShoulder);
      Body.addChild(RightShoulder);
      
      //Left and Right Part Leggings
      LeftShoulder.addChild(LFrontLeg);
      LFrontLeg.addChild(LFrontLowerLeg);
      LFrontLowerLeg.addChild(LFrontSoleFeet);
      LFrontSoleFeet.addChild(LFrontFoot);
      LFrontLeg.addChild(LFrontWingFlap);
      LFrontWingFlap.addChild(LFrontWingBone);
      LFrontFoot.addChild(LFrontLeftFinger);
      LFrontLeftFinger.addChild(LFrontLeftNail);
      LFrontFoot.addChild(LFrontMiddleFinger);
      LFrontMiddleFinger.addChild(LFrontMiddleNail);
      LFrontFoot.addChild(LFrontRightFinger);
      LFrontRightFinger.addChild(LFrontRightNail);
      
      RightShoulder.addChild(RFrontLeg);
      RFrontLeg.addChild(RFrontLowerLeg);
      RFrontLowerLeg.addChild(RFrontSoleFeet);
      RFrontSoleFeet.addChild(RFrontFoot);
      RFrontLeg.addChild(RFrontWingFlap);
      RFrontWingFlap.addChild(RFrontWingBone);
      RFrontFoot.addChild(RFrontLeftFinger);
      RFrontFoot.addChild(RFrontMiddleFinger);
      RFrontFoot.addChild(RFrontRightFinger);
      RFrontLeftFinger.addChild(RFrontLeftNail);
      RFrontMiddleFinger.addChild(RFrontMiddleNail);
      RFrontRightFinger.addChild(RFrontRightNail);
      
      //Feet Fart
      
      Stomach.addChild(LeftHint);
      Stomach.addChild(RightHint);
      RightHint.addChild(RightLeg);
      RightLeg.addChild(RBackSoleFoot);
      RBackSoleFoot.addChild(RBackLeftFinger);
      RBackSoleFoot.addChild(RBackMiddleFinger);
      RBackSoleFoot.addChild(RBackRightFinger);
      RBackLeftFinger.addChild(RBackLeftNail);
      RBackMiddleFinger.addChild(RBackMiddleNail);
      RBackRightFinger.addChild(RBackRightNail);
      LeftHint.addChild(LeftLeg);
      LeftLeg.addChild(LBackSoleFoot);
      LBackSoleFoot.addChild(LBackLeftFinger);
      LBackSoleFoot.addChild(LBackMiddleFinger);
      LBackSoleFoot.addChild(LBackRightFinger);
      LBackLeftFinger.addChild(LBackLeftNail);
      LBackMiddleFinger.addChild(LBackMiddleNail);
      LBackRightFinger.addChild(LBackRightNail);
      //Tail
      Waist.addChild(Tail);
      Tail.addChild(TailStun);
      TailStun.addChild(TailEnd);
      TailEnd.addChild(MiddleTailSpike);
      TailEnd.addChild(LeftTailSpikeB);
      TailEnd.addChild(RightTailSpikeB);
      TailStun.addChild(LeftTailSpikeA);
      TailStun.addChild(RightTailSpikeA);
      //Face Part
      Neck.addChild(Head);
      Neck.addChild(Mouth);
      Head.addChild(Face);
      Head.addChild(Nose);
      Head.addChild(LeftEar);
      Head.addChild(RightEar);
      Nose.addChild(UpperRightTeeth);
      Nose.addChild(UpperLeftTeeth);
      Nose.addChild(UpperFrontTeeth);
      UpperRightTeeth.addChild(RUpperFrontCanine);
      UpperRightTeeth.addChild(RUpperBackCanine);
      UpperLeftTeeth.addChild(LUpperFrontCanine);
      UpperLeftTeeth.addChild(LUpperBackCanine);
      Mouth.addChild(LowerTeeth);
      Mouth.addChild(LeftLowerTeeth);
      Mouth.addChild(RightLowerTeeth);
      LeftLowerTeeth.addChild(LLowerFrontCanine);
      RightLowerTeeth.addChild(RLowerFrontCanine);
  }
  
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5){
animator.update((iMHFC)entity);
setAngles();
EntityTigrex tigrex = (EntityTigrex)entity;
animTick = MHFCMain.proxy.getPartialTick();
animate((EntityTigrex)entity,f,f1,f2,f3,f4,f5);
    Body.render(f5);
    boolean flag = tigrex.showTail();
    Tail.showModel = flag;
    
    
  }

  private void setRotation(ModelRenderer model, float x, float y, float z){
  model.rotateAngleX = x;
  model.rotateAngleY = y;
  model.rotateAngleZ = z;
  }
  
  
  public void setAngles(){
  setRotation(LFrontMiddleFinger, 0F, 0F, 0F);
  setRotation(LFrontMiddleNail, 0F, 0F, 0F);
  setRotation(LFrontRightNail, 0F, 0F, 0F);
  setRotation(LFrontLeftNail, 0F, -0F, 0F);
  setRotation(LeftShoulder, 0F, 0F, 0.5235988F);
  setRotation(Body, -0.1919862F, 0F, 0F);
  setRotation(LFrontWingFlap, 0.2617994F, 0F, -1.5F);
  setRotation(LFrontWingBone, 0F, 0F, 0F);
  setRotation(Chest, -0F, 0F, 0F);
  setRotation(Neck, 0.1F, 0F, 0F);
  setRotation(Head, 0F, 0F, 0F);
  setRotation(Nose, 0F, 0F, 0F);
  setRotation(Face, -0.6457718F, 0F, 0F);
  setRotation(Mouth, 0.3235988F, 0F, 0F);
  setRotation(Stomach, 0F, 0F, 0F);
  setRotation(Waist, 0.2F, 0F, 0F);
  setRotation(LeftHint, -0.5F, 0F, 0F);
  setRotation(RightHint, -0.5F, 0F, 0F);
  setRotation(RUpperFrontCanine, 0.1396263F, 0F, 0F);
  setRotation(UpperFrontTeeth, 0F, 0F, 0F);
  setRotation(LUpperFrontCanine, 0.1396263F, 0F, 0F);
  setRotation(UpperRightTeeth, 0F, 0F, 0F);
  setRotation(UpperLeftTeeth, 0F, 0F, 0F);
  setRotation(LUpperBackCanine, 0.1396263F, 0F, 0F);
  setRotation(LeftLeg, 1F, 0F, 0F);
  setRotation(RightLeg, 1F, 0F, 0F);
  setRotation(Tail, -0F, 0F, 0F);
  setRotation(TailStun, 0F, 0F, 0F);
  setRotation(TailEnd, 0F, 0F, 0F);
  setRotation(MiddleTailSpike, -0.0872665F, 0F, 0F);
  setRotation(LBackSoleFoot, -0.3F, 0F, 0F);
  setRotation(RBackSoleFoot, -0.3F, 0F, 0F);
  setRotation(RightTailSpikeB, -0.0872665F, -0.4363323F, 0F);
  setRotation(LeftTailSpikeB, -0.0872665F, 0.4363323F, 0F);
  setRotation(RightLowerTeeth, 0F, 0F, 0F);
  setRotation(LeftLowerTeeth, 0F, 0F, 0F);
  setRotation(LowerTeeth, 1.5F, -0.0058178F, 0F);
  setRotation(LBackRightFinger, 0F, 0.5F, 0F);
  setRotation(LBackMiddleFinger, 0F, 0F, 0F);
  setRotation(LBackLeftFinger, 0F, -0.5F, 0F);
  setRotation(RBackRightFinger, 0F, 0.5F, 0F);
  setRotation(RBackMiddleFinger, 0F, 0F, 0F);
  setRotation(RBackLeftFinger, 0F, -.5F, 0F);
  setRotation(RBackMiddleNail, 0F, 0F, 0F);
  setRotation(RBackLeftFinger, 0F, -.5F, 0F);
  setRotation(RBackMiddleNail, 0F, 0F, 0F);
  setRotation(RBackLeftNail, 0F, -0F, 0F);
  setRotation(RBackRightNail, 0F, 0F, 0F);
  setRotation(LBackRightNail, 0F, 0F, 0F);
  setRotation(LBackLeftNail, 0F, -0F, 0F);
  setRotation(LBackMiddleNail, 0F, 0F, 0F);
  setRotation(RUpperBackCanine, 0.1396263F, 0F, 0F);
  setRotation(RightShoulder, 0F, 0F, -0.5235988F);
  setRotation(RFrontMiddleFinger, 0F, 0F, 0F);
  setRotation(RFrontMiddleNail, 0F, 0F, 0F);
  setRotation(RFrontRightNail, 0F, 0F, 0F);
  setRotation(RFrontLeftNail, 0F, 0F, 0F);
  setRotation(RFrontLeftNail, 0F, 0F, 0F);
  setRotation(RFrontWingBone, 0F, 0F, 0F);
  setRotation(RFrontWingFlap, 0.2617994F, 0F, 1.5F);
  setRotation(RLowerFrontCanine, -0.0349066F, 0F, 0F);
  setRotation(LLowerFrontCanine, -0.0349066F, 0F, 0F);
  setRotation(LeftTailSpikeA, -0.0872665F, 0.6108652F, 0F);
  setRotation(RightTailSpikeA, -0.0872665F, -0.6108652F, 0F);
  setRotation(LeftEar, 0.3490659F, 0.3490659F, 0F);
  setRotation(RightEar, 0.3490659F, -0.3490659F, 0F);
  setRotation(LFrontFoot, 0F, 0F, 0F);
  setRotation(LFrontLeftFinger, 0F, -0.5F, 0F);
  setRotation(LFrontRightFinger, 0F, 0.5F, 0F);
  setRotation(LFrontSoleFeet, 0F, 0F, 0F);
  setRotation(LFrontLowerLeg, 0F, 0F, -1F);
  setRotation(LFrontLeg, 0F, 0F, 0.5F);
  setRotation(RFrontLeg, 0F, 0F, -0.5F);
  setRotation(RFrontLowerLeg, 0F, 0F, 1F);
  setRotation(RFrontFoot, 0F, 0F, 0F);
  setRotation(RFrontSoleFeet, 0F, 0F, 0F);
  setRotation(RFrontRightFinger, 0F, 0.5F, 0F);
  setRotation(RFrontLeftFinger, 0F, -0.5F, 0F);
  }
  

  


Link to comment
Share on other sites

I can look more closely at the code if you want but try using a DataWatcher to update the variable clientside and then have the renderer check that. Also, add a if() statement to your showTail() method to check if the variable is true, that should prevent it from switching from false to true.

Link to comment
Share on other sites

What do you mean look more closely ? Should i give more details

 

What do you mean by if statement like when my showTail is set to true and it match the conditions it will go false  ? Maybe ill try that

 

public boolean showTail() {
	if(this.getMaxHealth() < 1500) {
		return false;
	}return true;
}

 

Still havent look on renderer yet but hopefully what i need is to specific only the current mob that match the conditions since then i spawn 2 tigrex at a time hit the one until its hp gone to 1500 and both of them loses its tail which is not right

Link to comment
Share on other sites

If what I suggested doesn't work I'll look at it some more. DataWatchers are entity specific which is why I suggested them. You mentioned

 

"And how do i even set my tail wont spawn anymore if the condition changes" problem.

 

If you store the value in a variable and prevent the variable from getting set if it is already false then that won't happen.

 

E.G.

 

public boolean tailisvisible;

 

onUpdate() {

      if (tailisvisible && this.getMaxHealth() < 1500) {

            tailisvisible = false

      }

}

Link to comment
Share on other sites

Im partly new with datawatchers ok . i dont usually done this since i mostly go to AI 's

 

but what i think is that when i set the boolean of setShowTail into true the datawatcher will update the specific mob

 

but i think i was wrong

 

I manage to work the tail cut part but theres still a bug

 

When i manage to spawn another tigrex after i did to the last tigrex the cut when through the other tigrex .

 

 

Test Tigrex

PymUbzb.png

 

Spawned New Tigrex

 

yEK6ujZ.png

 

 

 

 

Heres my updated Entity

 


public void onUpdate()	{
	super.onUpdate();

	if(showTail && this.getHealth() < 1500){
		showTail = false;
		setShowTail(true); // Either false or true this does do same or cause the tail bug
	}
	if(currentAttackID != 0)animTick++;
}

 public void setShowTail(boolean flag){ <---- 

		dataWatcher.updateObject(16, Byte.valueOf((byte)(flag ? 1 : 0)));
     }
     
     public boolean getShowTail(){
    	return dataWatcher.getWatchableObjectByte(16) == 1;
     }

Link to comment
Share on other sites

Ohh Right !!

 

Now the tigrex tail part remove works now a little hand here guys it seems that whenever i spawn another tigrex in world

the previous tigrex that has the model cut will be moved to the newly spawned tigrex.

 


public boolean showTail;

public void onUpdate()	{
	super.onUpdate();
	if(showTail && this.getHealth() < 1500){
		showTail = false;
		setShowTail(true);
	}
	if(currentAttackID != 0)animTick++; // dont mind
}

My datawatcher

public void setShowTail(boolean flag){
	dataWatcher.updateObject(16, Byte.valueOf((byte)(flag ? 1 : 0)));
     }
     
     public boolean getShowTail(){
    	return dataWatcher.getWatchableObjectByte(16) == 1;
     }


Link to comment
Share on other sites

Is not on spawning code actually sir but it happen when i did this

 


public void onUpdate()	{
	super.onUpdate();
	if(showTail && getHealth() < 1500){
		showTail = false;
                       setShowTail(true);


	}
	if(currentAttackID != 0)animTick++;
}

 public void setShowTail(boolean flag){
	 dataWatcher.updateObject(16, Byte.valueOf((byte)(flag ? 1 : 0)));
 }
     
 public boolean getShowTail(){
	 return dataWatcher.getWatchableObjectByte(16) == 1;
 }

Link to comment
Share on other sites

Oh Right !! I got a better way to enhance his , :D ,

 

I look at EntityDragonPart and its just way makes more sense :) .

 

So i create my custom of i

I set  custom bounding box to this and make an update this to my EntitTigrex and boom ;

 

Ill post the update as soon as i go it

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Join one of the largest civilization experiments in Minecraft under our banner!   Our goal is to create the largest and most prominent civilization across the entirety of Minecraft, and we’d like you to join! We offer lots of unique roles and jobs that tailor to your specific skillset in Minecraft! You can build a city, participate in the government, or fight for Gold, God, and Glory on the battlefield!   Join our nation today! https://discord.gg/hb3cuaDezA
    • I have an issue where after I exit the world the capability data does not save when I reload the world. It will save the initial data such as village name but if I modify any data during gameplay theres a 5% chance the data saves when I exit then reload the world. I read the docs and was told that chunks need to be marked dirty but the docs does not say how to mark the chunk dirty... Heres the provider: public class ChunkCapProvider implements ICapabilityProvider, ICapabilitySerializable<CompoundTag> { private final Capability<IChunk> capability = ChunkCapability.CHUNK_CAPABILITY; private final ChunkCapability instance = new ChunkCapability(); private final LazyOptional lazy = LazyOptional.of(()->instance).cast(); public void invalidate(){ lazy.invalidate(); } @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction direction) { if(cap == capability ) return lazy; return LazyOptional.empty(); } @Override public CompoundTag serializeNBT() { return instance.serializeNBT(); } @Override public void deserializeNBT(CompoundTag tag) { instance.deserializeNBT(tag); } }   Heres the capability class: public class ChunkCapability implements IChunk { public static final ResourceLocation ID = new ResourceLocation(Main.MODID, "owner"); public static final String VILLAGE_NAME = "village_name"; public static final String SAVED_ROLES = "saved_roles"; public static final String SAVED_POINTS = "saved_points"; public static final String BAD_CHUNK = "BAD_VILLAGE_CHUNK"; public static Capability<IChunk> CHUNK_CAPABILITY = null; private String villageName = "BAD_VILLAGE_CHUNK"; private String savedRoles = ""; private String savedPoints = ""; public ChunkCapability(){ this.getClass(); } @Override public CompoundTag serializeNBT() { CompoundTag nbt = new CompoundTag(); nbt.putString(SAVED_ROLES, this.savedRoles); nbt.putString(SAVED_POINTS, this.savedPoints); nbt.putString(VILLAGE_NAME, this.villageName); return nbt; } public void deserializeNBT(CompoundTag tag) { this.setVillageName(tag.getString(VILLAGE_NAME)); this.setSavedRoles(tag.getString(SAVED_ROLES)); this.setSavedPoints(tag.getString(SAVED_POINTS)); } public String getVillageName() { return this.villageName; } public void setVillageName(String str) { this.villageName = str; } public void setSavedRoles(String str) { this.savedRoles = str; } public void setRole(String name, String role){ if(!this.hasRole(name)) { this.savedRoles += (name + ":" + role + ","); this.savedPoints += (name + ":" + 10 + ","); return; } String roleName = this.getRole(name); String firstStr = this.savedRoles.substring(0, this.savedRoles.indexOf(name + ":") + name.length() + 1); String lastStr = this.savedRoles.substring(this.savedRoles.indexOf(name + ":") + ((name.length() + 1) + roleName.length())); this.savedRoles = firstStr + role + lastStr; } public String getRole(String name){ if(this.savedRoles.isEmpty() || !this.savedRoles.contains(name)) { this.setRole(name, Roles.Role.FOREIGNER.getName()); } String fStr = this.savedRoles.substring(this.savedRoles.indexOf(name + ":"), this.savedRoles.indexOf(',')); return fStr.substring(fStr.indexOf(':') + 1); } public boolean hasRole(String name) { if(this.savedRoles.isEmpty()) return false; return this.savedRoles.contains(name); } public String getSavedRoles() { return this.savedRoles; } public String getSavedPoints() { return this.savedPoints; } public void setSavedPoints(String name) { this.savedPoints = name; } public int getPoints(String name) { if(this.savedPoints.isEmpty() || !this.savedRoles.contains(name)) this.setPoints(name, 10); String fStr = this.savedPoints.substring(this.savedPoints.indexOf(name + ':')); return Integer.parseInt(fStr.substring(fStr.indexOf(':') + 1, fStr.indexOf(','))); } public void setPoints(String name, int rV) { if(!this.hasPoints(name)){ this.savedPoints += (name + ":" + rV + ","); return; } String oldPoints = String.valueOf(this.getPoints(name)); String points = String.valueOf(rV); String firstStr = this.savedPoints.substring(0, this.savedPoints.indexOf(name + ":") + name.length() + 1); String lastStr = this.savedPoints.substring(this.savedPoints.indexOf(name + ":") + ((name.length() + 1) + oldPoints.length())); Minecraft.getInstance().player.displayClientMessage(Component.nullToEmpty("Saved String: " + (firstStr + points + lastStr)), false); this.savedPoints = (firstStr + points + lastStr); } public boolean hasPoints(String name) { if(this.savedPoints.isEmpty()) return false; return this.savedPoints.contains(name); } }   Heres where I attach/register: @Mod.EventBusSubscriber(modid = Main.MODID) public class CapabilityEvents { @SubscribeEvent public static void attachCapability(AttachCapabilitiesEvent<LevelChunk> event){ ChunkCapProvider provider = new ChunkCapProvider(); event.addCapability(ChunkCapability.ID, provider); event.addListener(provider::invalidate); } }  
    • Id use this ServerLevel#findNearestMapFeature  
    • Trying to play with the mods: Tinkers Construct, Buildcraft and the Blood Magic addon Blood Arsenal; the game crashes. I noticed that when trying to use only two of the three in any combination the game opens without problems, but when trying to put all three together the error occurs. Is there any configuration I can modify or any other way to solve the problem?   ---- Minecraft Crash Report ---- // Hi. I'm Minecraft, and I'm a crashaholic. Time: 5/22/24 8:48 PM Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: tconstruct/library/weaponry/AmmoWeapon     at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)     at net.minecraft.client.main.Main.main(SourceFile:148)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: tconstruct/library/weaponry/AmmoWeapon     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Unknown Source)     at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:42)     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)     ... 10 more Caused by: java.lang.ClassNotFoundException: tconstruct.library.weaponry.AmmoWeapon     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 36 more Caused by: java.lang.NoClassDefFoundError: tconstruct/library/weaponry/AmmoItem     at java.lang.ClassLoader.defineClass1(Native Method)     at java.lang.ClassLoader.defineClass(Unknown Source)     at java.security.SecureClassLoader.defineClass(Unknown Source)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)     ... 38 more Caused by: java.lang.ClassNotFoundException: tconstruct.library.weaponry.AmmoItem     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101)     at java.lang.ClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 42 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.7.10     Operating System: Windows 10 (x86) version 10.0     Java Version: 1.8.0_411, Oracle Corporation     Java VM Version: Java HotSpot(TM) Client VM (mixed mode, sharing), Oracle Corporation     Memory: 271923192 bytes (259 MB) / 402653184 bytes (384 MB) up to 536870912 bytes (512 MB)     JVM Flags: 9 total; -Xmx512M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -XX:+IgnoreUnrecognizedVMOptions -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump     AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 14 mods loaded, 14 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     UC    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)      UC    FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614-1.7.10.jar)      UC    Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614-1.7.10.jar)      UC    AWWayofTime{v1.3.3} [Blood Magic: Alchemical Wizardry] (BloodMagic-1.7.10-1.3.3-17.jar)      UC    Mantle{1.7.10-0.3.2.jenkins191} [Mantle] (Mantle-1.7.10-0.3.2b.jar)      UE    TConstruct{1.7.10-1.8.8.build991} [Tinkers' Construct] (TConstruct-1.7.10-1.8.8.build991.jar)      UC    BloodArsenal{1.2-5} [Blood Arsenal] (BloodArsenal-1.7.10-1.2-5.jar)      UC    BuildCraft|Core{7.1.25} [BuildCraft] (buildcraft-7.1.25.jar)      UC    BuildCraft|Builders{7.1.25} [BC Builders] (buildcraft-7.1.25.jar)      UC    BuildCraft|Robotics{7.1.25} [BC Robotics] (buildcraft-7.1.25.jar)      UC    BuildCraft|Silicon{7.1.25} [BC Silicon] (buildcraft-7.1.25.jar)      UC    BuildCraft|Energy{7.1.25} [BC Energy] (buildcraft-7.1.25.jar)      UC    BuildCraft|Transport{7.1.25} [BC Transport] (buildcraft-7.1.25.jar)      UC    BuildCraft|Factory{7.1.25} [BC Factory] (buildcraft-7.1.25.jar)      GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 21.20.16.4541' Renderer: 'Intel(R) HD Graphics 610'     Mantle Environment: Environment healthy.     TConstruct Environment: Environment healthy.
    • fixed this problem but now i have a new one  java.lang.RuntimeException: java.lang.NoSuchFieldException: processor  Help 
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.