Duplication Sf + Itemsadders
istarengwa opened this issue ยท 21 comments
Description (Required)
Hello hello, I am explaining the current bug, which is really annoying at the time, and I do not know if the error came from you or from slimefun.
In fact, if a player puts a slimefun object in his left hand and nothing in his right hand, that he types with the right hand empty an itemsadders block, this duplicates the slimefun object held in his left hand ad infinitum, with all his content if it is a backpack.
I created a ticket on the lonedev discord which told me:
"LoneDev โ 31/05/2021
did you try contacting slimefun devs about that? i don't drop items on blocks interact
they probably are not checking if the block break event is cancelled or their blockbreak event priority is not set to MONITOR"
Steps to reproduce the Issue (Required)
i can send you the video i send to the itemsadders developer on discord if you don't mind.
Environment (Required)
- Minecraft Version: purpurclip-1149
- Slimefun Version: Dev 928 (git cccf6)
Let me know if I can do anything to directly help Slimefun devs.
(I'm ItemsAdder developer)
Hello, my problem is still there, I have slimefun dev 962 and the latest version of item adders, but now no longer need to hold in the left hand, a right click with an item slimefun on an itemadders block is enough to duplicate the item
I can't imitate it. Does it work for all blocks? I chose random three.
righ-click (open)
https://user-images.githubusercontent.com/29830635/120889822-492dc200-c5ff-11eb-80fa-b4ade174805d.mp4
left-click (destroy)
It didn't even work with cancel-break-wrong-tool.enabled: true
https://user-images.githubusercontent.com/29830635/120889615-47afca00-c5fe-11eb-9a4a-e05a1a57b9a8.mp4
IA 2.3.9
(Sometimes I could update addons :D but it's just a test server, so I don't deal with it much)
Hello, I'm responding a little late but there are no itemadders in your plugin list, and the duplication bug is specifically related to this plugin
what? however, you can see in the video that it is an itemsadder (ESC, blocks, thirst bar) and IA does not show in sf versions, but I'll try it again tomorrow where I'll even write about itemsadder.
to the topic: have you only tried it with IA (and the necessary plugins) and sf?
do /pl to provide the complete plugin list
I did the test only with ia + sf plugins and it always does the same duplication, here is my /pl
https://zupimages.net/viewer.php?id=21/36/vv1h.png
I use purpur for fork (purpurclip-1378) https://ci.pl3x.net/job/Purpur/1378/
another example video with left click on block :
I just tried with the fork paper and the problem is still there
this only happens on "real-note" blocks so blocks that use note blocks but not on real note blocks
the ticket on the itemadders github is here: PluginBugs/Issues-ItemsAdder#1162
Thanks for the reply that this is happening on real_note. I could not duplicate the backpack, it was "destroyed", but the ingots could be duplicated.
2021-09-11.12-27-15.mp4
2021-09-11.12-35-28.mp4
Purpur 1.17.1 1382, SF DEV - 968, IA 2.4.15
Does the problem occurs also using vanilla items?
https://user-images.githubusercontent.com/29830635/132944985-2d7ede8e-d667-441e-b1e7-4b90f64fd654.mp4
I can't find any reason why itemsadder would make this behaviour only with slimefun items, i don't even implement their api to handle their items in any way
@LoneDev6 looks like you might've been right about your NMS code
@LoneDev6 looks like you might've been right about your NMS code
Very good, I hope it's the issue so it's "easier" for me to fix since I've already identified the possible cause.
I'll fix this in the next days
@Sfiguz7
Added a check for slimefun item, now it's working fine!
No duplication bug anymore.
if(Main.hasSlimefun)
{
NBTItem tmp = new NBTItem(itemStack);
if(tmp.hasNBTData() && tmp.hasKey("PublicBukkitValues")
&& tmp.getCompound("PublicBukkitValues").hasKey("slimefun:slimefun_item"))
{
return;
}
}
I'll release an update in the next hours.
Anyway I think this issue happens because Slimefun is not cancelling the PlayerInteractEvent, so ItemsAdder will process it anyway even if: @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
.
For now I'll keep this workaround
I'll release an update in the next hours.
Is it fixed then? Shall we close this issue?
Anyway I think this issue happens because Slimefun is not cancelling the PlayerInteractEvent, so ItemsAdder will process it anyway even if:
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
.For now I'll keep this workaround
If you ignoreCancelled it should not matter whether we cancel or not, unless you check for isCancelled() and do nothing if it's true at which point you could simply remove the ignoreCancelled flag
Apparently this has been fixed since oct 4th 2021 #3100 (comment)
I don't understand the issue, could you please record it and show /sf versions
in the recording.
https://www.casimages.com/i/21060203195761697.png.html
I updated the plugin in the meantime but it still does the same thing
I can't imitate it. Does it work for all blocks? I chose random three.
righ-click (open)
https://user-images.githubusercontent.com/29830635/120889822-492dc200-c5ff-11eb-80fa-b4ade174805d.mp4
left-click (destroy)
It didn't even work with cancel-break-wrong-tool.enabled: true
https://user-images.githubusercontent.com/29830635/120889615-47afca00-c5fe-11eb-9a4a-e05a1a57b9a8.mp4
IA 2.3.9
(Sometimes I could update addons :D but it's just a test server, so I don't deal with it much)
i also got the same problem
https://youtu.be/VLi1WgwzS2w