Skip to content

Missing argument in line 130 of TrainerSpawner.java causing server startup issues

I run a server that uses weekly rotating dimensions. We had our first rotation since recently updating RCT and started getting server crashes along the lines of the following:

Time: 2025-10-11 18:32:33 Description: Exception in server tick loop

java.util.MissingFormatArgumentException: Format specifier '%s' at java.base/java.util.Formatter.format(Formatter.java:2790) ~[?:?] {} at java.base/java.util.Formatter.format(Formatter.java:2728) ~[?:?] {} at java.base/java.lang.String.format(String.java:4390) ~[?:?] {re:mixin} at TRANSFORMER/rctmod@0.16.9-beta/com.gitlab.srcmc.rctmod.api.service.TrainerSpawner.lambda$init$1(TrainerSpawner.java:130) ~[rctmod-neoforge-1.21.1-0.16.9-beta.jar%23611!/:?] {re:classloading} at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {re:mixin}

Upon review, there seems to be a missing argument here - namely given the use of String.format() with %s and no variable to actually fill in.

So I made the following change:

130 -  ModCommon.LOG.warn(String.format("trainer repel rods placed in unknown dimension '%s'!"));
130 +  ModCommon.LOG.warn(String.format("trainer repel rods placed in unknown dimension '%s'!", e.getKey()));

After making the change, I rebuilt the mod, deployed the rebuilt mod to the server, and the crashes stopped.