prism / PrismRefracted

A continuation of Prism, a change-tracking plugin for Bukkit-based servers.
Other
44 stars 23 forks source link

[BUG] Insert logs failed item moving in #6

Open Rothes opened 2 years ago

Rothes commented 2 years ago

Describe the bug E.g. When opening a furnace, Shift + Click a pickaxe in your inventory, the pickaxe is not put in the furnace, but Prism still logs it.

To Reproduce Steps to reproduce the behavior:

  1. Open a furnace.
  2. Shift + Click a pickaxe or sth else in your inventory.
  3. Inspect the furnace.

Expected behavior Not to log it.

Screenshots N/A

Server (please complete the following information):

Rothes commented 2 years ago

Investigated a little. For Hopper inserting to BrewingStand and Furnace, we are using InventoryMoveItemEvent. Javadocs say it

Called when some entity or block (e.g. hopper) tries to move items directly from one inventory to another.

So it may be fail. Schedule a task next tick, check the ItemStack's hash should fix it.