Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

references to items used to recharging should turn to null instead of Air after consumption #864

Open
Filiflo opened this issue Feb 22, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@Filiflo
Copy link

Filiflo commented Feb 22, 2025

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

Image

@Filiflo Filiflo added the enhancement New feature or request label Feb 22, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Hex Casting Feb 22, 2025
@Filiflo
Copy link
Author

Filiflo commented Feb 22, 2025

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

@SamsTheNerd
Copy link
Member

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:

  1. 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?)
  2. 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.)
  3. 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.

@Filiflo
Copy link
Author

Filiflo commented Feb 22, 2025

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
Image
grabbing the item count on the same tick
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants