Conversation
This is required by Architectury Loom 1.7+
There are some *changes* changes, such as the removal of the "handleBlockBreakAck" packet handler as the packet no longer contains the block position. It probably doesn't matter though as block updates should be handled by the other packets. Another thing is the TODO now in the Cartography class as I am not certain that the behaviour is the same. May need some testing. Also removed the "xaeros-minimap" dependency as it's not used. There's a problem with the Forge client that I haven't been able to fix. It errors saying that the same package is being exported: "Modules MapSync.dev and generated_a20f2c1 export package gjum.minecraft.mapsync.common.data to module mixin.synthetic". No idea how to fix. Tempted to just switch to NeoForge.
- Packet size 2^15 -> 2^20 / 21 (~1MB) WORKING with VoxelMap
Updated README to include new features and clarify usage instructions.
|
|
||
| /** prevent Out of Memory when client sends a large packet */ | ||
| maxFrameSize = 2 ** 15; | ||
| maxFrameSize = 2 ** 21; |
There was a problem hiding this comment.
does this match the packet field? it used to be a 16 integer, not sure what it is now
There was a problem hiding this comment.
Received packets were too big and I had a reasoning for them not to match that I don't remember, so it probably should be changed by someone with more knowledge about networking
There was a problem hiding this comment.
While it may be somewhat outside the scope of a 1.21.11 update, it's something I aimed to fix with #110
| "format": "prettier -w .", | ||
| "test": "true", | ||
| "start": "node -r source-map-support/register dist/main.js", | ||
| "start": "node --security-revert=CVE-2023-46809 -r source-map-support/register dist/main.js", |
There was a problem hiding this comment.
could you add a comment why this is necessary?
https://www.cve.news/cve-2023-46809/
There was a problem hiding this comment.
I believe this is also highly dependent on the version of nodejs: iirc newer versions of nodejs will not revert this regardless of setting. This PR does update what versions of node the CI and docker uses, there's no engine restriction within this package.json itself for those who just clone and run.
There was a problem hiding this comment.
It was a quick fix-up in the beginning and got left in due to lack of networking skills
mod/common/src/main/java/gjum/minecraft/mapsync/common/net/SyncClient.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Shouldn't add IDE-specific settings files
There was a problem hiding this comment.
Sorry, I've been learning how to use git for quite a while now, but I still have fights with it
There was a problem hiding this comment.
I recommend using https://gitignore.io/ to create a gitignore file for your operating system and preferred IDEs, then setting this file as your global gitignore: https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreexcludesFile
|
Many of the changes here also introduce changes to indentation. Maybe add an .editorconfig file? |
| public static boolean isJourneyMapNotAvailable; | ||
|
|
||
| static { | ||
| try { | ||
| Class.forName("journeymap.client.JourneymapClient"); | ||
| Class<?> jmClient = Class.forName("journeymap.client.JourneymapClient"); | ||
| String version = null; | ||
| try { | ||
| // check it's a recent version | ||
| Class.forName("journeymap.client.model.NBTChunkMD"); | ||
| isJourneyMapNotAvailable = false; | ||
| } catch (NoClassDefFoundError | ClassNotFoundException ignored2) { | ||
| isJourneyMapNotAvailable = true; | ||
| System.err.println("Please update JourneyMap to at least 5.8.3"); | ||
| } | ||
| // Try to get a version field or method | ||
| try { | ||
| version = (String) jmClient.getDeclaredField("FULL_VERSION").get(null); | ||
| } catch (NoSuchFieldException e) { } | ||
| } catch (Exception ignored) {} | ||
|
|
||
| if (version != null) { | ||
| // Compare version strings as needed, e.g., "6.0.0" | ||
| if (!Pattern.compile("6\\.\\d+\\.\\d+").matcher(version).find()) { | ||
| isJourneyMapNotAvailable = true; | ||
| System.err.println("Please update JourneyMap to at least 6.0.0 (found " + version + ")"); | ||
| } else { | ||
| isJourneyMapNotAvailable = false; | ||
| } | ||
| } |
There was a problem hiding this comment.
This can be replaced with a call to the modloader to check if journeymap is loaded: the class check for NBTChunkMD seems to be because it was a new class in a new version. That was on 1.18.2. Now this is 1.21.11. Such a check is no longer necessary.
|
|
||
| static { | ||
| try { | ||
| // TODO: update when found needed |
There was a problem hiding this comment.
This was a self note
Forgot to delete after figuring out how to find the right class
| ch.pipeline().addLast( | ||
| new LengthFieldPrepender(4), | ||
| new LengthFieldBasedFrameDecoder(1 << 15, 0, 4, 0, 4), | ||
| new LengthFieldBasedFrameDecoder(1 << 20, 0, 4, 0, 4), |
There was a problem hiding this comment.
You've set the frame size here to be 2^20, but in server.ts it's now 2^21.
| InputConstants.Type.KEYSYM, | ||
| GLFW.GLFW_KEY_COMMA, | ||
| "category.map-sync" | ||
| CATEGORY |
There was a problem hiding this comment.
You'll need to update the lang file. I made the same mistake: https://codeberg.org/netherwart/CivianMods/commit/56aa0e8adc520264428f3a5a79ba073ef9c97fd2
| runtimeClasspath.extendsFrom common | ||
| developmentForge.extendsFrom common | ||
|
|
||
| // Weird fix: https://discord.com/channels/792699517631594506/792701725106634783/1272848116864909314 |
| world: pkt.world, | ||
| chunk_x: req.chunkX, | ||
| chunk_z: req.chunkX, | ||
| chunk_z: req.chunkZ, |
There was a problem hiding this comment.
Caused the whole sync to sync every chunk into a diagonal line hehe
There was a problem hiding this comment.
Not against anyone using pnpm, but now there are two lockfiles (yarn.lock and pnpm-lock.yaml), which is bad.
There was a problem hiding this comment.
I'd support switching to pnpm fully. (Or to bun ...)
There was a problem hiding this comment.
Bun would be preferable, but Bun has also completely rejects that CVE revert: you'd need to switch to a different encryption algorithm or bite the bullet and switch to websockets :P (see: #106)
There was a problem hiding this comment.
npm just straight up didn't work, so I tried pnpm
Haven't noticed that it got added to version control
At first I wasn't planning on submitting for a pull request, so sorry for it being a bit messy
Learning is a journey :)
No description provided.