Beispiel #1
0
  @Override
  public boolean overrideBlock(World world, int x, int y, int z, CustomBlock customBlock) {
    int blockId = customBlock.getCustomID();
    int metaData = customBlock.getCustomMetaData();

    SpoutManager.getChunkDataManager().setBlockData(blockIdString, world, x, y, z, blockId);
    SpoutManager.getChunkDataManager().setBlockData(metaDataString, world, x, y, z, metaData);

    Player[] players = world.getPlayers().toArray(new Player[0]);

    sendBlockOverrideToPlayers(players, new BlockVector(x, y, z), blockId, metaData);

    return true;
  }
Beispiel #2
0
 @Override
 public boolean overrideBlock(Block block, CustomBlock customBlock) {
   block.setTypeId(customBlock.getRawId());
   return overrideBlock(block, customBlock.getCustomID(), customBlock.getCustomMetaData());
 }
Beispiel #3
0
 public ItemStack getCustomItemStack(CustomBlock block, int size) {
   return new ItemStack(block.getRawId(), size, (short) block.getCustomID());
 }