Let the server decide where plants can stand

- BukkitBlockState.canPlaceOnto asks the native canSurvive rule, Iris's own table only answers without a native binding
- Keep dead bushes off grass and nothing on air
- Forget remembered answers on server resource reloads and CraftEngine reloads
- Stop the post stage from removing foliage the decorator already placed
- Test placement on Bukkit and modded against real 26.3 block tags
- Needs VolmLib piexelated/conch
This commit is contained in:
piexel committed 2026-11-25 23:26:58 +01:00
1 parent 1e04f61957
commit 202d9bbbd4
9 files changed
+155 -47

No files matched your search

@@ -58,6 +58,7 @@ import art.arcane.iris.platform.agent.AttachSignal;
import art.arcane.iris.platform.bootstrap.Bindings;
import art.arcane.iris.platform.bootstrap.ServerProperties;
import art.arcane.iris.platform.bootstrap.SlimJar;
import art.arcane.iris.platform.bukkit.BlockRulesSVC;
import art.arcane.iris.platform.bukkit.BoardSVC;
import art.arcane.iris.platform.bukkit.BukkitPlatform;
import art.arcane.iris.platform.bukkit.api.IrisApiEventSVC;
@@ -681,6 +682,7 @@ public final class IrisRuntime implements IrisPluginRuntime {
new GlobalCacheSVC(),
new LogFilterSVC(),
new ExternalDataSVC(),
new BlockRulesSVC(),
new EditSVC(),
new ObjectSVC(),
new ObjectStudioSaveService(),
@@ -0,0 +1,24 @@
package art.arcane.iris.platform.bukkit;
import art.arcane.iris.platform.bukkit.nms.INMS;
import art.arcane.iris.platform.bukkit.plugin.IrisService;
import io.papermc.paper.event.server.ServerResourcesReloadedEvent;
import org.bukkit.event.EventHandler;
/** Lets the server's placement rules apply again after a resource reload, which may have changed the block tags they read. */
public class BlockRulesSVC implements IrisService {
@Override
public void onEnable() {
}
@Override
public void onDisable() {
}
@EventHandler
public void onResourcesReloaded(ServerResourcesReloadedEvent event) {
if (INMS.isBound()) {
INMS.get().forgetBlockRules();
}
}
}