Ultimate Car Mod

Ultimate Car Mod

14M Downloads

Client methods executing when mod runs on a server (neoforge)

davidwalgenbach opened this issue ยท 0 comments

commented

Bug description

When attempting to run the Ultimate Car Mod on a neoforge minecraft server (1.21.4), an exception will be thrown at load up time due to a missing method

Exception message: java.lang.NoSuchMethodError: 'void de.maxhenkel.car.Main.registerItemModels(net.neoforged.neoforge.client.event.RegisterSpecialModelRendererEvent)' Stacktrace: at TRANSFORMER/[email protected]/de.maxhenkel.car.Main.<init>(Main.java:155) ~[car-neoforge-1.21.4-1.0.34.jar%23145!/:1.21.4-1.0.34]

After looking through the repo a bit it looks like this method does exist in main but only runs when the mod is ran on the client version.

@OnlyIn(Dist.CLIENT) public void registerItemModels(RegisterSpecialModelRendererEvent event) { event.register(ResourceLocation.fromNamespaceAndPath(MODID, "tank"), TankSpecialRenderer.Unbaked.MAP_CODEC); }

Minecraft version

1.21.4

Mod version

1.21.4-1.0.34

Mod loader and version

Neoforge 21.4.33

Steps to reproduce

  1. Install neoforge server. 2. place the ultimate car mod file in the mods folder. 3. start the minecraft server using the run script. 4. The exception will be thrown nearly instantly

Expected behavior

The server starts up properly.

Log files

https://gist.github.com/davidwalgenbach/86f3a4b76dd3a88abe07ff6afae2ba47

Screenshots

No response