Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi, I want to update my mod to Minecraft 1.19 (forge 41.0.1).
I noticed that net.minecraft.commands.synchronization.ArgumentTypes does not exist anymore.
Any hints what to change?

My current line of code:
 

ArgumentTypes.register("myargument", MyArgument.class, new MyArgument.Serializer());

Thanks in advance!

  • Author

Thanks so far.
I still get an error message during world joining:
 

java.lang.IllegalArgumentException: Unrecognized argument type mymod.MyArgument@5d81d85d (class mymod.MyArgument)
	at net.minecraft.commands.synchronization.ArgumentTypeInfos.m_235382_(ArgumentTypeInfos.java:152) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.commands.synchronization.ArgumentTypeInfos.m_235393_(ArgumentTypeInfos.java:159) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.network.protocol.game.ClientboundCommandsPacket$ArgumentNodeStub.<init>(ClientboundCommandsPacket.java:162) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.network.protocol.game.ClientboundCommandsPacket.m_237621_(ClientboundCommandsPacket.java:235) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.network.protocol.game.ClientboundCommandsPacket.m_237626_(ClientboundCommandsPacket.java:107) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.network.protocol.game.ClientboundCommandsPacket.<init>(ClientboundCommandsPacket.java:52) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.commands.Commands.m_82095_(Commands.java:289) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.players.PlayerList.m_11226_(PlayerList.java:587) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.players.PlayerList.m_11289_(PlayerList.java:480) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.players.PlayerList.m_11261_(PlayerList.java:173) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_143699_(ServerLoginPacketListenerImpl.java:147) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_10055_(ServerLoginPacketListenerImpl.java:134) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.network.ServerLoginPacketListenerImpl.m_10050_(ServerLoginPacketListenerImpl.java:78) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.network.Connection.m_129483_(Connection.java:240) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.network.ServerConnectionListener.m_9721_(ServerConnectionListener.java:141) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:880) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:84) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:245) ~[client-1.19-20220607.102129-srg.jar%2371!/:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

My code is:

DeferredRegister<ArgumentTypeInfo<?, ?>> argTypeRegistry = DeferredRegister.create(Registry.COMMAND_ARGUMENT_TYPE_REGISTRY, MOD_ID);
argTypeRegistry.register("myargument", () -> ArgumentTypeInfos.registerByClass(MyArgument.class, new MyArgument.Info()));

Do I need to register the argument type anywhere else?

Also, I tested it in a single player world and after the error the multi player server selection screen was shown to me (instead of single player world selection).

  • Author

I added the line

MinecraftForge.EVENT_BUS.register(argTypeRegistry);

but it's still the same error message.

  • Author

Thanks for the hint.
To complete this topic, here's the correct line I still needed:

argTypeRegistry.register(FMLJavaModLoadingContext.get().getModEventBus());

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.