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())) {
@@ -28,7 +28,6 @@ import art.arcane.iris.pack.loading.IrisData;
import art.arcane.iris.studio.tree.TreePlausibilizeBatch;
import art.arcane.iris.studio.tree.TreePlausibilizer;
import art.arcane.iris.generation.runtime.Engine;
import art.arcane.iris.generation.stream.ProvisionalAnswerException;
import art.arcane.iris.structure.object.IrisObject;
import art.arcane.iris.structure.object.IrisObjectPlacement;
import art.arcane.iris.structure.object.IrisObjectRotation;
@@ -367,10 +366,6 @@ public final class ModdedObjectCommands {
try {
object = placement.scaleObject(new RNG(), object, engine == null ? null : engine.getDimension());
object.place(target.x(), target.y() + object.getCenter().getY(), target.z(), placer, placement, new RNG(), object.getLoader());
} catch (ProvisionalAnswerException provisional) {
ModdedIrisLog.info("Iris paste of {} at {},{},{} waits for the terrain plan", key, target.x(), target.y(), target.z());
IrisModdedCommands.fail(source, IrisLanguage.plain(ModdedCommandMessages.MODDED_OBJECT_COMMANDS_PASTE_WAITS_FOR_TERRAIN_PLAN, MessageArgument.untrusted("value", target.x()), MessageArgument.untrusted("value2", target.y()), MessageArgument.untrusted("value3", target.z())));
return 0;
} catch (Throwable e) {
ModdedIrisLog.error("Iris paste failed for {}", key, e);
ModdedObjectUndo.record(player == null ? ModdedObjectUndo.CONSOLE : player.id(), placer.undoSnapshot());
@@ -599,10 +599,6 @@ public final class ModdedCommandMessages {
"iris.modded.moddedobjectcommands.paste_failed_partial_changes_recorded_undo",
"Paste failed: " + "{value}" + " (partial changes recorded for undo)"
);
public static final TextKey MODDED_OBJECT_COMMANDS_PASTE_WAITS_FOR_TERRAIN_PLAN = TextKey.of(
"iris.modded.moddedobjectcommands.paste_waits_for_terrain_plan",
"The terrain at " + "{value}" + " " + "{value2}" + " " + "{value3}" + " is still being planned. Nothing was pasted; run the paste again in a moment."
);
public static final TextKey MODDED_OBJECT_COMMANDS_PLACED_AT_ROT_WRITE_S_NON_AIR = TextKey.of(
"iris.modded.moddedobjectcommands.placed_at_rot_write_s_non_air",
"Placed " + "{key}" + " at " + "{value}" + " " + "{value2}" + " " + "{value3}" + " rot=" + "{rotation}" + " (" + "{value4}" + " write(s), " + "{value5}" + " non-air" + "{tileNote}" + ")"
@@ -1442,7 +1438,6 @@ public final class ModdedCommandMessages {
MODDED_OBJECT_COMMANDS_CONSOLE_MUST_SPECIFY_COORDINATES_IRIS_OBJECT_PASTE_AT_X_Y,
MODDED_OBJECT_COMMANDS_YOU_ARE_NOT_LOOKING_AT_BLOCK_WITHIN_BLOCKS,
MODDED_OBJECT_COMMANDS_PASTE_FAILED_PARTIAL_CHANGES_RECORDED_UNDO,
MODDED_OBJECT_COMMANDS_PASTE_WAITS_FOR_TERRAIN_PLAN,
MODDED_OBJECT_COMMANDS_PLACED_AT_ROT_WRITE_S_NON_AIR,
MODDED_OBJECT_COMMANDS_THIS_COMMAND_CAN_ONLY_BE_USED_BY_PLAYERS,
MODDED_OBJECT_COMMANDS_HOLD_YOUR_IRIS_WAND_IRIS_WAND_2,