Exemple #1
0
  @Override
  public void setCuboid(int x, int y, int z, CuboidBlockMaterialBuffer buffer, Cause<?> cause) {
    if (cause == null) {
      throw new NullPointerException("Cause can not be null");
    }
    CuboidChangeEvent event = new CuboidChangeEvent(buffer, cause);
    getEngine().getEventManager().callEvent(event);
    if (event.isCancelled()) {
      return;
    }

    SpoutChunk[][][] chunks = getChunks(x, y, z, buffer);

    setCuboid(chunks, x, y, z, buffer, cause);
  }
Exemple #2
0
 @Override
 public void setCuboid(CuboidBlockMaterialBuffer buffer, Cause<?> cause) {
   Vector3 base = buffer.getBase();
   setCuboid(base.getFloorX(), base.getFloorY(), base.getFloorZ(), buffer, cause);
 }