[SPIGOT-6401] FurnaceExtractEvent does not fire after player right clicks furnace output Created: 24/Mar/21  Updated: 29/Mar/21

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Ben Swartzlander Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File FurnaceExtractLogger.tar.gz    
Version: This server is running CraftBukkit version 3028-Spigot-79d53c2-7eb3564 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
Plugin: FurnaceExtractLogger (see attached)
Guidelines Read: Yes

 Description   

If a player right clicks on the output of a furnace, the player receives half of the items in that stack, and a FurnaceExtractEvent fires. However after this happens, the next click on the same furnace output does not cause any event to fire unless the furnace has updated the output by burning more items.

To reproduce:

  1. Install attached plugin
  2. Log in a player
  3. Make a furnace
  4. Smelt two cobblestone to stone
  5. Right click the furnace output to pick up one stone
  6. Notice the log message on the console
  7. Right or left click the remaining furnace output to remove it
  8. Notice no message is logged, because the event did not fire

If you smelt 3 items, and remove one of them after the second completes smelting, then remove the remaining 2 after the third completes smelting, both events fire. Something strange occurs after right clicking the furnace output though. It does not matter if you close the furnace window and reopen it.



 Comments   
Comment by Ben Swartzlander [ 29/Mar/21 ]

I will try to accomplish it with InventoryClickEvent. I suppose it's fine to close this bug.

Comment by md_5 [ 29/Mar/21 ]

Or InventoryClickEvent?

Comment by Black Hole [ 29/Mar/21 ]

You could use the Minecraft statistics to keep track of this.
Since smelting can be automated and one player could put items in a furnace while another player takes them out, it's not easy to define what you will count.

Comment by Ben Swartzlander [ 28/Mar/21 ]

Thanks for an explanation of why this is. This creates a problem for me because I want to write a plugin that counts how many items each player smelts and how many items each player crafts. Are these things not possible with the current event API?

Comment by md_5 [ 28/Mar/21 ]

FurnaceExtractEvent fires when the experience is given.
You will notice the first right click gives experience for all the items, not just those you click out. This happens in Vanilla as well.
Changing this event behaviour would either 1) break the exp set/get functionality of the event; or 2) change vanilla behaviour

Generated at Wed Apr 02 10:57:35 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.