Heres my code, why doesnt a mob spawn when I power it?
package net.minecraft.src;
import java.util.Random;
public class BlockZombie extends Block
{
public BlockZombie(int i, int j)
{
super(i, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Spawner.ZombieSpawn.blockID;
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l, EntityPlayer entityplayer)
{
if(world.isBlockIndirectlyGettingPowered(i, j, k))
{
if(!world.multiplayerWorld)
{
EntityLiving entityliving = (EntityLiving)EntityList.createEntityInWorld("Zombie", entityplayer.worldObj);
entityliving.setLocationAndAngles(i, j + 1, k, 0F, 0F);
entityplayer.worldObj.entityJoinedWorld(entityliving);
}
}
}
}
Sorry, im a noob, But i just want to know how to make a zombie spawn when i redstone power it. What code do I need to add where?
Noob != moron.
All you have to do is copy of the code of the guy who already fixed your problem in this thread. Better yet, go copy a tutorial if that is all you want.
EDIT:Still no zombie. And your code is the same as his except for the @Override which didnt do anything. But thx anyway.
Noob != moron.
All you have to do is copy of the code of the guy who already fixed your problem in this thread. Better yet, go copy a tutorial if that is all you want.