Optimizing a bit

This commit is contained in:
2026-02-08 09:41:00 +02:00
parent b3b8011fe7
commit 605a4ebfe2

View File

@@ -32,7 +32,7 @@ public class SimpleMobSpawningOptimizer extends JavaPlugin implements Listener {
int currentSimulationDistance = getSimulationDistance(); int currentSimulationDistance = getSimulationDistance();
int normalSimulationDistance = 10; int normalSimulationDistance = 10;
double mobPercentage = (Math.PI * Math.pow(currentSimulationDistance, 2)) / (Math.PI * Math.pow(normalSimulationDistance, 2)); double mobPercentage = Math.pow(currentSimulationDistance, 2) / Math.pow(normalSimulationDistance, 2);
if (random.nextDouble() > mobPercentage) { if (random.nextDouble() > mobPercentage) {
event.setCancelled(true); event.setCancelled(true);