Port network to 26.1x#2598
Conversation
| mapdata.conqueredStructures.addAll(message.conqueredStructures()); | ||
|
|
||
| mapitemrenderer.update(message.inner.mapId(), mapdata); | ||
| ctx.enqueueWork(() -> { |
There was a problem hiding this comment.
Just so you know, this was an anon class instead of a lambda to avoid client side class getting classloaded on the server side. I'm not 100% sure that's still going to be the case but in case you were wondering about it here.
There was a problem hiding this comment.
Thanks, I was a bit confused about why that was there. I understand Minecraft modding can get a bit hacky at times so I added it back.
|
Going to mark this one as ready for review as well as I don't see any more changes being made without feedback. Will definitely revisit the StructureProtectionPacket once the dimension effects have been ported. |
| mapdata.conqueredStructures.addAll(message.conqueredStructures()); | ||
|
|
||
| mapitemrenderer.update(message.inner.mapId(), mapdata); | ||
| // This may or may not be equivalent to updating the renderer directly, will need testing to verify |
There was a problem hiding this comment.
How so? I inspected ClientboundMapItemDataPacket and that also calls addClientSideDecorations. Is that also not safe?
There was a problem hiding this comment.
It's probably fine. This was the first mod I have updated which had custom maps so I am not very familiar with the system. If Mojang is doing the same thing that is reassuring. If there is any trouble with it I suppose we will be able to tell what changed through Git diffs.
I updated the files under the network package to remove all of the compiler errors. I've left comments in areas where I am uncertain about actual behavior or where more work will need to be done in other parts of the mod. I would be happy to work on any edits here if requested or on updating other parts of the mod if it would be helpful. I have marked this PR as a draft due to the fact that the accuracy of a few of these changes somewhat depends on the rest of the mod being updated and tested in-game.
Here is a summary of the changes: