Fix wheat modifier potentially crashing

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot 2013-01-16 11:09:27 +11:00
parent e846f2fe27
commit dd7cd24332

View file

@ -36,7 +36,7 @@ index 4d3b448..815e050 100644
float f = this.l(world, i, j, k);
- if (random.nextInt((int) ((world.growthOdds * 100 / world.getWorld().wheatGrowthModifier / 25.0F) / f) + 1) == 0) { // Spigot
+ if (random.nextInt((int) (world.growthOdds / world.getWorld().wheatGrowthModifier * ((25.0F / f) + 1))) == 0) { // Spigot
+ if (random.nextInt((int) (world.growthOdds / world.getWorld().wheatGrowthModifier * (25.0F / f)) + 1) == 0) { // Spigot
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, i, j, k, this.id, ++l); // CraftBukkit
}
}