Here you can find the source of getOreMultiplier(int fortune, Random r)
private static int getOreMultiplier(int fortune, Random r)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static int getOreMultiplier(int fortune, Random r) { switch (fortune) { case 1://from ww w. j av a 2 s. c o m return r.nextInt(3) == 0 ? 2 : 1; case 2: switch (r.nextInt(4)) { case 0: return 2; case 1: return 3; default: return 1; } case 3: switch (r.nextInt(4)) { case 0: return 2; case 1: return 3; case 2: return 4; default: return 1; } default: return 1; } } }