Vitality

Vitality

263k Downloads

Dedicated server crash

LemADEC opened this issue ยท 1 comments

commented

As of vitality-2.4, dedicated server will crash when trying to transmute an altar with insufficient essence.
Mod is trying to use client side class (message translation?) on server side.

See SpongePowered/Sponge#1273 (comment)
Related logs: https://gist.github.com/bloodmc/7edf67448c9fcf053038a27eff0bcd44#file-stacktrace-txt-L66
Related source code: https://github.com/raphydaphy/Vitality/blob/master/src/main/java/com/raphydaphy/vitality/item/ItemWand.java#L535

I18n is client side only.
The proper class to use is TextComponentTranslation()

commented

Another similar issue here:

[00:49:01] [Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/minecraft/client/resources/I18n
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_121]
>       at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_121]
>       at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
>       at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:239) [SpongeImplHooks.class:1.10.2-2254-5.2.0-BETA-2254]
>       at net.minecraft.server.MinecraftServer.redirect$onRun$zhn000(MinecraftServer.java:3928) [MinecraftServer.class:?]
>       at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668) [MinecraftServer.class:?]
>       at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387) [ld.class:?]
>       at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) [MinecraftServer.class:?]
>       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
>       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/resources/I18n
>       at com.raphydaphy.vitality.block.tile.TileAltar.onWanded(TileAltar.java:216) ~[TileAltar.class:?]
>       at com.raphydaphy.vitality.block.BlockAltar.onUsedByWand(BlockAltar.java:43) ~[BlockAltar.class:?]
>       at com.raphydaphy.vitality.item.ItemWand.func_180614_a(ItemWand.java:419) ~[ItemWand.class:?]
>       at net.minecraft.item.ItemStack.func_179546_a(ItemStack.java:3187) ~[adz.class:?]
>       at net.minecraft.server.management.PlayerInteractionManager.func_187251_a(PlayerInteractionManager.java:1286) ~[lv.class:?]
>       at net.minecraft.network.NetHandlerPlayServer.redirect$onProcessRightClickBlock$zhd000(NetHandlerPlayServer.java:2266) ~[me.class:?]
>       at net.minecraft.network.NetHandlerPlayServer.func_184337_a(NetHandlerPlayServer.java:679) ~[me.class:?]
>       at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:55) ~[jj.class:?]
>       at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:11) ~[jj.class:?]
>       at org.spongepowered.common.network.PacketUtil.lambda$onProcessPacket$0(PacketUtil.java:157) ~[PacketUtil.class:1.10.2-2254-5.2.0-BETA-2254]
>       at org.spongepowered.common.event.tracking.CauseTracker.switchToPhase(CauseTracker.java:159) ~[CauseTracker.class:1.10.2-2254-5.2.0-BETA-2254]
>       at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:156) ~[PacketUtil.class:1.10.2-2254-5.2.0-BETA-2254]
>       at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zjg000(SourceFile:539) ~[fl$1.class:?]
>       at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[fl$1.class:?]
>       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_121]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121]
>       at net.minecraft.util.Util.func_181617_a(SourceFile:45) ~[h.class:?]
>       ... 7 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.resources.I18n
>       at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101) ~[launchwrapper-1.12.jar:?]
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121]
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121]
>       at com.raphydaphy.vitality.block.tile.TileAltar.onWanded(TileAltar.java:216) ~[TileAltar.class:?]
>       at com.raphydaphy.vitality.block.BlockAltar.onUsedByWand(BlockAltar.java:43) ~[BlockAltar.class:?]
>       at com.raphydaphy.vitality.item.ItemWand.func_180614_a(ItemWand.java:419) ~[ItemWand.class:?]
>       at net.minecraft.item.ItemStack.func_179546_a(ItemStack.java:3187) ~[adz.class:?]
>       at net.minecraft.server.management.PlayerInteractionManager.func_187251_a(PlayerInteractionManager.java:1286) ~[lv.class:?]
>       at net.minecraft.network.NetHandlerPlayServer.redirect$onProcessRightClickBlock$zhd000(NetHandlerPlayServer.java:2266) ~[me.class:?]
>       at net.minecraft.network.NetHandlerPlayServer.func_184337_a(NetHandlerPlayServer.java:679) ~[me.class:?]
>       at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:55) ~[jj.class:?]
>       at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:11) ~[jj.class:?]
>       at org.spongepowered.common.network.PacketUtil.lambda$onProcessPacket$0(PacketUtil.java:157) ~[PacketUtil.class:1.10.2-2254-5.2.0-BETA-2254]
>       at org.spongepowered.common.event.tracking.CauseTracker.switchToPhase(CauseTracker.java:159) ~[CauseTracker.class:1.10.2-2254-5.2.0-BETA-2254]
>       at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:156) ~[PacketUtil.class:1.10.2-2254-5.2.0-BETA-2254]
>       at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zjg000(SourceFile:539) ~[fl$1.class:?]
>       at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[fl$1.class:?]
>       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_121]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121]
>       at net.minecraft.util.Util.func_181617_a(SourceFile:45) ~[h.class:?]
>       ... 7 more