Hi,
I am trying to spawn an entity on the right click of an item with this code:
@Override
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player)
{
if(!world.isRemote)
{
Entity entity = new EntityZombie(Minecraft.getMinecraft().theWorld);
entity.setPosition(player.posX, player.posY, player.posZ);
world.spawnEntityInWorld(entity);
}
return item;
}
and then when the entity spawns it just stands there and does nothing. I have also tried going into survival, pushing it around and even trying to hit it but it doesnt work.