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

The following are Jave code examples for showing how to use glowstone() 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.
+ Save this method
Example 1
Project: minecraft-quiverbow   File: FenFire.java   View Source Code Vote up 6 votes
@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);
}
 
Example 2
Project: DecompiledMinecraft   File: WorldGenGlowStone1.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 3
Project: DecompiledMinecraft   File: WorldGenGlowStone2.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 4
Project: DecompiledMinecraft   File: BlockRedstoneWire.java   View Source Code Vote up 4 votes
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
{
    return World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) || worldIn.getBlockState(pos.down()).getBlock() == Blocks.glowstone;
}
 
Example 5
Project: DecompiledMinecraft   File: BlockTrapDoor.java   View Source Code Vote up 4 votes
private static boolean isValidSupportBlock(Block blockIn)
{
    return blockIn.blockMaterial.isOpaque() && blockIn.isFullCube() || blockIn == Blocks.glowstone || blockIn instanceof BlockSlab || blockIn instanceof BlockStairs;
}
 
Example 6
Project: DecompiledMinecraft   File: WorldGenGlowStone1.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 7
Project: DecompiledMinecraft   File: WorldGenGlowStone2.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 8
Project: DecompiledMinecraft   File: BlockRedstoneWire.java   View Source Code Vote up 4 votes
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
{
    return World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) || worldIn.getBlockState(pos.down()).getBlock() == Blocks.glowstone;
}
 
Example 9
Project: DecompiledMinecraft   File: BlockTrapDoor.java   View Source Code Vote up 4 votes
private static boolean isValidSupportBlock(Block blockIn)
{
    return blockIn.blockMaterial.isOpaque() && blockIn.isFullCube() || blockIn == Blocks.glowstone || blockIn instanceof BlockSlab || blockIn instanceof BlockStairs;
}
 
Example 10
Project: BaseClient   File: WorldGenGlowStone1.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 11
Project: BaseClient   File: WorldGenGlowStone2.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 12
Project: BaseClient   File: BlockRedstoneWire.java   View Source Code Vote up 4 votes
public boolean canPlaceBlockAt(World worldIn, BlockPos pos) {
	return World.doesBlockHaveSolidTopSurface(worldIn, pos.down())
			|| worldIn.getBlockState(pos.down()).getBlock() == Blocks.glowstone;
}
 
Example 13
Project: BaseClient   File: BlockTrapDoor.java   View Source Code Vote up 4 votes
private static boolean isValidSupportBlock(Block blockIn)
{
    return blockIn.blockMaterial.isOpaque() && blockIn.isFullCube() || blockIn == Blocks.glowstone || blockIn instanceof BlockSlab || blockIn instanceof BlockStairs;
}
 
Example 14
Project: BaseClient   File: WorldGenGlowStone1.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 15
Project: BaseClient   File: WorldGenGlowStone2.java   View Source Code Vote up 4 votes
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;
    }
}
 
Example 16
Project: BaseClient   File: BlockRedstoneWire.java   View Source Code Vote up 4 votes
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
{
    return World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) || worldIn.getBlockState(pos.down()).getBlock() == Blocks.glowstone;
}
 
Example 17
Project: BaseClient   File: BlockTrapDoor.java   View Source Code Vote up 4 votes
private static boolean isValidSupportBlock(Block blockIn)
{
    return blockIn.blockMaterial.isOpaque() && blockIn.isFullCube() || blockIn == Blocks.glowstone || blockIn instanceof BlockSlab || blockIn instanceof BlockStairs;
}