Inverts the {@link IBlockState} value in the {@link World}.

@param world the world
@param pos the pos
@return the new value
976215
public boolean invert(World world, BlockPos pos)
	{
		boolean value = !get(world, pos);
		set(world, pos, value);
		return value;
	}
877008
public static EnumDyeColor getColor(IBlockAccess world, BlockPos pos)
	{
		return world != null && pos != null ? getColor(world.getBlockState(pos)) : EnumDyeColor.WHITE;
	}
844786
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setMapuid($value);
                break;
            case 2:
                $this->setName($value);
                break;
            case 3:
                $this->setFilename($value);
                break;
            case 4:
                $this->setAuthor($value);
                break;
            case 5:
                $this->setEnvironment($value);
                break;
            case 6:
                $this->setMood($value);
                break;
            case 7:
                $this->setBronzetime($value);
                break;
            case 8:
                $this->setSilvertime($value);
                break;
            case 9:
                $this->setGoldtime($value);
                break;
            case 10:
                $this->setAuthortime($value);
                break;
            case 11:
                $this->setCopperprice($value);
                break;
            case 12:
                $this->setLaprace($value);
                break;
            case 13:
                $this->setNblaps($value);
                break;
            case 14:
                $this->setNpcheckpoints($value);
                break;
            case 15:
                $this->setMaptype($value);
                break;
            case 16:
                $this->setMapstyle($value);
                break;
            case 17:
                $this->setCreatedAt($value);
                break;
            case 18:
                $this->setUpdatedAt($value);
                break;
        } // switch()

        return $this;
    }
170844
public Position getPosition(final String pos) {
        final String s = pos.toUpperCase(Locale.US);
        final int len = s.length();
        int status = 0;

        int row = 0;
        int col = 0;
        int n = 0;
        while (n < len) {
            final char c = s.charAt(n);
            switch (status) {
                case BEGIN_LETTER: // opt $
                case BEGIN_DIGIT: // opt $
                    status++;
                    if (c == '$') n++;
                    break;
                case FIRST_LETTER: // mand letter
                    if ('A' <= c && c <= 'Z') {
                        col = c - 'A' + 1;
                        status = PositionUtil.OPT_SECOND_LETTER;
                        n++;
                    } else return null;
                    break;
                case OPT_SECOND_LETTER: // opt letter
                    if ('A' <= c && c <= 'Z') {
                        col = col * ALPHABET_SIZE + c - ORD_A + 1;
                        n++;
                    }
                    status = PositionUtil.BEGIN_DIGIT;
                    break;
                case FIRST_DIGIT: // mand digit
                    if ('0' <= c && c <= '9') {
                        row = c - '0';
                        status = PositionUtil.OPT_DIGIT;
                        n++;
                    } else return null;
                    break;
                case OPT_DIGIT: // opt digit
                    if ('0' <= c && c <= '9') {
                        row = row * 10 + c - '0';
                        n++;
                    } else return null;
                    break;
                default:
                    return null;
            }
        }
        return new Position(this.equalityUtil, this.tableNameUtil, row - 1, col - 1);
    }
720763
private static GVRWorld getWorldFromAscendant(GVRSceneObject worldOwner) {
        GVRComponent world = null;

        while (worldOwner != null && world == null) {
            world = worldOwner.getComponent(GVRWorld.getComponentType());
            worldOwner = worldOwner.getParent();
        }

        return (GVRWorld) world;
    }
1176441
public boolean setPosition(long pos)
    throws IOException
  {
    // Allow seeks to be reflected in the char Reader.
    if (_readEncoding != null) {
      _readEncoding = Encoding.getReadEncoding(this, _readEncodingName);
    }
    
    if (pos < 0) {
      // Return error on seek to negative stream position

      return false;
    }
    
    long delta = pos - getPosition();
    
    long newOffset = _readOffset + delta;
    
    if (newOffset >= 0 && newOffset < _readLength) {
      _readOffset = (int) newOffset;
      
      return true;
    }
    
    if (delta < 0) {
      // Seek backwards in the stream

      _position = pos;
      _readLength = _readOffset = 0;

      if (_source != null) {
        _source.seekStart(pos);

        return true;
      }
      else {
        return false;
      }
    }
    else {
      // Seek forward in the stream, skip any buffered bytes

      long n = pos - getPosition();

      return (skip(n) == n);
    }
  }
184234
public static void reverse(final Object[] arr, final int pos, final int len) {
        for (int l = pos, r = pos + len - 1; l < r; l++, r--) {
            final Object tmp = arr[l];
            arr[l] = arr[r];
            arr[r] = tmp;
        }
    }
934383
public static AxisAlignedBB offset(BlockPos pos, AxisAlignedBB aabb)
	{
		if (aabb == null || pos == null)
			return aabb;
		return aabb.offset(pos.getX(), pos.getY(), pos.getZ());
	}
1261213
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setId($value);
                break;
            case 1:
                $this->setDealerId($value);
                break;
            case 2:
                $this->setDay($value);
                break;
            case 3:
                $this->setBegin($value);
                break;
            case 4:
                $this->setEnd($value);
                break;
            case 5:
                $this->setClosed($value);
                break;
            case 6:
                $this->setPeriodBegin($value);
                break;
            case 7:
                $this->setPeriodEnd($value);
                break;
            case 8:
                $this->setCreatedAt($value);
                break;
            case 9:
                $this->setUpdatedAt($value);
                break;
            case 10:
                $this->setVersion($value);
                break;
            case 11:
                $this->setVersionCreatedAt($value);
                break;
            case 12:
                $this->setVersionCreatedBy($value);
                break;
            case 13:
                $this->setDealerIdVersion($value);
                break;
        } // switch()
    }
806870
private int resetbuf(int bit_pos) {
		int pos = bit_pos >> 3;
		System.arraycopy(data, pos, data, 0, end - pos);
		end -= pos;
		return 0;
	}
946898
protected final int shiftKeys(int pos) {
		// Shift entries with the same hash.
		int last, slot;
		for (;;) {
			pos = ((last = pos) + 1) & mask;
			while (visitState[pos] != null) {
				slot = (int)(MurmurHash3.hash(visitState[pos].schemeAuthority) & mask);
				if (last <= pos ? last >= slot || slot > pos : last >= slot && slot > pos) break;
				pos = (pos + 1) & mask;
			}
			if (visitState[pos] == null) break;
			visitState[last] = visitState[pos];
		}
		visitState[last] = null;
		return last;
	}
703485
@Override
	public boolean canMerge(ItemStack itemStack, EntityPlayer player, World world, BlockPos pos, EnumFacing side)
	{
		IBlockState state = world.getBlockState(pos);
		if (isCorner(state))
			return false;

		return EnumFacingUtils.getRealSide(state, side) != EnumFacing.NORTH;
	}
606926
public void setValue(Vector3f pos) {
        mX = pos.x;
        mY = pos.y;
        mZ = pos.z;
    }
485845
public void putInt(int pos, int i) {
		adaptSize(pos + 4);
		ByteBuffer bb = getBuffer(pos);
		int index = pos % _bufferSize;
		if (bb.limit() - index >= 4) {
			bb.putInt(index, i);
		} else {
			byte b0 = (byte)i;
			byte b1 = (byte)(i >> 8);
			byte b2 = (byte)(i >> 16);
			byte b3 = (byte)(i >> 24);
			
			if (_order == ByteOrder.BIG_ENDIAN) {
				putBytes(pos, b3, b2, b1, b0);
			} else {
				putBytes(pos, b0, b1, b2, b3);
			}
		}
	}
1063824
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setStructureNodeId($value);
                break;
            case 1:
                $this->setParentId($value);
                break;
        } // switch()

        return $this;
    }
784008
@Override
    public int getWorldAge() {
	int penalty = Timing.getInstance().REMOTE_ACCESS_PENALTY;
	log.trace("[getWorldAge] Waiting {} cycles", penalty);
	turnsControl.waitTurns(penalty, "Get World's Age");

	return world.getAge();
    }
911528
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setDependencyId($value);
                break;
            case 1:
                $this->setParentId($value);
                break;
        } // switch()

        return $this;
    }