示例#1
0
  /** Called whenever the block is added into the world. Args: world, x, y, z */
  public void onBlockAdded(World par1World, int par2, int par3, int par4) {
    super.onBlockAdded(par1World, par2, par3, par4);

    //        if (par1World.getBlockId(par2, par3, par4) == this.blockID)
    //        {
    par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate());
    //        }
  }
示例#2
0
 /**
  * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed
  * (coordinates passed are their own) Args: x, y, z, neighbor blockID
  */
 public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
   if (par1World.getBlockId(par2, par3, par4) == this.blockID) {
     par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate());
   }
 }