diff --git a/adapters/bukkit/plugin/src/main/java/art/arcane/iris/command/CommandStructure.java b/adapters/bukkit/plugin/src/main/java/art/arcane/iris/command/CommandStructure.java index 351e41702..77a09b197 100644 --- a/adapters/bukkit/plugin/src/main/java/art/arcane/iris/command/CommandStructure.java +++ b/adapters/bukkit/plugin/src/main/java/art/arcane/iris/command/CommandStructure.java @@ -24,7 +24,9 @@ import art.arcane.iris.structure.BulkStructureImporter; import art.arcane.iris.structure.StructureCaptureImporter; 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; @@ -358,15 +360,23 @@ public class CommandStructure implements DirectorExecutor { PlatformChunkGenerator targetGenerator = IrisToolbelt.access(targetWorld); Engine targetEngine = targetGenerator == null ? null : targetGenerator.getEngine(); IObjectPlacer placer = CommandObject.createPlacer(targetWorld, future, targetEngine); - 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()); + 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); } - p.getObject().place(p.getX(), p.getY(), p.getZ(), placer, config, rng, null, null, data); + } 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; } int blockChanges = 0; for (Map.Entry entry : future.entrySet()) { diff --git a/core/src/main/java/art/arcane/iris/localization/BukkitCommandMessagesExtended.java b/core/src/main/java/art/arcane/iris/localization/BukkitCommandMessagesExtended.java index 58f654a3e..7935df6a3 100644 --- a/core/src/main/java/art/arcane/iris/localization/BukkitCommandMessagesExtended.java +++ b/core/src/main/java/art/arcane/iris/localization/BukkitCommandMessagesExtended.java @@ -581,6 +581,10 @@ public final class BukkitCommandMessagesExtended { C.GREEN + "Placed '" + "{structure}" + "' (" + "{value}" + " pieces, " + "{value2}" + " block changes) at your location." ); + public static final TextKey COMMAND_STRUCTURE_PLACE_WAITS_FOR_TERRAIN_PLAN = TextKey.of( + "iris.bukkit.commandstructure.place_waits_for_terrain_plan", + C.YELLOW + "The terrain at " + "{x}" + " " + "{y}" + " " + "{z}" + " is still being planned. Pieces placed so far can be removed with /iris object undo; run the placement again in a moment." + ); public static final TextKey COMMAND_STRUCTURE_PLACEMENT_CHANGED_NO_BLOCKS = TextKey.of( "iris.bukkit.commandstructure.placement_changed_no_blocks", C.RED + "Structure '" + "{structure}" + "' assembled " + "{value}" @@ -952,6 +956,7 @@ public final class BukkitCommandMessagesExtended { COMMAND_STRUCTURE_NO_IRIS_STRUCTURE_THIS_PACK_2, COMMAND_STRUCTURE_STRUCTURE_ASSEMBLED_0_PIECES, COMMAND_STRUCTURE_PLACED_PIECES_AT_YOUR_LOCATION, + COMMAND_STRUCTURE_PLACE_WAITS_FOR_TERRAIN_PLAN, COMMAND_STRUCTURE_PLACEMENT_CHANGED_NO_BLOCKS, COMMAND_STUDIO_OPENING_STUDIO_PACK_SEED, COMMAND_STUDIO_PROVIDE_DIMENSION_PACK_IRIS_STD_IMPORTVANILLA_PACK_DIMENSION, diff --git a/core/src/main/resources/languages/de_DE.toml b/core/src/main/resources/languages/de_DE.toml index 3d5f7fc18..10d5e99c0 100644 --- a/core/src/main/resources/languages/de_DE.toml +++ b/core/src/main/resources/languages/de_DE.toml @@ -643,6 +643,7 @@ no_iris_structure_this_pack_2 = "§cKeine Iris-Struktur '{structure}' in diesem structure_assembled_0_pieces = "§cStruktur '{structure}' wurde aus 0 Teilen zusammengesetzt" placed_pieces_at_your_location = "§a'{structure}' ({value} Teile) an deiner Position platziert. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eDas Gelände bei {x} {y} {z} wird noch geplant. Bereits platzierte Teile lassen sich mit /iris object undo entfernen; führe die Platzierung gleich erneut aus." [iris.bukkit.commandstudio] hotloading = "§eStudio wird im laufenden Betrieb neu geladen..." diff --git a/core/src/main/resources/languages/es_ES.toml b/core/src/main/resources/languages/es_ES.toml index 7dedda3ee..e2fa3b939 100644 --- a/core/src/main/resources/languages/es_ES.toml +++ b/core/src/main/resources/languages/es_ES.toml @@ -643,6 +643,7 @@ no_iris_structure_this_pack_2 = "§cNo existe la estructura de Iris '{structure} structure_assembled_0_pieces = "§cLa estructura '{structure}' ensambló 0 piezas" placed_pieces_at_your_location = "§aSe colocó '{structure}' ({value} piezas) en tu ubicación. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eEl terreno en {x} {y} {z} todavía se está planificando. Las piezas ya colocadas se pueden quitar con /iris object undo; vuelve a ejecutar la colocación en un momento." [iris.bukkit.commandstudio] hotloading = "§eRecargando Studio en caliente..." diff --git a/core/src/main/resources/languages/fi_FI.toml b/core/src/main/resources/languages/fi_FI.toml index 7c79bb7ad..bfbb4cd50 100644 --- a/core/src/main/resources/languages/fi_FI.toml +++ b/core/src/main/resources/languages/fi_FI.toml @@ -648,6 +648,7 @@ no_iris_structure_this_pack_2 = "§cEi iirisrakennetta '{structure}Tässä pakka structure_assembled_0_pieces = "§cRakenne{structure}' koottu 0 kappaletta" placed_pieces_at_your_location = "§aPaikka{structure}' ({value} Palaset) sijaintisi. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eMaastoa kohdassa {x} {y} {z} suunnitellaan vielä. Jo sijoitetut osat voi poistaa komennolla /iris object undo; suorita sijoitus uudelleen hetken kuluttua." [iris.bukkit.commandstudio] hotloading = "§eLadataan Studiota uudelleen..." diff --git a/core/src/main/resources/languages/fr_FR.toml b/core/src/main/resources/languages/fr_FR.toml index 9a411667b..a362c5f40 100644 --- a/core/src/main/resources/languages/fr_FR.toml +++ b/core/src/main/resources/languages/fr_FR.toml @@ -643,6 +643,7 @@ no_iris_structure_this_pack_2 = "§cAucune structure Iris '{structure}' dans ce structure_assembled_0_pieces = "§cLa structure '{structure}' a assemblé 0 pièce" placed_pieces_at_your_location = "§aLa structure '{structure}' ({value} pièces) a été placée à votre position. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eLe terrain en {x} {y} {z} est encore en cours de planification. Les pièces déjà placées peuvent être retirées avec /iris object undo ; relancez le placement dans un instant." [iris.bukkit.commandstudio] hotloading = "§eRechargement à chaud de Studio..." diff --git a/core/src/main/resources/languages/he_IL.toml b/core/src/main/resources/languages/he_IL.toml index 3f6f275b9..6e933b583 100644 --- a/core/src/main/resources/languages/he_IL.toml +++ b/core/src/main/resources/languages/he_IL.toml @@ -648,6 +648,7 @@ no_iris_structure_this_pack_2 = "§cאין מבנה איריס \"{structure}\"ב structure_assembled_0_pieces = "§cמבנה \"{structure}התאספו 0 חתיכות" placed_pieces_at_your_location = "§aמקום \"{structure}' ({value} חתיכות) במיקום שלך. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eהשטח ב-{x} {y} {z} עדיין בתכנון. ניתן להסיר את החלקים שכבר הוצבו עם /iris object undo; הרץ את ההצבה שוב בעוד רגע." [iris.bukkit.commandstudio] hotloading = "§eטוען מחדש את Studio..." diff --git a/core/src/main/resources/languages/it_IT.toml b/core/src/main/resources/languages/it_IT.toml index 6aac09a0d..9412a3d9c 100644 --- a/core/src/main/resources/languages/it_IT.toml +++ b/core/src/main/resources/languages/it_IT.toml @@ -643,6 +643,7 @@ no_iris_structure_this_pack_2 = "§cNessuna struttura Iris '{structure}' in ques structure_assembled_0_pieces = "§cLa struttura '{structure}' è stata assemblata con 0 pezzi" placed_pieces_at_your_location = "§a'{structure}' ({value} pezzi) posizionata nella tua posizione. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eIl terreno in {x} {y} {z} è ancora in fase di pianificazione. I pezzi già piazzati si possono rimuovere con /iris object undo; esegui di nuovo il piazzamento tra un momento." [iris.bukkit.commandstudio] hotloading = "§eRicaricamento a caldo di Studio..." diff --git a/core/src/main/resources/languages/ja-JP.toml b/core/src/main/resources/languages/ja-JP.toml index 149978061..1dad2893d 100644 --- a/core/src/main/resources/languages/ja-JP.toml +++ b/core/src/main/resources/languages/ja-JP.toml @@ -646,6 +646,7 @@ no_iris_structure_this_pack_2 = "§cこのパックには Iris 構造物 '{struc structure_assembled_0_pieces = "§c構造物 '{structure}' は 0 ピースで組み立てられました" placed_pieces_at_your_location = "§a現在位置に '{structure}'({value} ピース)を配置しました。 ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§e{x} {y} {z} の地形はまだ計画中です。配置済みのピースは /iris object undo で取り除けます。少し待ってからもう一度配置してください。" [iris.bukkit.commandstudio] hotloading = "§eStudio をホットリロード中..." diff --git a/core/src/main/resources/languages/ko_KR.toml b/core/src/main/resources/languages/ko_KR.toml index 86cafe59b..60bda7459 100644 --- a/core/src/main/resources/languages/ko_KR.toml +++ b/core/src/main/resources/languages/ko_KR.toml @@ -646,6 +646,7 @@ no_iris_structure_this_pack_2 = "§c아이리스 구조 없음 '{structure}이 structure_assembled_0_pieces = "§c구조물 '{structure}' 조립 결과: 조각 0개" placed_pieces_at_your_location = "§a장소 '{structure}' ({value} 당신의 위치에 조각). ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§e{x} {y} {z}의 지형은 아직 계획 중입니다. 이미 배치된 조각은 /iris object undo로 제거할 수 있습니다. 잠시 후 다시 배치를 실행하세요." [iris.bukkit.commandstudio] hotloading = "§eStudio 핫 리로드 중..." diff --git a/core/src/main/resources/languages/lt_LT.toml b/core/src/main/resources/languages/lt_LT.toml index d7149bcea..8748ab3d3 100644 --- a/core/src/main/resources/languages/lt_LT.toml +++ b/core/src/main/resources/languages/lt_LT.toml @@ -648,6 +648,7 @@ no_iris_structure_this_pack_2 = "§cNėra rainelės struktūros \"{structure}\" structure_assembled_0_pieces = "§cStruktūra \"{structure}'surinkti 0 vienetai" placed_pieces_at_your_location = "§aPateikta \"{structure}' ({value} vienetų). ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eReljefas ties {x} {y} {z} dar planuojamas. Jau padėtas dalis galima pašalinti komanda /iris object undo; po akimirkos padėkite dar kartą." [iris.bukkit.commandstudio] hotloading = "§eStudio įkeliama iš naujo..." diff --git a/core/src/main/resources/languages/nl_NL.toml b/core/src/main/resources/languages/nl_NL.toml index dad91c94a..54c33563c 100644 --- a/core/src/main/resources/languages/nl_NL.toml +++ b/core/src/main/resources/languages/nl_NL.toml @@ -643,6 +643,7 @@ no_iris_structure_this_pack_2 = "§cGeen irisstructuur '{structure}' in deze ver structure_assembled_0_pieces = "§cStructuur{structure}' gemonteerd 0 stuks" placed_pieces_at_your_location = "§aGeplaatst '{structure}' ({value} stukken) op uw locatie. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eHet terrein bij {x} {y} {z} wordt nog gepland. Al geplaatste stukken verwijder je met /iris object undo; voer het plaatsen zo meteen opnieuw uit." [iris.bukkit.commandstudio] hotloading = "§eStudio wordt opnieuw geladen..." diff --git a/core/src/main/resources/languages/pl_PL.toml b/core/src/main/resources/languages/pl_PL.toml index b23103920..0520e2ee5 100644 --- a/core/src/main/resources/languages/pl_PL.toml +++ b/core/src/main/resources/languages/pl_PL.toml @@ -648,6 +648,7 @@ no_iris_structure_this_pack_2 = "§cBrak struktury tęczówki \"{structure}'w ty structure_assembled_0_pieces = "§cStruktura \"{structure}\"zmontowane 0 kawałki" placed_pieces_at_your_location = "§aUmieszczone \"{structure}' ({value} sztuk) w miejscu. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eTeren w {x} {y} {z} jest nadal planowany. Już postawione części można usunąć poleceniem /iris object undo; uruchom umieszczanie ponownie za chwilę." [iris.bukkit.commandstudio] hotloading = "§ePonowne wczytywanie Studio..." diff --git a/core/src/main/resources/languages/pt_PT.toml b/core/src/main/resources/languages/pt_PT.toml index a6794c893..ff6b7e785 100644 --- a/core/src/main/resources/languages/pt_PT.toml +++ b/core/src/main/resources/languages/pt_PT.toml @@ -643,6 +643,7 @@ no_iris_structure_this_pack_2 = "§cSem estrutura íris '{structure}' nesta pack structure_assembled_0_pieces = "§cEstrutura{structure}' montados 0 peças" placed_pieces_at_your_location = "§aColocado '{structure}' ({value} peças) na sua localização. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eO terreno em {x} {y} {z} ainda está a ser planeado. As peças já colocadas podem ser removidas com /iris object undo; volte a executar a colocação daqui a pouco." [iris.bukkit.commandstudio] hotloading = "§eA recarregar o Studio..." diff --git a/core/src/main/resources/languages/ru_RU.toml b/core/src/main/resources/languages/ru_RU.toml index 5e02fa2bc..2f14d1b27 100644 --- a/core/src/main/resources/languages/ru_RU.toml +++ b/core/src/main/resources/languages/ru_RU.toml @@ -648,6 +648,7 @@ no_iris_structure_this_pack_2 = "§cНет структуры радужной structure_assembled_0_pieces = "§cСтруктура{structure}собранный 0 части" placed_pieces_at_your_location = "§aПомещение '{structure}' ({value} куски) в вашем месте. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eРельеф в точке {x} {y} {z} ещё планируется. Уже размещённые части можно убрать командой /iris object undo; повторите размещение через мгновение." [iris.bukkit.commandstudio] hotloading = "§eГорячая перезагрузка Studio..." diff --git a/core/src/main/resources/languages/tr_TR.toml b/core/src/main/resources/languages/tr_TR.toml index a00373a83..d6360b8f0 100644 --- a/core/src/main/resources/languages/tr_TR.toml +++ b/core/src/main/resources/languages/tr_TR.toml @@ -648,6 +648,7 @@ no_iris_structure_this_pack_2 = "§cyok iris structure \"{structure}“Bu pakett structure_assembled_0_pieces = "§cYapı \"{structure}\"Bir araya geldi\" 0 parçalar parça parçaları" placed_pieces_at_your_location = "§ayerleştirildi ‘{structure}' ({value} parçalar) konumunuzda. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§e{x} {y} {z} konumundaki arazi hâlâ planlanıyor. Yerleştirilmiş parçaları /iris object undo ile kaldırabilirsiniz; yerleştirmeyi birazdan yeniden çalıştırın." [iris.bukkit.commandstudio] hotloading = "§eStudio yeniden yükleniyor..." diff --git a/core/src/main/resources/languages/vi_VI.toml b/core/src/main/resources/languages/vi_VI.toml index 7f1c0f30f..b5aefe639 100644 --- a/core/src/main/resources/languages/vi_VI.toml +++ b/core/src/main/resources/languages/vi_VI.toml @@ -646,6 +646,7 @@ no_iris_structure_this_pack_2 = "§cKhông có cấu trúc Iris{structure}'Trong structure_assembled_0_pieces = "§cCấu trúc{structure}Tập hợp 0 mảnh" placed_pieces_at_your_location = "§aĐã đặt '{structure}' ({value} Các mảnh) tại vị trí. ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§eĐịa hình tại {x} {y} {z} vẫn đang được lập kế hoạch. Có thể gỡ các mảnh đã đặt bằng /iris object undo; hãy chạy lại lệnh đặt sau giây lát." [iris.bukkit.commandstudio] hotloading = "§eĐang tải lại Studio..." diff --git a/core/src/main/resources/languages/zh_CN.toml b/core/src/main/resources/languages/zh_CN.toml index e6304ce57..650f12ee1 100644 --- a/core/src/main/resources/languages/zh_CN.toml +++ b/core/src/main/resources/languages/zh_CN.toml @@ -646,6 +646,7 @@ no_iris_structure_this_pack_2 = "§c无Iris结构 '{structure}\"在这个包里\ structure_assembled_0_pieces = "§c结构 '{structure}组装 0 块" placed_pieces_at_your_location = "§a已放置 '{structure}' ({value}在您的位置。 ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§e{x} {y} {z} 处的地形仍在规划中。已放置的部件可用 /iris object undo 移除;请稍后再次执行放置。" [iris.bukkit.commandstudio] hotloading = "§e正在热重载 Studio..." diff --git a/core/src/main/resources/languages/zh_TW.toml b/core/src/main/resources/languages/zh_TW.toml index 11ba4e8f1..df739c9f1 100644 --- a/core/src/main/resources/languages/zh_TW.toml +++ b/core/src/main/resources/languages/zh_TW.toml @@ -646,6 +646,7 @@ no_iris_structure_this_pack_2 = "§c無Iris結構 '{structure}\"在這個包裡\ structure_assembled_0_pieces = "§c結構 '{structure}組裝 0 塊" placed_pieces_at_your_location = "§a已放置 '{structure}' ({value}在您的位置。 ({value2} block changes)" placement_changed_no_blocks = "§cStructure '{structure}' assembled {value} pieces but changed 0 blocks at your location. Check that the selected variants contain non-air blocks and that the placement is above the world's minimum height." +place_waits_for_terrain_plan = "§e{x} {y} {z} 處的地形仍在規劃中。已放置的部件可用 /iris object undo 移除;請稍後再次執行放置。" [iris.bukkit.commandstudio] hotloading = "§e正在熱重載 Studio..."