Conversation
R00tB33rMan
left a comment
There was a problem hiding this comment.
Raw region NBT is parsed without chunkMap.upgradeChunkTag first, unlike ChunkLoadTask.runOffMain, so chunks saved under an older data version render wrong or throw. (Currently uncertain)
| + private static final Predicate<BlockState> IS_ORE = (state) -> | ||
| + state.is(BlockTags.COPPER_ORES) | ||
| + || state.is(BlockTags.IRON_ORES) | ||
| + || state.is(BlockTags.GOLD_ORES) |
There was a problem hiding this comment.
A few notes that we'll need to likely tackle:
OLD_ORES (which includes nether gold ore) is replaced with STONE in the nether while ancient debris gets the netherrack special case, also that emerald ore, deepslate emerald ore and nether quartz ore are not in IS_ORE, given fake packets skip anti-xray entirely, and that the "bottom half is truncated" assumption in clearOres only holds when hollowChunks is on, so hideOres alone puts stone specks into deepslate
There was a problem hiding this comment.
This is something I want to improve in general via a customizable map of sorts in the config to let servers configure their own block "hide" or "replace" mechanics.
You are correct. Fixed. |
|
Will there be a way to detect fake chunks from the plugin-side? I do a lot of chunk packet modifying in my plugin and I think it'd be better to skip that logic for fake chunks given that the more authoritative chunk packet will be sent if the player gets close. |
|
You could check the |
Just some sort of lightweight way to flag it as a fake chunk so I can bypass my expensive logic for it. Preferably it'd be one of
|
|
Do u have access to the NMS object instance of the packet in your plugin? |
|
I'm using packetevents so unfortunately not currently. If you decide to store the flag on the NMS object though, I could add a canvas-specific path to access it and check for the flag then implement option 2 myself, so if that's the easiest way then it works for me. |
This will be made into a base patch soon, but I need to extract the per-world-distance system too, since this is based somewhat on that system.
This adds a new "fake chunk" system to Canvas, sending out fake chunks to extend the view distance of the client without actually loading any chunks on the server. One caveat is that this only reads already generated chunks from disk, and does not generate new chunks, meaning this will only really be beneficial for servers that are pre-generated.
This needs some production testing, and a few more things need to be done, but the base implementation is done. This also has builtin "hollowing" of chunks to try and set as much of the chunk to air as possible to try and reduce bandwidth as much as possible. At the time of creating this PR bandwidth for these chunks seems to be cut anywhere between 35-65%, and hopefully it will be a bit better later.