本文整理汇总了Java中com.zerofall.ezstorage.block.BlockStorage类的典型用法代码示例。如果您正苦于以下问题:Java BlockStorage类的具体用法?Java BlockStorage怎么用?Java BlockStorage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BlockStorage类属于com.zerofall.ezstorage.block包,在下文中一共展示了BlockStorage类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scanMultiblock
import com.zerofall.ezstorage.block.BlockStorage; //导入依赖的package包/类
/**
* Scans the multiblock structure for valid blocks
*/
public void scanMultiblock() {
inventory.maxItems = 0;
this.hasCraftBox = false;
this.hasSearchBox = false;
multiblock = new HashSet<BlockRef>();
BlockRef ref = new BlockRef(this);
multiblock.add(ref);
getValidNeighbors(ref);
for (BlockRef blockRef : multiblock) {
if (blockRef.block instanceof BlockStorage) {
BlockStorage sb = (BlockStorage)blockRef.block;
inventory.maxItems += sb.getCapacity();
}
}
this.worldObj.markBlockForUpdate(pos);
}
示例2: scanMultiblock
import com.zerofall.ezstorage.block.BlockStorage; //导入依赖的package包/类
/** Scans the multiblock structure for valid blocks */
public void scanMultiblock() {
inventory.maxItems = 0;
this.hasCraftBox = false;
this.hasSearchBox = false;
this.hasSortBox = false;
multiblock = new HashSet<BlockRef>();
BlockRef ref = new BlockRef(this);
multiblock.add(ref);
getValidNeighbors(ref);
for (BlockRef blockRef : multiblock) {
if (blockRef.block instanceof BlockStorage) {
BlockStorage sb = (BlockStorage) blockRef.block;
inventory.maxItems += sb.getCapacity();
}
}
EZStorageUtils.notifyBlockUpdate(this);
}
示例3: init
import com.zerofall.ezstorage.block.BlockStorage; //导入依赖的package包/类
public static void init()
{
storage_core = new BlockStorageCore();
storage_box = new BlockStorage();
condensed_storage_box = new BlockCondensedStorage();
hyper_storage_box = new BlockHyperStorage();
input_port = new BlockInputPort();
output_port = new BlockOutputPort();
crafting_box = new BlockCraftingBox();
search_box = new BlockSearchBox();
}
示例4: init
import com.zerofall.ezstorage.block.BlockStorage; //导入依赖的package包/类
private static void init() {
blocks.join(blank_box = new BlockBlankBox(), storage_core = new BlockStorageCore(), storage_box = new BlockStorage(),
condensed_storage_box = new BlockCondensedStorage(), super_storage_box = new BlockSuperStorage(),
ultra_storage_box = new BlockUltraStorage(), hyper_storage_box = new BlockHyperStorage(), input_port = new BlockInputPort(),
output_port = new BlockEjectPort(), extract_port = new BlockExtractPort(), crafting_box = new BlockCraftingBox(),
search_box = new BlockSearchBox(), sort_box = new BlockSortBox(), access_terminal = new BlockAccessTerminal(),
security_box = new BlockSecurityBox());
if (!EZConfig.enableTerminal)
blocks.remove(access_terminal); // terminal disabled
if (!EZConfig.enableSecurity)
blocks.remove(security_box); // security disabled
}