Java Code Examples for net.minecraft.init.Blocks#FURNACE

The following examples show how to use net.minecraft.init.Blocks#FURNACE . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
public static void generate(IWorldEditor editor, ItemStack fuel, boolean lit, Cardinal dir, Coord pos){

		if(!RogueConfig.getBoolean(RogueConfig.FURNITURE)) return;
		
		MetaBlock furnace;
		
		if(lit){
			furnace = new MetaBlock(Blocks.LIT_FURNACE);
		} else {
			furnace = new MetaBlock(Blocks.FURNACE);
		}
		
		furnace.withProperty(BlockFurnace.FACING, Cardinal.facing(Cardinal.reverse(dir)));
		
		furnace.set(editor, pos);
		
		if(fuel == null) return;
		
		TileEntity te = editor.getTileEntity(pos);
		if(te == null) return;
		if(!(te instanceof TileEntityFurnace)) return;
		TileEntityFurnace teFurnace = (TileEntityFurnace)te;
		teFurnace.setInventorySlotContents(FUEL_SLOT, fuel);
	}