From 4c7277e85a2bee976d78ceca6d3323b25109c7b9 Mon Sep 17 00:00:00 2001 From: tastybento Date: Thu, 4 Apr 2024 16:25:18 -0700 Subject: [PATCH 1/2] Version 1.5.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 97e3814..4afacf5 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ ${build.version}-SNAPSHOT - 1.5.0 + 1.5.1 -LOCAL bentobox-world https://sonarcloud.io From 19077d5fd339f2aff058b6d87bb4fdba96bad4f3 Mon Sep 17 00:00:00 2001 From: tastybento Date: Thu, 4 Apr 2024 16:25:41 -0700 Subject: [PATCH 2/2] Prevents extra dirt being created when tree is grown. Fixes #33 --- .../world/bentobox/twerk/listeners/TreeGrowListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java b/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java index 96025ca..2c340d4 100644 --- a/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java +++ b/src/main/java/world/bentobox/twerk/listeners/TreeGrowListener.java @@ -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; @@ -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); }