本文整理汇总了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);
}
示例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());
}
示例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));
}
示例4: getItem
import net.minecraft.item.ItemSlab; //导入依赖的package包/类
public ItemSlab getItem() {
return item;
}
示例5: setItem
import net.minecraft.item.ItemSlab; //导入依赖的package包/类
public void setItem(ItemSlab item) {
this.item = item;
}
示例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));
}
示例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");
}