Skip to content

Commit

Permalink
Invert probability checking booleans in PlantListener
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Dec 22, 2024
1 parent 2a70a71 commit 03614a8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private void handleHarvest(@NotNull Block block, @NotNull DrugPlantData data) {

final double probabilityHarvest = meta.harvestSuccessProbability();
final int amountHarvest = meta.harvestAmount();
final boolean harvest = this.random.nextDouble() >= probabilityHarvest;
final boolean harvest = this.random.nextDouble() <= probabilityHarvest;
if (!harvest) {
return;
}
Expand All @@ -185,7 +185,7 @@ private void handleHarvest(@NotNull Block block, @NotNull DrugPlantData data) {
final int amountSeed = meta.seedDropAmount();
final boolean dropSeeds;
if (optionalSeed.isPresent()) {
dropSeeds = this.random.nextDouble() >= probabilitySeedDrop;
dropSeeds = this.random.nextDouble() <= probabilitySeedDrop;
} else {
dropSeeds = false;
}
Expand Down

0 comments on commit 03614a8

Please sign in to comment.