Drop unreachable plan waits

- Sapling growth, Bukkit and modded object paste and Bukkit structure place no longer catch ProvisionalAnswerException, since explicit-Y placement never reaches the provisional guard
- The three retry messages are removed from the message catalogs and every bundled language
- Bukkit structure place records its changes for /iris object undo after a successful placement, as the modded command does
- The sapling test that reached the catch through a throwing tree is removed
This commit is contained in:
Brian Neumann-Fopiano committed 2026-11-02 06:21:42 -05:00
1 parent e15dcceca0
commit cabfca700a
24 files changed
+20 -136

No files matched your search

@@ -33,7 +33,6 @@ import art.arcane.iris.studio.wand.WandSVC;
import art.arcane.iris.pack.IrisConverter;
import art.arcane.iris.studio.tree.TreePlausibilizeBatch;
import art.arcane.iris.generation.runtime.Engine;
import art.arcane.iris.generation.stream.ProvisionalAnswerException;
import art.arcane.iris.structure.object.IObjectPlacer;
import art.arcane.iris.generation.terrain.IrisDimension;
import art.arcane.iris.structure.object.IrisObject;
@@ -607,14 +606,7 @@ public class CommandObject implements DirectorExecutor {
// Block writes must run on the thread owning the target chunk; the undo log stays global.
final IrisObject placed = o;
if (!J.runAt(block, () -> {
try {
placed.place(block.getBlockX(), block.getBlockY() + (int) placed.getCenter().getY(), block.getBlockZ(), createPlacer(block.getWorld(), futureChanges, null), placement, new RNG(), placed.getLoader());
} catch (ProvisionalAnswerException provisional) {
commandSender.sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_OBJECT_PASTE_WAITS_FOR_TERRAIN_PLAN,
MessageArgument.untrusted("x", block.getBlockX()), MessageArgument.untrusted("y", block.getBlockY()),
MessageArgument.untrusted("z", block.getBlockZ())));
return;
}
placed.place(block.getBlockX(), block.getBlockY() + (int) placed.getCenter().getY(), block.getBlockZ(), createPlacer(block.getWorld(), futureChanges, null), placement, new RNG(), placed.getLoader());
J.runGlobal(() -> Iris.service(ObjectSVC.class).addChanges(futureChanges));
if (!edit) {
@@ -26,7 +26,6 @@ import art.arcane.iris.structure.StructureImporter;
import art.arcane.iris.structure.StructureIndexService;
import art.arcane.iris.studio.object.ObjectSVC;
import art.arcane.iris.generation.runtime.Engine;
import art.arcane.iris.generation.stream.ProvisionalAnswerException;
import art.arcane.iris.structure.placement.IrisStructureLocator;
import art.arcane.iris.structure.nativegen.NativeStructureGenerationPolicy;
import art.arcane.iris.structure.placement.PlacedStructurePiece;
@@ -360,24 +359,17 @@ public class CommandStructure implements DirectorExecutor {
PlatformChunkGenerator targetGenerator = IrisToolbelt.access(targetWorld);
Engine targetEngine = targetGenerator == null ? null : targetGenerator.getEngine();
IObjectPlacer placer = CommandObject.createPlacer(targetWorld, future, targetEngine);
try {
for (PlacedStructurePiece p : pieces) {
IrisObjectPlacement config = new IrisObjectPlacement();
config.setMode(ObjectPlaceMode.STRUCTURE_PIECE);
config.setRotation(p.getRotation());
config.getPlace().add(p.getObject().getLoadKey());
if (!s.getEdit().isEmpty()) {
config.setEdit(s.getEdit());
}
p.getObject().place(p.getX(), p.getY(), p.getZ(), placer, config, rng, null, null, data);
for (PlacedStructurePiece p : pieces) {
IrisObjectPlacement config = new IrisObjectPlacement();
config.setMode(ObjectPlaceMode.STRUCTURE_PIECE);
config.setRotation(p.getRotation());
config.getPlace().add(p.getObject().getLoadKey());
if (!s.getEdit().isEmpty()) {
config.setEdit(s.getEdit());
}
} catch (ProvisionalAnswerException provisional) {
J.runGlobal(() -> Iris.service(ObjectSVC.class).addChanges(future));
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STRUCTURE_PLACE_WAITS_FOR_TERRAIN_PLAN,
MessageArgument.untrusted("x", loc.getBlockX()), MessageArgument.untrusted("y", loc.getBlockY()),
MessageArgument.untrusted("z", loc.getBlockZ())));
return;
p.getObject().place(p.getX(), p.getY(), p.getZ(), placer, config, rng, null, null, data);
}
J.runGlobal(() -> Iris.service(ObjectSVC.class).addChanges(future));
int blockChanges = 0;
for (Map.Entry<Block, BlockData> entry : future.entrySet()) {
if (!entry.getKey().getBlockData().equals(entry.getValue())) {