Skip to content

Commit

Permalink
Make procedure tests detect more problematic procedure block cases (M…
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenDEV authored Oct 16, 2023
1 parent 9d2b275 commit 629f7f7
Showing 1 changed file with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,6 @@ public static void runTest(Logger LOG, String generatorName, Random random, Work
</value></block>
""".formatted(testXML, testXML));
break;
case "String":
procedure.procedurexml = wrapWithBaseTestXML(
"<block type=\"return_string\"><value name=\"return\">" + testXML + "</value></block>");
break;
case "MCItem":
procedure.procedurexml = wrapWithBaseTestXML(
"<block type=\"return_itemstack\"><value name=\"return\">" + testXML + "</value></block>");
break;
case "Entity":
procedure.procedurexml = wrapWithBaseTestXML(
"<block type=\"return_entity\"><value name=\"return\">" + testXML + "</value></block>");
break;
case "ProjectileEntity": // Projectile blocks are tested with the "Shoot from entity" procedure
procedure.procedurexml = wrapWithBaseTestXML("""
<block type="projectile_shoot_from_entity">
Expand All @@ -177,8 +165,16 @@ public static void runTest(Logger LOG, String generatorName, Random random, Work
</block>""".formatted(testXML));
break;
default:
procedure.procedurexml = wrapWithBaseTestXML(
"<block type=\"text_print\"><value name=\"TEXT\">" + testXML + "</value></block>");
case "String":
procedure.procedurexml = wrapWithBaseTestXML("""
<block type="return_string"><value name="return">
<block type="text_join">
<mutation items="2"></mutation>
<value name="ADD0">%s</value>
<value name="ADD1">%s</value>
</block>
</value></block>
""".formatted(testXML, testXML));
break;
}
}
Expand Down

0 comments on commit 629f7f7

Please sign in to comment.