Skip to content

Commit

Permalink
33 prevent extra dirt (#34)
Browse files Browse the repository at this point in the history
* Version 1.5.1

* Prevents extra dirt being created when tree is grown. Fixes #33
  • Loading branch information
tastybento committed Apr 4, 2024
1 parent e32afaa commit a7e548c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.5.0</build.version>
<build.version>1.5.1</build.version>
<build.number>-LOCAL</build.number>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.bukkit.event.world.StructureGrowEvent;
import org.eclipse.jdt.annotation.NonNull;

import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.lists.Flags;
import world.bentobox.bentobox.util.Util;
Expand Down Expand Up @@ -134,8 +135,9 @@ protected void growTree(Block b) {
b.setType(Material.AIR);

if (b.getWorld().generateTree(b.getLocation(), RAND, type,
bs -> Flags.TREES_GROWING_OUTSIDE_RANGE.isSetForWorld(bs.getWorld())
|| addon.getIslands().getProtectedIslandAt(bs.getLocation()).isPresent())) {
bs -> bs.getType() != Material.DIRT
&& (Flags.TREES_GROWING_OUTSIDE_RANGE.isSetForWorld(bs.getWorld())
|| addon.getIslands().getProtectedIslandAt(bs.getLocation()).isPresent()))) {
if (addon.getSettings().isEffectsEnabled()) {
showSparkles(b);
}
Expand Down

0 comments on commit a7e548c

Please sign in to comment.