Skip to content

Add an updated copy of refill_hotbar.sc#413

Open
WesleyJ-128 wants to merge 7 commits intognembon:masterfrom
WesleyJ-128:patch-2
Open

Add an updated copy of refill_hotbar.sc#413
WesleyJ-128 wants to merge 7 commits intognembon:masterfrom
WesleyJ-128:patch-2

Conversation

@WesleyJ-128
Copy link
Contributor

The existing refill_hotbar.sc is broken in versions 1.20.5+. This is a fix added as a new script since it is not backwards-compatible.

@gnembon
Copy link
Owner

gnembon commented Mar 28, 2025

I would suggest renaming the old one to _<old_version>, and keeping the always the new one working as with normal name.

Rename old script to reflect compatible versions (1.20.4 and below)
Rename updated script to original script name
@WesleyJ-128
Copy link
Contributor Author

WesleyJ-128 commented Mar 28, 2025

I've noticed what appears to be a client/server desync bug where the item swapped into the hotbar doesn't appear for the player if the item count is 1— the item is there, and appears once manipulated. I don't know how/if this can be fixed.

@gnembon
Copy link
Owner

gnembon commented Apr 5, 2025

Sorry, but now I am looking at it - the only difference really is in handling of the items of the sboxes. In that case this can be wrapped in a simple if based on major version number similar to
f848906
The scripts don't differ that much besides that nbt handling section
what do you think?

And that would keep one script to handle all versions

@WesleyJ-128
Copy link
Contributor Author

I like having just one script; I'll look at adding an if statement to combine the two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants