thomas15v / NoXray

Xray prevention plugin for sponge
MIT License
9 stars 1 forks source link

[Suggestion] Randomized ore mode #10

Closed inklit closed 7 years ago

inklit commented 7 years ago

I suggest that a randomized ore mode be added. This would replace all ores/stone that the player cannot see with randomized ores in vein-sized blobs.

Unlike Orebfuscator's version, vein-sized blobs will increase compression and performance, but still reduce the effectiveness of Xray. The current mode right now is not as effective as this would be.

Do note that storing the randomized stuff in memory should not be necessary.

thomas15v commented 7 years ago

Thanks for the suggestion, but this is being worked on in #9 :smile:. I will however not recommend that mode, since this will be fairly hefty on the players internet connection while traveling blocks.

As for "random" stuff stored in memory is to make sure that chunks don't re-obfuscate for new players joining. I do not know if it would be useful to make it possible to turn that off. I see tick time as a more valuable resource than ram (however that leak was ehm not my intention xD).

thomas15v commented 7 years ago

Hmm just over-reading my code, and you are right. I store networkchunks in networkworld, but I don't do anything with networkworld. I believe I wanted to use networkworld as preparations to hide ores in caves.

inklit commented 7 years ago

The hit to compression is why I recommended vein sized blobs instead of pure random. This is a good compromise between bandwidth and anti-Xray effectiveness.

thomas15v commented 7 years ago

I am not sure if it will compress it tho. As far as I remember the code. It only does that with air.

inklit commented 7 years ago

If you are sending the data through vanilla MC's compression algorithm, which you likely are, it will compress as much as it can. This includes air, stone, ore veins, and buildings if applicable.

thomas15v commented 7 years ago

The way noxray works is by running an exact copy of the chunk data next to the chunk (Wich can be hefty on ram usage). Than I add some mixins to change the methods in the networks part of minecraft to take my modified/obfuscated data instead of the original chunkdata. So I guess that the compression will still get handled correctly if I add a vein modifier.

However since this issue is already getting handled in #9, I am closing this. If you want it to be possible to obfuscate chunks on the fly (no ram storage), you can open a new issue for that :smile:.