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


Java ItemSlab类代码示例

本文整理汇总了Java中net.minecraft.item.ItemSlab的典型用法代码示例。如果您正苦于以下问题:Java ItemSlab类的具体用法?Java ItemSlab怎么用?Java ItemSlab使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ItemSlab类属于net.minecraft.item包,在下文中一共展示了ItemSlab类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MaterialSlab

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
public MaterialSlab(TMResource... resources) {
	VARIANT = PropertyInteger.create("type", 0, Math.max(Math.min(resources.length - 1, 7), 1));
	half = new BlockMaterialSlab();
	full = new BlockMaterialSlab() {
		@Override
		public boolean isDouble() {
			return true;
		}
	};
	this.resources = new TMResource[Math.min(resources.length, 8)];
	for (int i = 0;i < resources.length && i < 8;i++) {
		this.resources[i] = resources[i];
		resources[i].setSlab(this);
	}
	itemBlock = new ItemSlab(half, half, full);
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:17,代码来源:MaterialSlab.java

示例2: init

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
@CustomRegistry
public static void init() {
	rubber_slab = new BlockRubberSlab.Half();
	double_rubber_slab = new BlockRubberSlab.Double();
	RebornBlockRegistry.registerBlockNoItemBlock(rubber_slab);
	RebornBlockRegistry.registerBlockNoItemBlock(double_rubber_slab);
	GameRegistry.register(new ItemSlab(rubber_slab, rubber_slab, double_rubber_slab), rubber_slab.getRegistryName());

}
 
开发者ID:TechReborn,项目名称:TechReborn3,代码行数:10,代码来源:BlockRubberSlab.java

示例3: registerSlabGroup

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
/**
 * Register a group of slab blocks
 *
 * @param slabGroup The slab group
 */
@SuppressWarnings("unchecked")
private static <
        VARIANT extends Enum<VARIANT> & IStringSerializable,
        VARIANTS extends Iterable<VARIANT> & IStringSerializable,
        SLAB extends BlockSlabAquaRegia<VARIANT, VARIANTS, SLAB>
        > void registerSlabGroup(BlockSlabAquaRegia.SlabGroup<VARIANT, VARIANTS, SLAB> slabGroup) {
    registerBlock(slabGroup.singleSlab, slab -> new ItemSlab(slab, slabGroup.singleSlab, slabGroup.doubleSlab));
    registerBlock(slabGroup.doubleSlab, null); // No item form for the double slab
    slabGroup.setItem((ItemSlab) Item.getItemFromBlock(slabGroup.singleSlab));
}
 
开发者ID:droidicus,项目名称:AquaRegia,代码行数:16,代码来源:ModBlocks.java

示例4: getItem

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
public ItemSlab getItem() {
    return item;
}
 
开发者ID:droidicus,项目名称:AquaRegia,代码行数:4,代码来源:BlockSlabAquaRegia.java

示例5: setItem

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
public void setItem(ItemSlab item) {
    this.item = item;
}
 
开发者ID:droidicus,项目名称:AquaRegia,代码行数:4,代码来源:BlockSlabAquaRegia.java

示例6: PostInit

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
@EventHandler
public void PostInit(FMLPostInitializationEvent event)
{
	Item.itemsList[DirtSlab.blockID] = (new ItemSlab(DirtSlab.blockID - 256, (BlockHalfSlab)DirtSlab, (BlockHalfSlab)DirtDoubleSlab, false));
	Item.itemsList[CherrySlab.blockID] = (new ItemSlab(CherrySlab.blockID - 256, (BlockHalfSlab)CherrySlab, (BlockHalfSlab)CherryDoubleSlab, false));
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:7,代码来源:mod_Rediscovered.java

示例7: postInit

import net.minecraft.item.ItemSlab; //导入依赖的package包/类
@EventHandler
public static void postInit( FMLPostInitializationEvent event ) {

	Item.itemsList[blastsingle.blockID] = (new ItemSlab(blastsingle.blockID - 256, (BlockHalfSlab)blastsingle, (BlockHalfSlab)blastdouble, false)).setUnlocalizedName("rubyMod:decor");
}
 
开发者ID:LanceShield,项目名称:BlastBlock,代码行数:6,代码来源:BlastBlock.java


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