Keep custom leaves from decaying and from cutting logs

- Let external providers make a block persistent and report block tags
- Make CraftEngine leaves with a persistent property keep their leaves when decay is prevented
- Count CraftEngine blocks with the logs and leaves tags as logs and leaves
- Skip leaf placements that would replace a log another object placed
- Make object placement persist leaves by their persistent property, not their distance property
This commit is contained in:
piexel committed 2026-11-19 19:56:49 +01:00
1 parent 3b9cb4ce91
commit 6fb25fb53e
22 files changed
+402 -10

No files matched your search

@@ -208,12 +208,21 @@ public final class StubPlatform implements IrisPlatform {
@Override
public boolean isTreeBlock() {
return isLog() || isLeaves();
}
@Override
public boolean isLog() {
String blockKey = blockKey();
return blockKey.endsWith("_log")
|| blockKey.endsWith("_wood")
|| blockKey.endsWith("_stem")
|| blockKey.endsWith("_hyphae")
|| blockKey.endsWith("_leaves");
|| blockKey.endsWith("_hyphae");
}
@Override
public boolean isLeaves() {
return blockKey().endsWith("_leaves");
}
@Override