예제 #1
0
 /**
  * Sets the block id, data and auxData for the block at (x, y, z), if the current data matches the
  * expected data.<br>
  * <br>
  *
  * @param x the x coordinate
  * @param y the y coordinate
  * @param z the z coordinate
  * @param expect the expected block value
  * @param newValue the new block value
  * @return true if the block was set
  */
 public final boolean compareAndSetBlock(
     int x, int y, int z, BlockFullState<T> expect, BlockFullState<T> newValue) {
   return compareAndSetBlock(
       x,
       y,
       z,
       expect.getId(),
       expect.getData(),
       expect.getAuxData(),
       newValue.getId(),
       newValue.getData(),
       newValue.getAuxData());
 }
예제 #2
0
 /**
  * Sets the block id, data and auxData for the block at (x, y, z).<br>
  * <br>
  * If the data is 0 and the auxData is null, then the block will be stored as a single short.<br>
  *
  * @param x the x coordinate
  * @param y the y coordinate
  * @param z the z coordinate
  * @param fullState the new state of the Block
  */
 public final void setBlock(int x, int y, int z, BlockFullState<T> fullState) {
   setBlock(x, y, z, fullState.getId(), fullState.getData(), fullState.getAuxData());
 }