<Zidane> Faithcaio, we should focus more on making sure the inventory events are being fired
<Zidane> and the lookup methods are all working
<Zidane> (So we can put Inventory behind us for the most part, lol!)_
? extends TargetInventoryEvent
Unable to find InventoryPacketState handler for click window packet: CPacketClickWindow{windowId=0, slotId=23, usedButton=0, actionNumber=82, clickedItem=1xtile.air@0, mode=CLONE}EntityItem#onCollideWithPlayer before (current) and after addItemStackToInventoryrelated Events:
DropItemEvent
Related Issues:
https://github.com/SpongePowered/SpongeAPI/issues/1558 EventFilter for single Transaction
https://github.com/SpongePowered/SpongeAPI/issues/1051 Hopper Event
https://github.com/SpongePowered/SpongeCommon/issues/1309 Event for /give
https://github.com/SpongePowered/SpongeCommon/issues/1363 DropItemEvent.Pre cancel (check if done)
https://github.com/SpongePowered/SpongeCommon/issues/1037 DropItemEvent.Pre not fired in some cases (done)
https://github.com/SpongePowered/SpongeCommon/issues/1019 ClickInventoryEvent.Drop subclasses not fired (done)
Listener for Testing:
https://gist.github.com/anonymous/b120b44dae28f8d874b85821cc093577
My testing had pretty much the same results.
I did have one issue though: org.spongepowered.api.event.item.inventory.ChangeInventoryEvent.Held needs some work I think or at least more clarification on the documentation. Maybe I am just misunderstanding it though.
At the moment it states "Fired when a Living changes it's held ItemStack", which makes it seem like it would occur anytime what they are holding changes. But when they pick up something into the slot it does not fire, nor when they move something from an inventory into that hotbar slot. It only fires when they change what slot they have selected.
This can be handled with other events, so maybe just the documentation should change.
Some more related issues:
https://github.com/SpongePowered/SpongeCommon/issues/1309
https://github.com/SpongePowered/SpongeCommon/issues/1363
https://github.com/SpongePowered/SpongeCommon/issues/1037
https://github.com/SpongePowered/SpongeCommon/issues/1019
https://github.com/SpongePowered/SpongeAPI/issues/1051
For the equipment events to be implemented properly, the EquipmentInventoryAdapter needs to be implemented. I tried starting to do so, but it's quite confusing...
Just needed to add Slots with EquipmentSlotType to the EquimentInventoryLens and then use query to get the slots.
It only works if you query for the exact EquipmentType. so e.g. EquipmentTypes.ANY will return nothing.
@Faithcaio You should also add an event for toggling on and off dualwielding
https://github.com/prism/Prism/issues/11
Looks almost close enough to start getting this into prism?
Guessing this https://github.com/SpongePowered/SpongeAPI/issues/1282 is also another related issue, and can be represented with the current/planned inventory API events.
Per the request of @Faithcaio, I'd like to add that it would be useful if events were added when an enchantment is applied to an item in an enchanting table and when items are repaired/renamed in an anvil.
@Zerthick I am handling enchanting along with some other enchant events/changes.
The recently merged ChangeEntityEquipmentEvent was the last missing one.
For Enchant Event there is another issue: https://github.com/SpongePowered/SpongeAPI/issues/1303