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


Java Blocks.mycelium方法代碼示例

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


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

示例1: canBlockStay

import net.minecraft.init.Blocks; //導入方法依賴的package包/類
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
{
    if (pos.getY() >= 0 && pos.getY() < 256)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos.down());
        return iblockstate.getBlock() == Blocks.mycelium ? true : (iblockstate.getBlock() == Blocks.dirt && iblockstate.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.PODZOL ? true : worldIn.getLight(pos) < 13 && this.canPlaceBlockOn(iblockstate.getBlock()));
    }
    else
    {
        return false;
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:13,代碼來源:BlockMushroom.java

示例2: func_175793_a

import net.minecraft.init.Blocks; //導入方法依賴的package包/類
protected boolean func_175793_a(IBlockState p_175793_1_, IBlockState p_175793_2_)
{
    return p_175793_1_.getBlock() == Blocks.stone ? true : (p_175793_1_.getBlock() == Blocks.dirt ? true : (p_175793_1_.getBlock() == Blocks.grass ? true : (p_175793_1_.getBlock() == Blocks.hardened_clay ? true : (p_175793_1_.getBlock() == Blocks.stained_hardened_clay ? true : (p_175793_1_.getBlock() == Blocks.sandstone ? true : (p_175793_1_.getBlock() == Blocks.red_sandstone ? true : (p_175793_1_.getBlock() == Blocks.mycelium ? true : (p_175793_1_.getBlock() == Blocks.snow_layer ? true : (p_175793_1_.getBlock() == Blocks.sand || p_175793_1_.getBlock() == Blocks.gravel) && p_175793_2_.getBlock().getMaterial() != Material.water))))))));
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:5,代碼來源:MapGenCaves.java

示例3: EntityMooshroom

import net.minecraft.init.Blocks; //導入方法依賴的package包/類
public EntityMooshroom(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    this.spawnableBlock = Blocks.mycelium;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:7,代碼來源:EntityMooshroom.java

示例4: getFaceQuads

import net.minecraft.init.Blocks; //導入方法依賴的package包/類
public static List getFaceQuads(IBlockAccess p_getFaceQuads_0_, Block p_getFaceQuads_1_, BlockPos p_getFaceQuads_2_, EnumFacing p_getFaceQuads_3_, List p_getFaceQuads_4_)
{
    if (p_getFaceQuads_3_ != EnumFacing.UP && p_getFaceQuads_3_ != EnumFacing.DOWN)
    {
        if (p_getFaceQuads_1_ instanceof BlockMycelium)
        {
            return Config.isBetterGrassFancy() ? (getBlockAt(p_getFaceQuads_2_.down(), p_getFaceQuads_3_, p_getFaceQuads_0_) == Blocks.mycelium ? modelCubeMycelium.getFaceQuads(p_getFaceQuads_3_) : p_getFaceQuads_4_) : modelCubeMycelium.getFaceQuads(p_getFaceQuads_3_);
        }
        else
        {
            if (p_getFaceQuads_1_ instanceof BlockGrass)
            {
                Block block = p_getFaceQuads_0_.getBlockState(p_getFaceQuads_2_.up()).getBlock();
                boolean flag = block == Blocks.snow || block == Blocks.snow_layer;

                if (!Config.isBetterGrassFancy())
                {
                    if (flag)
                    {
                        return modelCubeGrassSnowy.getFaceQuads(p_getFaceQuads_3_);
                    }

                    return modelCubeGrass.getFaceQuads(p_getFaceQuads_3_);
                }

                if (flag)
                {
                    if (getBlockAt(p_getFaceQuads_2_, p_getFaceQuads_3_, p_getFaceQuads_0_) == Blocks.snow_layer)
                    {
                        return modelCubeGrassSnowy.getFaceQuads(p_getFaceQuads_3_);
                    }
                }
                else if (getBlockAt(p_getFaceQuads_2_.down(), p_getFaceQuads_3_, p_getFaceQuads_0_) == Blocks.grass)
                {
                    return modelCubeGrass.getFaceQuads(p_getFaceQuads_3_);
                }
            }

            return p_getFaceQuads_4_;
        }
    }
    else
    {
        return p_getFaceQuads_4_;
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:47,代碼來源:BetterGrass.java


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