Let the server decide where plants stand

- Ask the native canSurvive rule in BukkitBlockState.canPlaceOnto
- Fall back to the block table when the rule cannot answer
- Clear remembered answers on resource and CraftEngine reloads
- Drop the post stage foliage check that never saw decorations
- Test vanilla placement rules, fallbacks and concurrent lookups
This commit is contained in:
Piexel authored and GitHub committed 2026-11-30 11:06:48 -05:00
1 parent 1bc7843a52
commit f7084b244f
6 files changed
+310 -9

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();
}
}
}