Files
CustomNPC-Plus/src/main/java/noppes/npcs/entity/old/EntityNPCVillager.java
T
2023-03-17 02:36:28 -05:00

46 lines
1.3 KiB
Java

// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCVillager extends EntityNPCInterface
{
public EntityNPCVillager(World world)
{
super(world);
display.texture = "textures/entity/villager/villager.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(EntityVillager.class);
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
}
}