An attempt to normalize seed drop rate when randomTickSpeed is changed.
@@ -325,7 +325,10 @@ public class Species extends net.minecraftforge.registries.IForgeRegistryEntry.I
* @return true if seed was dropped
*/
public boolean handleVoluntaryDrops(World world, List<BlockPos> endPoints, BlockPos rootPos, BlockPos treePos, int soilLife) {
-
+ int tickSpeed = world.getGameRules().getInt("randomTickSpeed");
+ if(tickSpeed > 0) {
+ double slowFactor = 3.0 / tickSpeed;//This is an attempt to normalize voluntary drop rates.
+ if(world.rand.nextDouble() < slowFactor) {
List<ItemStack> drops = getVoluntaryDrops(world, rootPos, treePos, soilLife);
if(!drops.isEmpty() && !endPoints.isEmpty()) {
@@ -344,7 +347,8 @@ public class Species extends net.minecraftforge.registries.IForgeRegistryEntry.I
}
}
}
-
+ }
+ }
return true;
}
