package com.alttd.fishingevent.objects; import java.util.Random; public class CustomRandom { private static final Random random = new Random(); public static int generateNumber(int min, int max, int attempts) { int highestValue = 0; for (int i = 0; i < attempts; i++) { int tmp = Math.min(max, random.nextInt(min, max + 1)); if (tmp > highestValue) highestValue = tmp; } return highestValue; } }