package twilightforest.entity;

import net.minecraft.entity.IEntityMultiPart;
import net.minecraft.entity.boss.EntityDragonPart;

public class EntityTFGoblinChain extends EntityDragonPart {
	public EntityTFGoblinChain(IEntityMultiPart goblin) {
		super(goblin, "chain", 0.1F, 0.1F);
	}

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

    	this.ticksExisted++;

    	lastTickPosX = posX;
    	lastTickPosY = posY;
    	lastTickPosZ = posZ;

    	for (; rotationYaw - prevRotationYaw < -180F; prevRotationYaw -= 360F) { }
    	for (; rotationYaw - prevRotationYaw >= 180F; prevRotationYaw += 360F) { }
    	for (; rotationPitch - prevRotationPitch < -180F; prevRotationPitch -= 360F) { }
    	for (; rotationPitch - prevRotationPitch >= 180F; prevRotationPitch += 360F) { }
    }
    
    @Override
    public boolean canBeCollidedWith()
    {
        return false;
    }
}
