lundi 7 mai 2018

Using javascript to find minecraft slime chunks?

So as the question states, I'm trying to use javascript to find slime chunks for minecraft. On the wiki, they have the following code:

Random rnd = new Random(seed +
                    (long) (xPosition * xPosition * 0x4c1906) +
                    (long) (xPosition * 0x5ac0db) + 
                    (long) (zPosition * zPosition) * 0x4307a7L +
                    (long) (zPosition * 0x5f24f) ^ 0x3ad8025f);
return rnd.nextInt(10) == 0;

How would I transfer this to javascript? Javascript doesn't have the "Random" class, so I know I have to do this without it.

I've been looking at this, but I'd like something a little more simple than that.

Any ideas?

Aucun commentaire:

Enregistrer un commentaire