Missing Argument Types
Plecra opened this issue ยท 4 comments
Whenever a player joins, development servers will emit these errors:
[16:10:46] [Netty Server IO #8/ERROR] (Minecraft) Could not serialize net.minecraft.command.argument.TestFunctionArgumentType@51f5f7c0 (class net.minecraft.command.argument.TestFunctionArgumentType) - will not be sent to client!
[16:10:46] [Netty Server IO #8/ERROR] (Minecraft) Could not serialize net.minecraft.command.argument.TestClassArgumentType@55935df2 (class net.minecraft.command.argument.TestClassArgumentType) - will not be sent to client!
This is caused by the somewhat recent addition of TestCommand
in #1622
However, the ArgumentType
s for the command also need to be added. There is a similar SharedConstants.isDevelopment
condition in ArgumentTypes.java
which gates the addition of the test_argument
and test_class
command types.
Fixing this is as simple as
@Override
public void onPreLaunch() {
SharedConstants.isDevelopment = true;
}
Since we're enabling the test suite on developer builds anyway, this seems to be a good addition to me. It doesn't cause any problems, and adds a bunch of runtime warnings for bad game states. It'll also mean we can removed from of the hacky mixins from #1622
IIRC there were some behaviour changes in the game why isDevelopment
wasn't just set to true instead of modifying the feature games themselves, but @modmuss50 can probably elaborate further.
Yes, thats correct. The arugment types need adding the same way as the commands are handled. ๐
Looked into the changes isDevelopment
makes on Discord, so I'll pop it here for the record
This is an exhaustive list for the 1.18.1 implementation
- Mostly more logging, naturally.
- Sanity checks BlockBoxes (used for collisions). This raises an eyebrow, since it keeps trucking in prod mode.
- Prompts for a debugger breakpoint on some serious errors. These are target an vanilla development. Maybe annoying for mod authors?
- Sets descriptive thread name while running Suppliers and Runnables
- Throws instead of silently failing when upgrading old save data
- Skips the EULA check for servers ๐
- Generates absolute paths for debug logs. Nice little convenience
- Responds to CommandSources with errors when exceptions are thrown
- Enables the test framework & command ๐
- Sanity checks classes that extend Item
- Disables telemetry
- Logs all narrated text
- Loads the programmer_art resource pack when it's unzipped
- Throws on the client if:
- There is a block without a model
- There is a blockstate without a registered break particle
- There is a registered item that's missing a translation
- Throws when the furnace fuel filtering code breaks
- Sanity checks classes that extend Block
- Throws when an ArgumentType isnt properly registered
- Changes the GL Texture Id generation logic
I'd imagine the checks will be overly strict for some mods, so it's not a panacea.
For me though, there's a lot of nice QoL changes which make it worth enabling
Since there's probably a problematic change you found last time, I'd like to make this an option thats available in the mod template. I'm out of my depth with knowing how to configure gradle for development builds though.