當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockPlanks.EnumType方法代碼示例

本文整理匯總了Java中net.minecraft.block.BlockPlanks.EnumType方法的典型用法代碼示例。如果您正苦於以下問題:Java BlockPlanks.EnumType方法的具體用法?Java BlockPlanks.EnumType怎麽用?Java BlockPlanks.EnumType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.block.BlockPlanks的用法示例。


在下文中一共展示了BlockPlanks.EnumType方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readCustomNBT

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@Override
public void readCustomNBT(NBTTagCompound nbt){
	super.readCustomNBT(nbt);
	for(EnumFacing facing : EnumFacing.HORIZONTALS){
		if(nbt.hasKey(facing.getName().toLowerCase())){
			NBTTagCompound nbtFace = nbt.getCompoundTag(facing.getName().toLowerCase());
			if(nbtFace.hasKey("BaseType")){
				int type = nbtFace.getInteger("BaseType");
				BlockPlanks.EnumType base = BlockPlanks.EnumType.byMetadata(type);
				setBase(facing, base);
			}
			else if(nbtFace.hasKey("HasBase")){
				setBase(facing, BlockPlanks.EnumType.OAK);
			}
			else {
				setBase(facing, null);
			}
			//setBase(facing, nbtFace.getBoolean("HasBase"));
			setPost(facing, 0, nbtFace.getBoolean("HasLeftPost"));
			setPost(facing, 1, nbtFace.getBoolean("HasRightPost"));
			setPost(facing, 2, nbtFace.getBoolean("HasTopPost"));
		}
	}
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:25,代碼來源:TileBridge.java

示例2: onSaplingGrow

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@SubscribeEvent
public void onSaplingGrow(SaplingGrowTreeEvent ev)
{
    IBlockState state = ev.getWorld().getBlockState(ev.getPos());
    Block block = state.getBlock();
    if (block == Blocks.sapling)
    {
        BlockPlanks.EnumType type = state.getValue(BlockSapling.TYPE);

        switch (type)
        {
            case OAK:
                ev.setResult(Event.Result.DENY);
                new BirchTreeGenerator().generateTreeAt(ev.getWorld(), ev.getPos(), ev.getRand());
                break;
        }
    }
}
 
開發者ID:gigaherz,項目名稱:NaturalTrees,代碼行數:19,代碼來源:NaturalTrees.java

示例3: setBase

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
public void setBase(EnumFacing side, BlockPlanks.EnumType type){
	if(type == null){
		bases.remove(side);
	} else{
		bases.put(side, type);
	}
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:8,代碼來源:TileBridge.java

示例4: getWoodType

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@Override
@Nullable
public BlockPlanks.EnumType getWoodType(int meta)
{
    //Required, but the list is too restrictive, need to override getMetaFromState to work around.
    return null;
}
 
開發者ID:Othlon,項目名稱:CherryPig,代碼行數:8,代碼來源:CPCherryLeaf.java

示例5: getType

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
private static BlockPlanks.EnumType getType(Wood type){
	
	switch(type){
	case OAK: return BlockPlanks.EnumType.OAK;
	case SPRUCE: return BlockPlanks.EnumType.SPRUCE;
	case BIRCH: return BlockPlanks.EnumType.BIRCH;
	case JUNGLE: return BlockPlanks.EnumType.JUNGLE;
	case ACACIA: return BlockPlanks.EnumType.ACACIA;
	case DARKOAK: return BlockPlanks.EnumType.DARK_OAK;
	default: return BlockPlanks.EnumType.OAK;
	}		
}
 
開發者ID:Greymerk,項目名稱:minecraft-roguelike,代碼行數:13,代碼來源:Leaves.java

示例6: getWoodType

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@Override
public BlockPlanks.EnumType getWoodType(int meta) {
    return null;
}
 
開發者ID:Boethie,項目名稱:Genesis,代碼行數:5,代碼來源:BlockGenesisLeaves.java

示例7: getWoodType

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@Override
public BlockPlanks.EnumType getWoodType(int meta) {
	return null;
}
 
開發者ID:TechReborn,項目名稱:TechReborn3,代碼行數:5,代碼來源:BlockRubberLeaves.java

示例8: init

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@Override
public void init() {
    if(SOFT_WOODS)
    {
        StumpingHandler.addSoftWood(Blocks.LOG,BlockPlanks.EnumType.SPRUCE.getMetadata(),1.3f);
        StumpingHandler.addSoftWood(Blocks.LOG,BlockPlanks.EnumType.JUNGLE.getMetadata(),1.0f);
        StumpingHandler.addSoftWood(Blocks.LOG2,BlockPlanks.EnumType.DARK_OAK.getMetadata() - 4,1.3f);
    }

    if(ASH_FERTILIZER) {
        HCBonemeal.registerFertilzier(ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.POTASH));
        HCBonemeal.registerFertilzier(ModItems.materialTweak.getMaterial("ash"));
    }

    GameRegistry.addRecipe(new ShapelessOreRecipe(ModItems.materialTweak.getMaterial("ink_and_quill"),new ItemStack(Items.GLASS_BOTTLE),new ItemStack(Items.DYE,1,EnumDyeColor.BLACK.getDyeDamage()),"feather"));

    if(REPLACE_WRITABLE_BOOK_RECIPE)
    {
        BetterWithAddons.removeCraftingRecipe(new ItemStack(Items.WRITABLE_BOOK));
        GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.WRITABLE_BOOK),new ItemStack(Items.BOOK),ModItems.materialTweak.getMaterial("ink_and_quill")));
    }

    if(WOOL_RECYCLING && InteractionBWM.HARDCORE_SHEARING)
    {
        for (EnumDyeColor color: EnumDyeColor.values()) {
            StokedCauldronManager.getInstance().addRecipe(new ItemStack(BWMBlocks.AESTHETIC,1,BlockAesthetic.EnumType.WICKER.getMeta()), ModItems.wool.getByColor(color,4), new Object[]{ new ItemStack(Blocks.WOOL,1,color.getMetadata()) });
        }
    }

    if(SAW_RECYCLING)
    {
        SawManager.INSTANCE.addRecipe(Blocks.BOOKSHELF,0,new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.OAK.getMetadata()),new ItemStack(Items.BOOK,3));
        SawManager.INSTANCE.addRecipe(Blocks.CHEST,0,new ItemStack(BWMBlocks.WOOD_SIDING, 6, BlockPlanks.EnumType.OAK.getMetadata()));
        SawManager.INSTANCE.addRecipe(Blocks.JUKEBOX,0,new ItemStack(BWMBlocks.WOOD_SIDING, 6, BlockPlanks.EnumType.OAK.getMetadata()),new ItemStack(Items.DIAMOND,1));
        SawManager.INSTANCE.addRecipe(Blocks.LADDER,0,new ItemStack(Items.STICK,2));
        SawManager.INSTANCE.addRecipe(Blocks.NOTEBLOCK,0,new ItemStack(BWMBlocks.WOOD_SIDING, 6, BlockPlanks.EnumType.OAK.getMetadata()),new ItemStack(Items.REDSTONE,1));
        SawManager.INSTANCE.addRecipe(Blocks.TRAPDOOR,0,new ItemStack(BWMBlocks.WOOD_SIDING, 2, BlockPlanks.EnumType.OAK.getMetadata()));
        SawManager.INSTANCE.addRecipe(BWMBlocks.AXLE,0,new ItemStack(BWMBlocks.WOOD_CORNER, 2, BlockPlanks.EnumType.OAK.getMetadata()),new ItemStack(BWMBlocks.ROPE,1));
        SawManager.INSTANCE.addRecipe(BWMBlocks.BELLOWS,0,new ItemStack(BWMBlocks.WOOD_SIDING, 2, BlockPlanks.EnumType.OAK.getMetadata()), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.LEATHER_BELT), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.GEAR), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.TANNED_LEATHER_CUT,3));
        SawManager.INSTANCE.addRecipe(BWMBlocks.GEARBOX,0,new ItemStack(BWMBlocks.WOOD_SIDING, 3, BlockPlanks.EnumType.OAK.getMetadata()), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.GEAR,3), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.REDSTONE_LATCH));
        SawManager.INSTANCE.addRecipe(BWMBlocks.SINGLE_MACHINES, BlockMechMachines.EnumType.HOPPER.getMeta() << 1,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.OAK.getMetadata()), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.GEAR,1), new ItemStack(Blocks.WOODEN_PRESSURE_PLATE,1));
        SawManager.INSTANCE.addRecipe(BWMBlocks.PLATFORM,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.OAK.getMetadata()), new ItemStack(BWMBlocks.PANE,2,2));
        SawManager.INSTANCE.addRecipe(BWMBlocks.SINGLE_MACHINES, BlockMechMachines.EnumType.PULLEY.getMeta() << 1,new ItemStack(BWMBlocks.WOOD_SIDING, 3, BlockPlanks.EnumType.OAK.getMetadata()), new ItemStack(Items.IRON_INGOT), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.GEAR), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.REDSTONE_LATCH));
        SawManager.INSTANCE.addRecipe(BWMBlocks.SAW,0,new ItemStack(BWMBlocks.WOOD_SIDING, 1, BlockPlanks.EnumType.OAK.getMetadata()), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.LEATHER_BELT), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.GEAR), new ItemStack(Items.IRON_INGOT, 2));
        SawManager.INSTANCE.addRecipe(BWMBlocks.PUMP,0,new ItemStack(BWMBlocks.WOOD_SIDING, 3, BlockPlanks.EnumType.OAK.getMetadata()), ItemMaterial.getMaterial(ItemMaterial.EnumMaterial.SCREW), new ItemStack(BWMBlocks.GRATE, 1, BlockPlanks.EnumType.OAK.getMetadata()));

        BlockPlanks.EnumType[] woodtypes = BlockPlanks.EnumType.values();
        int len = woodtypes.length;

        for(int i = 0; i < len; ++i) {
            BlockPlanks.EnumType woodtype = woodtypes[i];

            SawManager.INSTANCE.addRecipe(BWMBlocks.WOOD_BENCH,woodtype.getMetadata(),new ItemStack(BWMBlocks.WOOD_CORNER, 2, woodtype.getMetadata()));
            SawManager.INSTANCE.addRecipe(BWMBlocks.WOOD_TABLE,woodtype.getMetadata(),new ItemStack(BWMBlocks.WOOD_CORNER, 3, woodtype.getMetadata()));
        }

        SawManager.INSTANCE.addRecipe(new DisplaySawRecipe(Blocks.OAK_DOOR,0,Arrays.asList(new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.OAK.getMetadata())),new ItemStack(Items.OAK_DOOR)));
        SawManager.INSTANCE.addRecipe(new DisplaySawRecipe(Blocks.BIRCH_DOOR,0,Arrays.asList(new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.BIRCH.getMetadata())),new ItemStack(Items.BIRCH_DOOR)));
        SawManager.INSTANCE.addRecipe(new DisplaySawRecipe(Blocks.SPRUCE_DOOR,0,Arrays.asList(new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.SPRUCE.getMetadata())),new ItemStack(Items.SPRUCE_DOOR)));
        SawManager.INSTANCE.addRecipe(new DisplaySawRecipe(Blocks.JUNGLE_DOOR,0,Arrays.asList(new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.JUNGLE.getMetadata())),new ItemStack(Items.JUNGLE_DOOR)));
        SawManager.INSTANCE.addRecipe(new DisplaySawRecipe(Blocks.ACACIA_DOOR,0,Arrays.asList(new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.ACACIA.getMetadata())),new ItemStack(Items.ACACIA_DOOR)));
        SawManager.INSTANCE.addRecipe(new DisplaySawRecipe(Blocks.DARK_OAK_DOOR,0,Arrays.asList(new ItemStack(BWMBlocks.WOOD_SIDING, 4, BlockPlanks.EnumType.DARK_OAK.getMetadata())),new ItemStack(Items.DARK_OAK_DOOR)));

        SawManager.INSTANCE.addRecipe(Blocks.OAK_FENCE_GATE,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.OAK.getMetadata()));
        SawManager.INSTANCE.addRecipe(Blocks.BIRCH_FENCE_GATE,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.BIRCH.getMetadata()));
        SawManager.INSTANCE.addRecipe(Blocks.SPRUCE_FENCE_GATE,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.SPRUCE.getMetadata()));
        SawManager.INSTANCE.addRecipe(Blocks.JUNGLE_FENCE_GATE,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.JUNGLE.getMetadata()));
        SawManager.INSTANCE.addRecipe(Blocks.ACACIA_FENCE_GATE,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.ACACIA.getMetadata()));
        SawManager.INSTANCE.addRecipe(Blocks.DARK_OAK_FENCE_GATE,0,new ItemStack(BWMBlocks.WOOD_MOULDING, 3, BlockPlanks.EnumType.DARK_OAK.getMetadata()));
    }
}
 
開發者ID:DaedalusGame,項目名稱:BetterWithAddons,代碼行數:72,代碼來源:InteractionBTWTweak.java

示例9: getBase

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
public BlockPlanks.EnumType getBase(EnumFacing side){
	return bases.getOrDefault(side, null);
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:4,代碼來源:TileBridge.java

示例10: getLogSprite

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
public TextureAtlasSprite getLogSprite(BlockPlanks.EnumType type, boolean top){
	if(type == null)return RenderUtil.getMissingSprite();
	if(top)return RenderUtil.getSprite("minecraft:blocks/log_"+type.getUnlocalizedName().toLowerCase()+"_top");
    return RenderUtil.getSprite("minecraft:blocks/log_"+type.getUnlocalizedName().toLowerCase());
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:6,代碼來源:ModelBridge.java

示例11: getWoodType

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
@Override
public BlockPlanks.EnumType getWoodType(int meta) {
    return BlockPlanks.EnumType.OAK;
}
 
開發者ID:InfinityStudio,項目名稱:InspiringWorld,代碼行數:5,代碼來源:BlockEnderLeaves.java

示例12: apply

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
public boolean apply(BlockPlanks.EnumType type)
{
	return type.getMetadata() >= 4;
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:5,代碼來源:BlockReinforcedNewLog.java

示例13: apply

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
public boolean apply(BlockPlanks.EnumType type)
{
	return type.getMetadata() < 4;
}
 
開發者ID:Geforce132,項目名稱:SecurityCraft,代碼行數:5,代碼來源:BlockReinforcedOldLog.java

示例14: BlockPaintedFenceGate

import net.minecraft.block.BlockPlanks; //導入方法依賴的package包/類
protected BlockPaintedFenceGate(@Nonnull IModObject modObject, BlockPlanks.EnumType material) {
  super(material);
  Prep.setNoCreativeTab(this);
  modObject.apply(this);
  setSoundType(SoundType.WOOD);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:7,代碼來源:BlockPaintedFenceGate.java


注:本文中的net.minecraft.block.BlockPlanks.EnumType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。