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


Java MapColor類代碼示例

本文整理匯總了Java中net.minecraft.block.material.MapColor的典型用法代碼示例。如果您正苦於以下問題:Java MapColor類的具體用法?Java MapColor怎麽用?Java MapColor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: getMapColor

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
/**
 * Get the MapColor for this Block and the given BlockState
 */
public MapColor getMapColor(IBlockState state)
{
    switch ((BlockHugeMushroom.EnumType)state.getValue(VARIANT))
    {
        case ALL_STEM:
            return MapColor.clothColor;

        case ALL_INSIDE:
            return MapColor.sandColor;

        case STEM:
            return MapColor.sandColor;

        default:
            return super.getMapColor(state);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:21,代碼來源:BlockHugeMushroom.java

示例2: EnumType

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
private EnumType(int p_i46389_3_, String p_i46389_4_, String p_i46389_5_, MapColor p_i46389_6_)
{
    this.meta = p_i46389_3_;
    this.name = p_i46389_4_;
    this.unlocalizedName = p_i46389_5_;
    this.field_181071_k = p_i46389_6_;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockPlanks.java

示例3: BlockGemrock

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
public BlockGemrock(String name, EnumDyeColor dyeColor) {
	super(Material.ROCK, MapColor.getBlockColor(dyeColor));
	
	this.setRegistryName("gemrock."+name);
	this.setUnlocalizedName("thermionics_world.gemrock."+name);
	
	this.setHarvestLevel("pickaxe", 1);
	this.setHardness(1.5f);
	this.setResistance(25f);
	
	this.setCreativeTab(ThermionicsWorld.TAB_THERMIONICS_WORLD);
	
	this.setDefaultState(blockState.getBaseState().withProperty(BlockVarieties.VARIANT, 0));
}
 
開發者ID:elytra,項目名稱:ThermionicsWorld,代碼行數:15,代碼來源:BlockGemrock.java

示例4: getMapColor

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
/**
 * Get the MapColor for this Block and the given BlockState
 */
public MapColor getMapColor(IBlockState state)
{
    BlockPlanks.EnumType blockplanks$enumtype = (BlockPlanks.EnumType)state.getValue(VARIANT);

    switch ((BlockLog.EnumAxis)state.getValue(LOG_AXIS))
    {
        case X:
        case Z:
        case NONE:
        default:
            switch (blockplanks$enumtype)
            {
                case OAK:
                default:
                    return BlockPlanks.EnumType.SPRUCE.func_181070_c();

                case SPRUCE:
                    return BlockPlanks.EnumType.DARK_OAK.func_181070_c();

                case BIRCH:
                    return MapColor.quartzColor;

                case JUNGLE:
                    return BlockPlanks.EnumType.SPRUCE.func_181070_c();
            }

        case Y:
            return blockplanks$enumtype.func_181070_c();
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:34,代碼來源:BlockOldLog.java

示例5: BlockNetherWart

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
protected BlockNetherWart()
{
    super(Material.plants, MapColor.redColor);
    this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0)));
    this.setTickRandomly(true);
    float f = 0.5F;
    this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
    this.setCreativeTab((CreativeTabs)null);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:10,代碼來源:BlockNetherWart.java

示例6: BlockNetherWart

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
protected BlockNetherWart()
{
    super(Material.PLANTS, MapColor.RED);
    this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0)));
    this.setTickRandomly(true);
    this.setCreativeTab((CreativeTabs)null);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:8,代碼來源:BlockNetherWart.java

示例7: EnumType

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
private EnumType(int meta, String name, String unlocalizedName, MapColor mapColor)
{
    this.meta = meta;
    this.name = name;
    this.mapColor = mapColor;
    this.unlocalizedName = unlocalizedName;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockSand.java

示例8: BlockContainerBase

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
public BlockContainerBase(Material materialIn, MapColor color, String name, float hardness, float resistance) {
	super(materialIn, color);
	setUnlocalizedName(name);
	setRegistryName(name);
	setResistance(resistance);
	setHardness(hardness);
	GameRegistry.register(this);
	GameRegistry.register(new ItemBlock(this), getRegistryName());
}
 
開發者ID:p455w0rd,項目名稱:DankNull,代碼行數:10,代碼來源:BlockContainerBase.java

示例9: DirtType

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
private DirtType(int metadataIn, String nameIn, String unlocalizedNameIn, MapColor color)
{
    this.metadata = metadataIn;
    this.name = nameIn;
    this.unlocalizedName = unlocalizedNameIn;
    this.color = color;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:8,代碼來源:BlockDirt.java

示例10: BlockPumpkin

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
protected BlockPumpkin()
{
    super(Material.gourd, MapColor.adobeColor);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockPumpkin.java

示例11: getMapColor

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
/**
 * Get the MapColor for this Block and the given BlockState
 */
public MapColor getMapColor(IBlockState state)
{
    BlockPlanks.EnumType blockplanks$enumtype = (BlockPlanks.EnumType)state.getValue(VARIANT);

    switch ((BlockLog.EnumAxis)state.getValue(LOG_AXIS))
    {
        case X:
        case Z:
        case NONE:
        default:

            switch (blockplanks$enumtype)
            {
                case OAK:
                default:
                    return BlockPlanks.EnumType.SPRUCE.getMapColor();
                case SPRUCE:
                    return BlockPlanks.EnumType.DARK_OAK.getMapColor();
                case BIRCH:
                    return MapColor.QUARTZ;
                case JUNGLE:
                    return BlockPlanks.EnumType.SPRUCE.getMapColor();
            }

        case Y:
            return blockplanks$enumtype.getMapColor();
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:32,代碼來源:BlockOldLog.java

示例12: BlockPumpkin

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
protected BlockPumpkin()
{
    super(Material.GOURD, MapColor.ADOBE);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:8,代碼來源:BlockPumpkin.java

示例13: BlockBush

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
protected BlockBush(Material p_i46452_1_, MapColor p_i46452_2_)
{
    super(p_i46452_1_, p_i46452_2_);
    this.setTickRandomly(true);
    float f = 0.2F;
    this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f);
    this.setCreativeTab(CreativeTabs.tabDecorations);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:9,代碼來源:BlockBush.java

示例14: BlockBone

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
public BlockBone()
{
    super(Material.ROCK, MapColor.SAND);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
    this.setHardness(2.0F);
    this.setSoundType(SoundType.STONE);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:8,代碼來源:BlockBone.java

示例15: Block

import net.minecraft.block.material.MapColor; //導入依賴的package包/類
public Block(Material p_i46399_1_, MapColor p_i46399_2_) {
	this.enableStats = true;
	this.stepSound = soundTypeStone;
	this.blockParticleGravity = 1.0F;
	this.slipperiness = 0.6F;
	this.blockMaterial = p_i46399_1_;
	this.field_181083_K = p_i46399_2_;
	this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
	this.fullBlock = this.isOpaqueCube();
	this.lightOpacity = this.isOpaqueCube() ? 255 : 0;
	this.translucent = !p_i46399_1_.blocksLight();
	this.blockState = this.createBlockState();
	this.setDefaultState(this.blockState.getBaseState());
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:15,代碼來源:Block.java


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