Skip to content

Commit

Permalink
Merge pull request #3678 from J3fftw1/fix-3577
Browse files Browse the repository at this point in the history
fixed 3677
  • Loading branch information
TheBusyBiscuit authored Oct 4, 2022
2 parents 485d212 + 61f5492 commit 7b9d769
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ private void replant(@Nonnull Block block) {
}
}

if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_19)) {
switch (logType) {
case MANGROVE_LOG:
case STRIPPED_MANGROVE_LOG:
saplingType = Material.MANGROVE_PROPAGULE;
soilRequirement = SlimefunTag.MANGROVE_BASE_BLOCKS::isTagged;
break;
default:
break;
}
}

if (saplingType != null && soilRequirement != null) {
if (soilRequirement.test(block.getRelative(BlockFace.DOWN).getType())) {
// Replant the block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ public enum SlimefunTag implements Tag<Material> {
*/
FUNGUS_SOIL,

/**
* All block types for mangrove to grow on.
* This includes all dirt variants, mud and clay.
*/
MANGROVE_BASE_BLOCKS,

/**
* All variants of concrete powder.
* Can you believe there is no tag for this already?
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/tags/mangrove_base_blocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"values" : [
"#slimefun:dirt_variants",
"minecraft:clay",
"minecraft:mud"
]
}

0 comments on commit 7b9d769

Please sign in to comment.