Files
OldSliceMC/Spigot-Server-Patches
stonar96 0bad695802 Make engine-mode 2 truly random
Up to now a simple counter variable was used to iterate through the
hidden-blocks in engine-mode 2 while obfuscating. This results in low
quality obfuscation.

One could for example easily write a hack, which bypasses Anti-Xray
by not showing ores, which have a certain pattern.

Furthermore, engine-mode 1 is slightly optimized by this commit.
However, engine-mode 2 is probably somewhat slower. I did some tests but
I wasn't able to get stable results for some reason. Therefore this
needs further testing.

An optimized random algorithm is utilized to pick random blocks from the
hidden-blocks list. This implementation uses xorshift and integer
multiplication for bounding. The resulting distribution is negligibly
biased because xorshift doesn't generate 0 and integer multiplication
also implies biased results.
2020-08-28 13:20:21 +02:00
..
2020-08-24 22:40:19 -04:00
2020-08-24 22:40:19 -04:00
2020-08-24 22:40:19 -04:00
2020-08-24 22:40:19 -04:00