NeRdTheNed / MC-TextureGen

A Java program that programatically generates textures generated by certain versions of Minecraft at runtime, and then saves them to individual files.
The Unlicense
12 stars 1 forks source link

(a0.7.0 - a0.14.1) Still lava (MT19937) #26

Open muzikbike opened 2 years ago

muzikbike commented 2 years ago

Split from #8.

While the code for generating the lava texture in Pocket Edition before v0.14.2 (the first version to implement animated texture files, making it safe enough to assume that this version removed animated textures generated by the game) was likely identical to that in Java Edition, the random number generator employed by each edition was different: Java Edition (and likely also the console editions given their matching terrain generation around TU0) used LCG for random numbers, whereas Pocket Edition, being C++-based, used MT19937 for this instead (source: Kay on the MC@H discord).

As such, while the code for generating the lava texture itself may have been the same as it was on Java Edition, between the time it was introduced to Pocket Edition all the way up to v0.14.1 (although it'd be wise to check this is actually the case, as there may be further subtle differences), different results will be produced even if starting from the same seed.

It is worth noting that while lava only started using an animation in v0.7.0 alpha, the code for generating the lava animation was still there beforehand, and it just went unused, leaving the lava placeholder texture to be used instead. I again do not know if there were any changes to the algorithm for generating lava's texture from when it was added up to its removal.