references to items used to recharging should turn to null instead of Air after consumption
Filiflo opened this issue ยท 3 comments
Describe the feature
if you recharge an item and duplicate the ref before doing so you will find out that the ref to the amethyst used for charging changes from the item to Air.
In my opinion this should be a lost reference(Null) instead of Air since that would be more in line with other occasions (e.g. player picking the referenced item up).
Additional context
after further testing I found out that it resets to null after updating it by laying down staff and reopening it or duplicating the ref. I would argue it to be more fitting to call it a bug
my guess is that it's sending the iota display texts post recharge (which likely modifies the item count but not the entity itself) but before the next tick (which is when the item ent would be nulled). The solutions then are:
- kill the item ent in recharge (could have bad effects in niche situations, first that comes to mind is maybe gloop pedestals but maybe others?)
- show empty item ents as null (probably fine but also that is a different behavior. If an empty item ent purposely existed for some reason it'd be quite confusing. Idk any situations that do that but y'know, modded mc is a weird place.)
- lag the gui by a tick? icky.
2 is probably the best solution of the 3? but I'm not sure it's a strict improvement over the current behavior.
I came back for some maybe useful info:
MC version: 1.20.1
hexcasting version: 0.11.2
It does seem tick related.
For now I can just take the item count instead but this is not very intuitive.
As far as my common sense is concerned. there shouldn't be 0 items in a stack but I can see how 1 could produce jank
"updating" the ref on the same tick

grabbing the item count on the same tick

