- 351
- 0
Здравствуйте! Пожалуйста,помогите мне! Я создал моба,но не знаю, как сделать так,чтобы у него была своя модель.
Вот код моба:
package assets.powerblocks.src;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.world.World;
public class EntityTitanium extends EntityMob
{
public EntityTitanium(World par1World)
{
super(par1World);
this.yOffset *= 7.0F;
this.setSize(this.width * 7.0F, this.height * 7.0F);
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(1000.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.7D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(70.0D);
}
/**
* Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block.
* Args: x, y, z
*/
public float getBlockPathWeight(int par1, int par2, int par3)
{
return this.worldObj.getLightBrightness(par1, par2, par3) - 0.5F;
}
}
Заранее спасибо!
Вот код моба:
package assets.powerblocks.src;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.world.World;
public class EntityTitanium extends EntityMob
{
public EntityTitanium(World par1World)
{
super(par1World);
this.yOffset *= 7.0F;
this.setSize(this.width * 7.0F, this.height * 7.0F);
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(1000.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.7D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(70.0D);
}
/**
* Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block.
* Args: x, y, z
*/
public float getBlockPathWeight(int par1, int par2, int par3)
{
return this.worldObj.getLightBrightness(par1, par2, par3) - 0.5F;
}
}
Заранее спасибо!