Optimizing a bit
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user