Mount the tooling commands on the modded /iris root

A greedy-string tail with a suggestion provider sits next to the literals of the /iris
root and inside the structure literals, so literal commands keep winning. The modded
list, info and verify trees and ModdedLocateCommands.verifyStructures are deleted;
the import and capture notices stay.
This commit is contained in:
piexel committed 2026-11-06 10:51:15 +01:00
1 parent 6a3c51e4fe
commit 2a68f41bef
7 files changed
+187 -210

No files matched your search

@@ -280,28 +280,14 @@ public class IrisModdedStructureCommandTest {
}
@Test
public void verifyResolvesRegisteredNativeBeforeGenericIrisAliases() throws IOException {
String source = source("ModdedLocateCommands.java");
int methodStart = source.indexOf("private static int verifyStructure(");
int methodEnd = source.indexOf("private static Optional<NativeStructureTarget> resolveNativeStructure(",
methodStart);
String method = source.substring(methodStart, methodEnd);
int nativeResolution = method.indexOf("resolveNativeStructure(source, level, engine, key)");
int genericIrisLookup = method.indexOf("ModuleServices.placesStructure(engine, key)", nativeResolution);
assertTrue(nativeResolution >= 0);
assertTrue(genericIrisLookup > nativeResolution);
assertTrue(method.contains("NativeStructureAvailability.IRIS_SUPPRESSED"));
}
@Test
public void structureVerificationNoLongerClaimsNativeGenerationIsMissing() throws IOException {
public void structureListInfoAndVerifyBelongToTheStructureModule() throws IOException {
String source = source("ModdedStructureCommands.java");
String tree = source("ModdedCommandTree.java");
assertTrue(source.contains("verifyTree(\"verify\")"));
assertTrue(source.contains("verifyTree(\"locateall\")"));
assertTrue(source.contains("IrisModdedCommands.verifyStructures("));
assertFalse(source.contains("Vanilla structure locate is meaningless here"));
assertTrue(source.contains("ModdedToolingTail.after(name)"));
assertFalse(source.contains("Commands.literal(\"list\")"));
assertFalse(source.contains("verifyTree("));
assertTrue(tree.contains("root.then(ModdedToolingTail.after())"));
}
private String source(String fileName) throws IOException {