@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; }
@Override public boolean overrideBlock(Block block, CustomBlock customBlock) { block.setTypeId(customBlock.getRawId()); return overrideBlock(block, customBlock.getCustomID(), customBlock.getCustomMetaData()); }
public ItemStack getCustomItemStack(CustomBlock block, int size) { return new ItemStack(block.getRawId(), size, (short) block.getCustomID()); }