mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Remove check in favour of getOrDefault
This commit is contained in:
@@ -40,9 +40,6 @@ public class SaplingHack extends SimpleHack<SaplingConfig> implements Listener {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!this.config.getChanceMap().containsKey(brokenBlock.getType())) {
|
||||
return;
|
||||
}
|
||||
double nextDouble = random.nextDouble();
|
||||
if (nextDouble <= this.config.getChanceMap().getOrDefault(brokenBlock.getType(), 0.0D)) {
|
||||
brokenBlock.getWorld().dropItemNaturally(brokenBlock.getLocation(), new ItemStack(getSaplingMaterial(brokenBlock.getType()), 1));
|
||||
|
||||
Reference in New Issue
Block a user