Broken Recipes with plugin created Furnace Inventories

Discussion in 'Plugin Development' started by Ross Gosling, Oct 21, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Ross Gosling

    The Issue
    I currently have the problem that I cannot fix, my plugin opens a furnace inventory for the player when they click a certain block.

    I have created my own recipes and they don't work with these furnace inventories! I really need to know how to fix this. If you even try to attempt any of the vanilla recipes like trying to smelt gold it just doesn't do anything, the items just sit there in the furnace not being smelted.

    Creating the recipes:
    Code:
    //Adds the furnace recipes to the server
     
    Server.addRecipe(new FurnaceRecipe(new ItemStack(IronIngot), Material.IRON_ORE));
    Server.addRecipe(new FurnaceRecipe(new ItemStack(CookedMeat), Material.RAW_BEEF));
    Server.addRecipe(new FurnaceRecipe(new ItemStack(CookedFish), Material.RAW_FISH));
    Opening a furnace inventory for the player:
    Code:
    //onPlayerInteractEvent
    //Click Stone for Example
     
    if(Block.getType().equals(Material.STONE)) {
                         
        Event.setCancelled(true);
                 
        Inventory FurnaceMenu = Bukkit.createInventory(Player, InventoryType.FURNACE);
                 
        Player.openInventory(FurnaceMenu);                   
    }
    
     
Thread Status:
Not open for further replies.

Share This Page