Entity ent = new EntityCow(world);
//ent.posX = player.posX;
//ent.posZ = player.posZ;
//ent.posY = player.posY;
ent.setPosition(player.posX, player.posY, player.posZ);
world.spawnEntityInWorld(ent);
this code spawn 2 cows, one is normal, another is untouchable