forked from c0508383/Backhand
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix various issues #21
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…block interaction
mitchej123
reviewed
Aug 2, 2024
mitchej123
reviewed
Aug 2, 2024
This was
linked to
issues
Aug 3, 2024
…erly reset fake world & remove tile copying for now
Caedis
approved these changes
Aug 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been working fine in my playthrough
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This attempts to fix a lot of problems such as:
Previously
ignoreSetSlot
was basically always active client-side when ticking hotswap was enabled & the offhand was active. Since we only need to block that packet in very specific cases the check has been moved serverside and made a lot more selective. This also saves us from sending 2 packets to tell the client to ignore it + the one we're ignoring every tick. This fixes Inventory bugs #20, fixes Visual glitch when clearing inventory (1.5.3-pre) #16, fixes Display issue when using totem of undying and tinted arrows from EFR #11(Not 100% sure but I can't reproduce anymore)Any block that had the method
onBlockActivated()
used to be blocked from being harvested, having that method doesn't necessarily mean that the player will interact with it though. To fix that I stole the fake player & fake world from BlockRenderer6343 and use that to simulateonBlockActivated()
clientside. I have tested it with a number of blocks that can activate and it seems to work as expected but it's very possible that there are some cases where it won't. (This affected a ton of blocks from https://www.curseforge.com/minecraft/mc-mods/artifice & likely a lot of other mods)Ticking hotswap has been changed to use the actual offhand ItemStack rather than a copy. This fixes Some items do not update quantity after use (visual only) 1.5.3-pre #15
The arrow hotswap has been changed to check the
BlockDispenser.dispenseBehaviorRegistry
rather than check specifically for vanilla/EFR arrows. This should in theory allow us to support a lot more arrows/projectiles from other mods but has the funny side effect of hotswapping if you are using a bow in mainhand + armor (and a few other things) in the offhand, this doesn't affect gameplay and the bow will act as normal.On top of that a few unused mixins have been removed & some static variables that the server used to track player specific states have been moved into
OffhandExtendedProperty
.