net.minecraft.block.BlockStone Java Examples

The following examples show how to use net.minecraft.block.BlockStone. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomizableOreGen.java    From AdvancedRocketry with MIT License 6 votes vote down vote up
public boolean apply(IBlockState p_apply_1_)
{
	if (p_apply_1_ != null) {
		if(p_apply_1_.getBlock() == Blocks.STONE)
		{
			BlockStone.EnumType blockstone$enumtype = (BlockStone.EnumType)p_apply_1_.getValue(BlockStone.VARIANT);
			return blockstone$enumtype.isNatural();
		} 
		else if(p_apply_1_.getBlock() == state.getBlock())
		{
			return true;
		}
	}
	
	return false;
}
 
Example #2
Source File: GTBedrockOreMineable.java    From GT-Classic with GNU Lesser General Public License v3.0 5 votes vote down vote up
public boolean apply(IBlockState state) {
	if (state != null && state.getBlock() == Blocks.STONE) {
		BlockStone.EnumType type = (BlockStone.EnumType) state.getValue(BlockStone.VARIANT);
		return type.isNatural();
	} else {
		return false;
	}
}
 
Example #3
Source File: Recipes.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
public static void init()
{
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.hammerWood, new Object[] { " x ", " yx", "y  ", 'x', "plankWood", 'y', "stickWood"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.hammerStone, new Object[] { " x ", " yx", "y  ", 'x', "cobblestone", 'y', "stickWood"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.hammerIron, new Object[] { " x ", " yx", "y  ", 'x', "ingotIron", 'y', "stickWood"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.hammerGold, new Object[] { " x ", " yx", "y  ", 'x', "ingotGold", 'y', "stickWood"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.hammerDiamond, new Object[] { " x ", " yx", "y  ", 'x', "gemDiamond", 'y', "stickWood"}));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.crookWood, new Object[] { "xx"," x"," x", 'x', "stickWood"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(ENItems.crookBone, new Object[] { "xx"," x"," x", 'x', Items.BONE}));
	
	if (Config.enableBarrels)
	{
           GameRegistry.addRecipe(new ShapedOreRecipe(ENBlocks.barrelWood, new Object[] {"x x","x x", "xyx", 'x', "plankWood", 'y', "slabWood"}));
           
           GameRegistry.addRecipe(new ShapedOreRecipe(ENBlocks.barrelStone, new Object[] {"x x","x x", "xyx", 'x', new ItemStack(Blocks.STONE), 'y', new ItemStack(Blocks.STONE_SLAB)}));
	}
	if (Config.enableCrucible) {
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENBlocks.crucible, 1, 0), new Object[] {"x x","x x","xxx", 'x', "clayPorcelain"}));
		FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(ENBlocks.crucible, 1, 0), new ItemStack(ENBlocks.crucible, 1, 1), 0.7f);
	}
       GameRegistry.addRecipe(new ShapedOreRecipe(Blocks.COBBLESTONE, new Object[] {"xx","xx", 'x', ItemPebble.getPebbleStack("stone")}));
       GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.GRANITE.ordinal()), new Object[] {"xx","xx", 'x', ItemPebble.getPebbleStack("granite")}));
       GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.DIORITE.ordinal()), new Object[] {"xx","xx", 'x', ItemPebble.getPebbleStack("diorite")}));
       GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.STONE, 1, BlockStone.EnumType.ANDESITE.ordinal()), new Object[] {"xx","xx", 'x', ItemPebble.getPebbleStack("andesite")}));
	GameRegistry.addShapelessRecipe(ItemResource.getResourceStack("porcelain_clay"), new ItemStack(Items.CLAY_BALL), new ItemStack(Items.DYE, 1, 15));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(ENBlocks.sieve, new Object[] {"x x","xyx","z z", 'z', "plankWood", 'y', "slabWood", 'z', "stickWood"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENItems.mesh, 1, 1), new Object[] {"xxx","xxx","xxx", 'x', Items.STRING}));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENItems.mesh, 1, 2), new Object[] {"x x","xyx","x x", 'x', Items.FLINT, 'y', new ItemStack(ENItems.mesh, 1, 1)}));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENItems.mesh, 1, 3), new Object[] {"x x","xyx","x x", 'x', Items.IRON_INGOT, 'y', new ItemStack(ENItems.mesh, 1, 2)}));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENItems.mesh, 1, 4), new Object[] {"x x","xyx","x x", 'x', Items.DIAMOND, 'y', new ItemStack(ENItems.mesh, 1, 3)}));
	
	FurnaceRecipes.instance().addSmeltingRecipe(ItemResource.getResourceStack("silkworm"), new ItemStack(ENItems.cookedSilkworm), 0.7f);
	
	GameRegistry.addRecipe(new ShapedOreRecipe(ItemResource.getResourceStack("doll", 4), new Object[] {"xyx"," x ", "x x", 'x', "clayPorcelain", 'y', "gemDiamond"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(ItemResource.getResourceStack("doll", 6), new Object[] {"xyx"," x ", "x x", 'x', "clayPorcelain", 'y', "gemEmerald"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENItems.dolls, 1, 0), new Object[] {"xyx", "zwz", "xvx", 'x', Items.BLAZE_POWDER, 'v', Items.NETHER_WART, 'w', ItemResource.getResourceStack("doll"), 'y', "dustRedstone", 'z', "dustGlowstone"}));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ENItems.dolls, 1, 1), new Object[] {"xyx", "zwz", "xvx", 'v', Items.NETHER_WART, 'x', "dyeBlack", 'w', ItemResource.getResourceStack("doll"), 'y', "dustRedstone", 'z', "dustGlowstone"}));
}
 
Example #4
Source File: BastionsLairGenerator.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
protected void placeTombBlock() {
	block = null;

	radiusSq = (x * x) + (z * z);

	if (isOutside()) {
		return;

	} else if (isWall() || isRoof()) {
		block = Blocks.STONE.getDefaultState();

	} else if (isFloor()) {
		block = Blocks.DIRT.getDefaultState();

	} else if (isPlatform()) {

		if (isPlatformUnderstructure()) {
			if (isHiddenUnderPlatformChest()) {
				block = Blocks.CHEST.getDefaultState();
			} else {
				block = Blocks.DIRT.getDefaultState();
			}
		} else if (isPlatformEdge()) {
			block = Blocks.STONE.getDefaultState().withProperty(BlockStone.VARIANT, BlockStone.EnumType.DIORITE_SMOOTH);
		} else {
			block = Blocks.STONE.getDefaultState().withProperty(BlockStone.VARIANT, BlockStone.EnumType.ANDESITE_SMOOTH);
		}

	} else if (isWalkway()) {

		if (isWalkwayEdge()) {
			block = Blocks.STONE.getDefaultState().withProperty(BlockStone.VARIANT, BlockStone.EnumType.DIORITE_SMOOTH);
		} else {
			block = Blocks.STONE.getDefaultState().withProperty(BlockStone.VARIANT, BlockStone.EnumType.ANDESITE_SMOOTH);
		}

	} else if (isWalkwayTorch()) {
		block = Blocks.REDSTONE_TORCH.getDefaultState();

	} else if (isWalkwaySubstructure()) {
		block = Blocks.DIRT.getDefaultState();

	} else if (isLootChest()) {
		block = randomChest();
	} else {
		block = Blocks.AIR.getDefaultState();
	}

	placeBlock();
	addLootToChest();
}