当前位置: 首页>>代码示例>>Java>>正文


Java Blocks.glowstone方法代码示例

本文整理汇总了Java中net.minecraft.init.Blocks.glowstone方法的典型用法代码示例。如果您正苦于以下问题:Java Blocks.glowstone方法的具体用法?Java Blocks.glowstone怎么用?Java Blocks.glowstone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.init.Blocks的用法示例。


在下文中一共展示了Blocks.glowstone方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addRecipes

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
@Override
public void addRecipes()
{
	if (this.Enabled)
	{
		// One Fen Fire (empty)
		GameRegistry.addRecipe(new ItemStack(this, 1 , this.getMaxDamage()), "di ", "i i", " ts",
				't', Blocks.tripwire_hook,
				'i', Items.iron_ingot,
				's', Blocks.sticky_piston,
				'd', Blocks.trapdoor
				);
	}
	else if (Main.noCreative) { this.setCreativeTab(null); }	// Not enabled and not allowed to be in the creative menu

	ItemStack stack = new ItemStack(Blocks.glowstone);

	Helper.makeAmmoRecipe(stack, 1, 4, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 2, 8, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 3, 12, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 4, 16, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 5, 20, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 6, 24, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 7, 28, this.getMaxDamage(), this);
	Helper.makeAmmoRecipe(stack, 8, 32, this.getMaxDamage(), this);
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:27,代码来源:FenFire.java

示例2: generate

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
public boolean generate(World worldIn, Random rand, BlockPos position)
{
    if (!worldIn.isAirBlock(position))
    {
        return false;
    }
    else if (worldIn.getBlockState(position.up()).getBlock() != Blocks.netherrack)
    {
        return false;
    }
    else
    {
        worldIn.setBlockState(position, Blocks.glowstone.getDefaultState(), 2);

        for (int i = 0; i < 1500; ++i)
        {
            BlockPos blockpos = position.add(rand.nextInt(8) - rand.nextInt(8), -rand.nextInt(12), rand.nextInt(8) - rand.nextInt(8));

            if (worldIn.getBlockState(blockpos).getBlock().getMaterial() == Material.air)
            {
                int j = 0;

                for (EnumFacing enumfacing : EnumFacing.values())
                {
                    if (worldIn.getBlockState(blockpos.offset(enumfacing)).getBlock() == Blocks.glowstone)
                    {
                        ++j;
                    }

                    if (j > 1)
                    {
                        break;
                    }
                }

                if (j == 1)
                {
                    worldIn.setBlockState(blockpos, Blocks.glowstone.getDefaultState(), 2);
                }
            }
        }

        return true;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:46,代码来源:WorldGenGlowStone1.java

示例3: canPlaceBlockAt

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
{
    return World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) || worldIn.getBlockState(pos.down()).getBlock() == Blocks.glowstone;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BlockRedstoneWire.java

示例4: isValidSupportBlock

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
private static boolean isValidSupportBlock(Block blockIn)
{
    return blockIn.blockMaterial.isOpaque() && blockIn.isFullCube() || blockIn == Blocks.glowstone || blockIn instanceof BlockSlab || blockIn instanceof BlockStairs;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BlockTrapDoor.java

示例5: canPlaceBlockAt

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
public boolean canPlaceBlockAt(World worldIn, BlockPos pos) {
	return World.doesBlockHaveSolidTopSurface(worldIn, pos.down())
			|| worldIn.getBlockState(pos.down()).getBlock() == Blocks.glowstone;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:BlockRedstoneWire.java


注:本文中的net.minecraft.init.Blocks.glowstone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。