2018-09-13 12:03:28 -04:00
|
|
|
package noppes.npcs.entity;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
import net.minecraft.world.World;
|
2023-03-17 02:36:28 -05:00
|
|
|
import noppes.npcs.entity.data.ModelData;
|
2018-09-13 12:03:28 -04:00
|
|
|
|
|
|
|
|
public class EntityNpcPony extends EntityNPCInterface
|
|
|
|
|
{
|
|
|
|
|
public boolean isPegasus = false;
|
|
|
|
|
public boolean isUnicorn = false;
|
|
|
|
|
public boolean isFlying = false;
|
|
|
|
|
|
|
|
|
|
public ResourceLocation checked = null;
|
|
|
|
|
|
|
|
|
|
public EntityNpcPony(World world)
|
|
|
|
|
{
|
|
|
|
|
super(world);
|
|
|
|
|
display.texture = "customnpcs:textures/entity/ponies/MineLP Derpy Hooves.png";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onUpdate()
|
|
|
|
|
{
|
|
|
|
|
isDead = true;
|
|
|
|
|
|
|
|
|
|
if(!worldObj.isRemote){
|
|
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
|
|
|
|
|
|
|
|
|
writeToNBT(compound);
|
|
|
|
|
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
|
|
|
|
|
npc.readFromNBT(compound);
|
|
|
|
|
ModelData data = npc.modelData;
|
|
|
|
|
data.setEntityClass(EntityNpcPony.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
worldObj.spawnEntityInWorld(npc);
|
|
|
|
|
}
|
|
|
|
|
super.onUpdate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|