本文整理汇总了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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}