Anchor changes #456
No reviewers
Labels
No labels
Area-Assets
Area-Backend
Area-Conduits
Area-Datapacks
Area-Lang
Area-Mod Compat
Area-Parity
Area-Rendering
Good first issue
MC-1.19.2
MC-1.20.1
MC-1.20.4
MC-1.20.6
MC-1.21
MC-1.21.1
Modtoberfest
P-0-High
P-1-Medium
P-2-Low
Status-Awaiting Response
Status-Behind-Flag
Status-Blocked
Status-Cannot Reproduce
Status-Duplicate
Status-Help Wanted
Status-Incomplete Report
Status-Invalid
Status-Needs LTS Backport
Status-Needs Updating
Status-Stale
Status-To Implement
Status-Triage
Status-Wontfix
Status-Wontmerge
Type-Backport
Type-Bug
Type-Documentation
Type-Enhancement
Type-Question
Type-RFC
Type-Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Team-EnderIO/EnderIO#456
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "anchorchanges"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Resets the client collection of targets when changing a dimension
Fix syncing of the name to the server/client
Closes #454
Todo
Checklist:
@ -28,23 +38,27 @@ public class TravelSavedData extends SavedData {}public TravelSavedData(CompoundTag nbt) {Since the client can only be in one dimension at a time, it might be better to keep just one TravelSaveData instance and clear it every time the player changes dimensions.
If the block is actually removed on the server, this method should also be called on the client?
@ -28,23 +38,27 @@ public class TravelSavedData extends SavedData {}public TravelSavedData(CompoundTag nbt) {This was done due to me thinking that there is a case where an anchor could still be loaded in one dimension while the player is in the other. While then rejoining the level, the anchor would not be readded to the client list. I am however now wondering if this behaviour can happen, as the client might actually have 1 world where blocks exist, while all the others are removed. I will verify this.
To test this, I built a nether portal at spawn chunks and placed a beacon beside it. I had one player stay in the overworld and the other would travel to the nether. #setRemoved was not called on the Beacon for my nether player when they entered the nether. It was also not called when my overworld player destroyed the beacon while the nether player was still in the nether, and it was not called when the nether player returned to the overworld.
EDIT: The same thing happens outside of spawn chunks too.
Seems this is indeed the case, I didn't expect that. I converted it back to a draft and will see to remove these oddities.
Hmm, it is called in singleplayer when leaving the dimension. Servers seem to react a bit differently, but there is an oddity I first need to deal with.
Looks like this is almost there, just need to fix the block item rendering (see discord)
Looking good, thanks a lot to both Ferri and chonky :)