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

The following are Jave code examples for showing how to use golden_rail() 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: ERA.java   View Source Code Vote up 6 votes
private void registerRecipe()
{
	// Fully loaded
	// Alternate item registering method
	ItemStack[] input = new ItemStack[9];

	// Top row
	input[0] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	input[1] = new ItemStack(Blocks.golden_rail, 27);	// 27 rails
	input[2] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Middle row
	input[3] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	input[4] = new ItemStack(Item.getItemFromBlock(Blocks.ender_chest));
	input[5] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Bottom row
	input[6] = new ItemStack(Item.getItemFromBlock(Blocks.tripwire_hook));
	input[7] = new ItemStack(Items.iron_ingot);
	input[8] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	        
       GameRegistry.addRecipe(new Recipe_ERA(input, new ItemStack(this)));
}
 
Example 2
Project: minecraft-quiverbow   File: ERA.java   View Source Code Vote up 6 votes
private void registerRepair()
{
	ItemStack[] repair = new ItemStack[9];
	
	// Top row
	//repair[0] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	repair[1] = new ItemStack(Blocks.golden_rail);
	//repair[2] = new ItemStack(Item.getItemFromBlock(Blocks.obsidian));
	
	// Middle row
	repair[3] = new ItemStack(Blocks.golden_rail);
	repair[4] = new ItemStack(this, 1 , this.getMaxDamage());
	repair[5] = new ItemStack(Blocks.golden_rail);
	
	// Bottom row
	repair[6] = new ItemStack(Items.redstone);
	repair[7] = new ItemStack(Items.iron_ingot);
	repair[8] = new ItemStack(Items.redstone);
	        
       GameRegistry.addRecipe(new Recipe_ERA(repair, new ItemStack(this)));
}
 
Example 3
Project: DecompiledMinecraft   File: BlockRailBase.java   View Source Code Vote up 4 votes
public static boolean isRailBlock(IBlockState state)
{
    Block block = state.getBlock();
    return block == Blocks.rail || block == Blocks.golden_rail || block == Blocks.detector_rail || block == Blocks.activator_rail;
}
 
Example 4
Project: DecompiledMinecraft   File: BlockRailBase.java   View Source Code Vote up 4 votes
public static boolean isRailBlock(IBlockState state)
{
    Block block = state.getBlock();
    return block == Blocks.rail || block == Blocks.golden_rail || block == Blocks.detector_rail || block == Blocks.activator_rail;
}
 
Example 5
Project: BaseClient   File: BlockRailBase.java   View Source Code Vote up 4 votes
public static boolean isRailBlock(IBlockState state) {
	Block block = state.getBlock();
	return block == Blocks.rail || block == Blocks.golden_rail || block == Blocks.detector_rail
			|| block == Blocks.activator_rail;
}
 
Example 6
Project: BaseClient   File: BlockRailBase.java   View Source Code Vote up 4 votes
public static boolean isRailBlock(IBlockState state)
{
    Block block = state.getBlock();
    return block == Blocks.rail || block == Blocks.golden_rail || block == Blocks.detector_rail || block == Blocks.activator_rail;
}