Ejemplo n.º 1
0
  public boolean update(boolean force) {
    Block block = getBlock();

    synchronized (block) {
      if (block.getTypeId() != type) {
        if (force) {
          type = block.getTypeId();
          block.setTypeId(this.getTypeId());
        } else {
          return false;
        }
      }
    }

    return true;
  }
Ejemplo n.º 2
0
 public CraftBlockState(final Block block) {
   this.world = (SpoutcraftWorld) block.getWorld();
   this.x = block.getX();
   this.y = block.getY();
   this.z = block.getZ();
   this.type = block.getTypeId();
   this.light = block.getLightLevel();
   this.chunk = (SpoutcraftChunk) block.getChunk();
   this.location = new FastLocation(x, y, z, 0, 0, world);
 }