Hbm's Nuclear Tech Mod

Hbm's Nuclear Tech Mod

1M Downloads

`HUDComponentAmmoCounter` crashes on servers

abel1502 opened this issue · 4 comments

commented

The exception is java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/RenderItem. I'm pretty sure it's due to this line:

protected static final RenderItem itemRenderer = RenderItem.getInstance();

Just adding a SideOnly won't affect the initializer expression. However, getInstance() appears to do its own caching, so perhaps this whole constant is unnecessary?

commented

Do you have the full crash report? HUD components shouldn't even get loaded serverside since they are supposed to only be initialized via the ClientProxy

commented

Here you go:

---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 29.09.24 18:21
Description: Exception in server tick loop

cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/RenderItem
	at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
	at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559)
	at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88)
	at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314)
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387)
	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/RenderItem
	at com.hbm.items.weapon.sedna.hud.HUDComponentAmmoCounter.<clinit>(HUDComponentAmmoCounter.java:23)
	at com.hbm.items.weapon.sedna.factory.Lego.<clinit>(Lego.java:34)
	at com.hbm.items.weapon.sedna.factory.GunFactory.init(GunFactory.java:38)
	at com.hbm.items.ModItems.initializeItem2(ModItems.java:5963)
	at com.hbm.items.ModItems.initializeItem(ModItems.java:5142)
	at com.hbm.items.ModItems.mainRegistry(ModItems.java:71)
	at com.hbm.main.MainRegistry.PreLoad(MainRegistry.java:294)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
	at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
	... 5 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.entity.RenderItem
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 38 more
Caused by: java.lang.RuntimeException: Attempted to load class bny for invalid side SERVER
	at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)
	at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
	... 40 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.7.10
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_202, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 5859823072 bytes (5588 MB) / 6063915008 bytes (5783 MB) up to 11453595648 bytes (10923 MB)
	JVM Flags: 2 total; -Xmx12288M -Xms4096M
	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 48 mods loaded, 48 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UCH	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
	UCH	FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614-1.7.10-universal.jar) 
	UCH	Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614-1.7.10-universal.jar) 
	UCH	Aroma1997Core{1.0.2.16} [Aroma1997Core] (Aroma1997Core-1.7.10-1.0.2.16.jar) 
	UCH	CodeChickenCore{1.3.7} [CodeChicken Core] (minecraft.jar) 
	UCH	NotEnoughItems{2.6.38-GTNH} [NotEnoughItems] (NotEnoughItems-2.6.38-GTNH.jar) 
	UCH	xaerominimap_core{1.7.10-1.0} [XaeroMinimapCore] (minecraft.jar) 
	UCH	xaeroworldmap_core{1.7.10-1.0} [XaeroWorldMapCore] (minecraft.jar) 
	UCH	unimixins{0.1.17} [UniMixins] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	unimixins-mixin{0.1.17} [UniMixins: Mixin (UniMix)] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	unimixins-compat{0.1.17} [UniMixins: Compatibility] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	mixingasm{0.3} [UniMixins: Mixingasm] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	spongemixins{2.0.1} [UniMixins: SpongeMixins] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	mixinbooterlegacy{1.2.1} [UniMixins: MixinBooterLegacy] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	gasstation{0.5.1} [UniMixins: GasStation] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	gtnhmixins{2.2.0} [UniMixins: GTNHMixins] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	mixinextras{0.1.17} [UniMixins: MixinExtras] (+unimixins-all-1.7.10-0.1.17.jar) 
	UCH	AppleCore{3.3.2} [AppleCore] (AppleCore-3.3.2.jar) 
	UCH	Aroma1997CoreHelper{1.0.2.16} [Aroma1997Core|Helper] (Aroma1997Core-1.7.10-1.0.2.16.jar) 
	UCH	AromaBackup{0.1.0.0} [AromaBackup] (AromaBackup-1.7.10-0.1.0.0.jar) 
	UCH	AromaBackupRecovery{1.0} [AromaBackup Recovery] (AromaBackup-1.7.10-0.1.0.0.jar) 
	UCH	bookshelf{1.0.4.187} [Bookshelf] (Bookshelf-1.7.10-1.0.4.187.jar) 
	UCH	betterboat{1.1.0} [Better Boat] (BetterBoat-1.7.10-1.1.0.jar) 
	UCH	catwalks{2.0.4} [Catwalks Mod] (catwalks-2.0.4.jar) 
	UCH	catwalkmod{x.x.x} [Legacy Catwalk Compat] (catwalks-2.0.4.jar) 
	UCH	clayconversion{1.0} [Clay Conversion] (Clay Conversion1.7.10-1.0.jar) 
	UCH	controlling{1.7.10-1.0.0.8} [Controlling] (Controlling-1.7.10-1.0.0.8.jar) 
	UCH	craftingtweaks{1.0.88} [Crafting Tweaks] (craftingtweaks-mc1.7.10-1.0.88.jar) 
	UCH	fastleafdecay{1.4} [Fast Leaf Decay] (FastLeafDecay-1.7.10-1.4.jar) 
	UCE	hbm{1.0.27 BETA (5091)} [Hbm's Nuclear Tech] (HBM-NTM-1.0.27_X5103-A01_H261.jar) 
	UCH	HelpFixer{1.0.7} [HelpFixer] (HelpFixer-1.0.7.jar) 
	UCH	HopperDuctMod{1.3.2} [Hopper Ducts] (hopperductmod-1.7.10-1.3.2.jar) 
	UCH	inventorytweaks{1.59-dev-152-cf6e263} [Inventory Tweaks] (InventoryTweaks-1.59-dev-152.jar) 
	UCH	ironbackpacks{1.7.10-1.2.20} [Iron Backpacks] (IronBackpacks-1.7.10-1.2.20.jar) 
	UCH	mending{1.0} [Mending for 1.7.10] (Mending for 1.7.10-1.1.jar) 
	UCH	Morpheus{1.7.10-1.6.21} [Morpheus] (Morpheus-1.7.10-1.6.21.jar) 
	UCH	cfm{3.4.7} [§9MrCrayfish's Furniture Mod] (MrCrayfishFurnitureModv3.4.7(1.7.10).jar) 
	UCH	recipehandler{1.7.10} [NoMoreRecipeConflict] (NoMoreRecipeConflict-1.7.10-0.3.2.jar) 
	UCH	clayspawn{1.7.10b} [Pam's Clayspawn] (Pam's Clay Spawn 1.7.10b.jar) 
	UCH	server_side_chunk_loader{0.2.6} [Server Side Chunk Loader] (ServerSideChunkLoader-2.6.jar) 
	UCH	sleepingbag{0.1.1} [Sleeping Bag] (SleepingBag-1.7.10-0.1.1.jar) 
	UCH	VeinMiner{0.36.0_1.7.10-28a7f13} [Vein Miner] (WA-VeinMiner-1.7.10-0.36.0.496.jar) 
	UCH	VeinMinerModSupport{0.36.0_1.7.10-28a7f13} [Mod Support] (WA-VeinMiner-1.7.10-0.36.0.496.jar) 
	UCH	Waila{1.5.10} [Waila] (Waila-1.5.10_1.7.10.jar) 
	UCH	WailaHarvestability{1.1.6} [Waila Harvestability] (WailaHarvestability-mc1.7.10-1.1.6.jar) 
	UCH	wawla{1.3.1} [What Are We Looking At] (Wawla-1.0.5.120.jar) 
	UCH	XaeroMinimap{21.10.42} [Xaero's Minimap] (Xaeros_Minimap_21.10.42_Forge_1.7.10.jar) 
	UCH	XaeroWorldMap{1.14.1.32} [Xaero's World Map] (XaerosWorldMap_1.14.1.32_Forge_1.7.10.jar) 
	NTM Modified recipes:: 
	Mixins in Stacktrace: 
		cpw.mods.fml.common.LoadController:
			mixin.mixinbooterlegacy.json:LoadControllerMixin from mod (unknown)
	Profiler Position: N/A (disabled)
	Is Modded: Definitely; Server brand changed to 'fml,forge'
	Type: Dedicated Server (map_server.txt)

Notably, I'm running JamesH2's fork with the latest upstream changes manually merged, but I don't think it played a role here.

I have also confirmed that removing the constant and using getInstance() directly does indeed resolve the crash

commented

it's fucking lego

commented

Latest commits should fix it