Java Code Examples for net.minecraft.init.Blocks.mycelium()

The following are Jave code examples for showing how to use mycelium() of the net.minecraft.init.Blocks class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: BlockMushroom.java   Source Code and License Vote up 5 votes
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;
    }
}
 
Example 2
Project: BaseClient   File: BlockMushroom.java   Source Code and License Vote up 5 votes
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;
    }
}
 
Example 3
Project: BaseClient   File: BetterGrass.java   Source Code and License Vote up 4 votes
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_;
    }
}
 
Example 4
Project: BaseClient   File: MapGenCaves.java   Source Code and License Vote up 4 votes
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))))))));
}
 
Example 5
Project: BaseClient   File: EntityMooshroom.java   Source Code and License Vote up 4 votes
public EntityMooshroom(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    this.spawnableBlock = Blocks.mycelium;
}
 
Example 6
Project: BaseClient   File: BetterGrass.java   Source Code and License Vote up 4 votes
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_;
    }
}
 
Example 7
Project: BaseClient   File: MapGenCaves.java   Source Code and License Vote up 4 votes
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))))))));
}
 
Example 8
Project: BaseClient   File: EntityMooshroom.java   Source Code and License Vote up 4 votes
public EntityMooshroom(World worldIn)
{
    super(worldIn);
    this.setSize(0.9F, 1.3F);
    this.spawnableBlock = Blocks.mycelium;
}