Hoppers clone items when inserting
vlad2305m opened this issue ยท 5 comments
Version Information
lithium-fabric-mc1.17.1-0.7.3
Expected Behavior
Hopper should split(1)
from the stack it is pushing.
Actual Behavior
Hopper clones the stack it is pushing, sets count to 1 and decrements the original stack.
(Congratulations on copying code from ItemStack.split(I)
method, but that doesn't help)
Reproduction Steps
Place a hopper facing into a chest
Put my Akashic Tome of Tools, morphed into a stack of somethig, into the hopper
Collect 27 Akashic tomes of that item from the chest ans see more come
Other Information
src/main/java/me/jellysquid/mods/lithium/common/hopper/HopperHelper.java
line 77-79
I wonder if it also breaks \dev\null and alike...
My mod: https://github.com/vlad2305m/AkashicTomeOfToolsFabric
Thank you! I override it to detach items from the tome. Surprisingly, almost all Minecraft uses split()
when it plans to continue using the copy, and copy()
when it just wants to cache it or directly sets slot to air.