这是什么意思?
  • 板块灌水区
  • 楼主LIANZHENG_SCHOOL
  • 当前回复16
  • 已保存回复16
  • 发布时间2021/2/19 18:03
  • 上次更新2023/11/5 03:02:03
查看原帖
这是什么意思?
349033
LIANZHENG_SCHOOL楼主2021/2/19 18:03
import java.util.Random; 

public class checkSlimechunk{ 

    public static void main(String args[]) 
    { 
        // the seed from /seed as a 64bit long literal
        long seed = 12345L;
        int xPosition = 123;
        int zPosition = 456;

        Random rnd = new Random(
                seed +
                (int) (xPosition * xPosition * 0x4c1906) +
                (int) (xPosition * 0x5ac0db) +
                (int) (zPosition * zPosition) * 0x4307a7L +
                (int) (zPosition * 0x5f24f) ^ 0x3ad8025f
        );

        System.out.println(rnd.nextInt(10) == 0);
    } 
}
2021/2/19 18:03
加载中...