- 129
- 0
Создал кирку
public boolean onBlockDestroyed(ItemStack ItemStack, World World, Block Block, int X, int Y, int Z, EntityLivingBase entity)
{
final Random random = new Random();
ItemStack.damageItem(1, entity);
EntityItem item = new EntityItem(World, X, Y, Z, new ItemStack(Blocks.cobblestone));
EntityItem item2 = new EntityItem(World, X, Y-1, Z, new ItemStack(Blocks.cobblestone,random.nextInt(1)));
boolean HaveMiner = Minecraft.getMinecraft().thePlayer.inventory.hasItem(syhd.Card4);
if(HaveMiner){
if (!World.isRemote)
{
if (World.getBlock(X, Y, Z) == Blocks.stone){
if(World.getBlock(X, Y-1, Z) == Blocks.stone){
World.spawnEntityInWorld(item);
World.setBlock(X, Y-1, Z, Blocks.air);
World.spawnEntityInWorld(item2);
}
}
}
}
return true;
}
} Почему закрывается сервер ?
public boolean onBlockDestroyed(ItemStack ItemStack, World World, Block Block, int X, int Y, int Z, EntityLivingBase entity)
{
final Random random = new Random();
ItemStack.damageItem(1, entity);
EntityItem item = new EntityItem(World, X, Y, Z, new ItemStack(Blocks.cobblestone));
EntityItem item2 = new EntityItem(World, X, Y-1, Z, new ItemStack(Blocks.cobblestone,random.nextInt(1)));
boolean HaveMiner = Minecraft.getMinecraft().thePlayer.inventory.hasItem(syhd.Card4);
if(HaveMiner){
if (!World.isRemote)
{
if (World.getBlock(X, Y, Z) == Blocks.stone){
if(World.getBlock(X, Y-1, Z) == Blocks.stone){
World.spawnEntityInWorld(item);
World.setBlock(X, Y-1, Z, Blocks.air);
World.spawnEntityInWorld(item2);
}
}
}
}
return true;
}
} Почему закрывается сервер ?