当前位置: 首页>>代码示例>>Java>>正文


Java BlockStorage类代码示例

本文整理汇总了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);
}
 
开发者ID:zerofall,项目名称:EZStorage,代码行数:20,代码来源:TileEntityStorageCore.java

示例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);
}
 
开发者ID:zerofall,项目名称:EZStorage2,代码行数:19,代码来源:TileEntityStorageCore.java

示例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();
}
 
开发者ID:zerofall,项目名称:EZStorage,代码行数:12,代码来源:EZBlocks.java

示例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
}
 
开发者ID:zerofall,项目名称:EZStorage2,代码行数:13,代码来源:EZBlocks.java


注:本文中的com.zerofall.ezstorage.block.BlockStorage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。