Tech Reborn

Tech Reborn

30M Downloads

Alarm Running on Server Side spews client side missing resources.

StoneLegion opened this issue ยท 1 comments

commented
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/minecraft/client/resources/I18n
        at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_191]
        at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_191]
        at net.minecraft.util.Util.runTask(SourceFile:531) [h.class:?]
        at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:723) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:397) [nz.class:?]
        at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/resources/I18n
        at techreborn.tiles.TileAlarm.rightClick(TileAlarm.java:57) ~[TileAlarm.class:?]
        at techreborn.blocks.BlockAlarm.onBlockActivated(BlockAlarm.java:129) ~[BlockAlarm.class:?]
        at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:449) ~[or.class:?]
        at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:741) ~[pa.class:?]
        at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(SourceFile:55) ~[ma.class:?]
        at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(SourceFile:11) ~[ma.class:?]
        at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_191]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_191]
        at net.minecraft.util.Util.runTask(SourceFile:529) ~[h.class:?]
        ... 5 more

I assume this means that the server is trying find client side resources and not skipping it correctly?

Either way thought this belonged here.

Thanks.

commented

Looks like TR is accessing clientside only stuff (I18n) from methods that are supposed to be called on the server side as well. Relevant line of code:

ChatUtils.sendNoSpamMessages(MessageIDs.alarmID, new TextComponentString(TextFormatting.GRAY + I18n.format("techreborn.message.alarm") + " " + "Alarm " + selectedSound));

Instead of sending a text component with a translated string appended, TechReborn should instead send a text component for the start, a translation component for the alarm message, and then a text component for the end, which would properly utilize the JSON chat component system.