McJtyMods / LostSouls

Addon for The Lost Cities to make the buildings more challenging
MIT License
3 stars 2 forks source link

Dimension name not escaped - causes problems with dimensions named with slashes in them. #12

Closed portablejim closed 11 months ago

portablejim commented 11 months ago

On trying to kill mobs, I noticed an error occurring in the log files.

10:25:20] [Server thread/ERROR] [lostsouls/]: ForgeEventHandlers.onKill ERROR
java.lang.NumberFormatException: For input string: "d51483d8-8143-4bc9-8758-c48af3753737"
    at java.lang.NumberFormatException.forInputString(Unknown Source) ~[?:?] {}
    at java.lang.Integer.parseInt(Unknown Source) ~[?:?] {re:mixin}
    at java.lang.Integer.parseInt(Unknown Source) ~[?:?] {re:mixin}
    at mcjty.lostsouls.ForgeEventHandlers.onKill(ForgeEventHandlers.java:298) ~[lostsouls-1.19-3.0.1.jar%23478!/:1.19-3.0.1] {re:classloading}
    at mcjty.lostsouls.__ForgeEventHandlers_onKill_LivingDeathEvent.invoke(.dynamic) ~[lostsouls-1.19-3.0.1.jar%23478!/:1.19-3.0.1] {re:classloading,pl:eventbus:B}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2351!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2351!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2351!/:?] {}
    at net.minecraftforge.common.ForgeHooks.onLivingDeath(ForgeHooks.java:354) ~[forge-1.19.2-43.3.5-universal.jar%23578!/:?] {re:mixin,re:classloading,pl:mixin:APP:mixins.hammerlib.json:ForgeHooksMixin,pl:mixin:APP:apotheosis.mixins.json:ForgeHooksMixin,pl:mixin:APP:lootjs-forge.mixins.json:ForgeHooksMixin,pl:mixin:A}
    at net.minecraft.world.entity.LivingEntity.m_6667_(LivingEntity.java:1277) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:LivingEntityMixin,pl:mixin:APP:apotheosis.mixins.json:LivingEntityInvoker,pl:mixin:APP:apotheosis.mixins.json:LivingEntityMixin,pl:mixin:APP:apotheosis.mixins.json:MHFMixinLivingEntity,pl:mixin:APP:supplementaries-common.mixins.json:LivingEntityMixin,pl:mixin:APP:blockrunner.common.mixins.json:LivingEntityMixin,pl:mixin:APP:botania_xplat.mixins.json:LivingEntityAccessor,pl:mixin:APP:curios.mixins.json:MixinLivingEntity,pl:mixin:APP:caelus.mixins.json:MixinLivingEntity,pl:mixin:APP:citadel.mixins.json:LivingEntityMixin,pl:mixin:APP:bookshelf.common.mixins.json:entity.AccessorLivingEntity,pl:mixin:APP:bookshelf.common.mixins.json:entity.MixinLivingEntity,pl:mixin:APP:cataclysm.mixins.json:LivingEntityMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinLivingEntity,pl:mixin:APP:mixins.chromaticarsenal.json:MixinLivingEntity,pl:mixin:APP:quark.mixins.json:accessor.AccessorLivingEntity,pl:mixin:APP:charmofundying.mixins.json:MixinLivingEntity,pl:mixin:APP:expandability.mixins.json:swimming.LivingEntityMixin,pl:mixin:APP:expandability-common.mixins.json:swimming.LivingEntityMixin,pl:mixin:A}
    at net.minecraft.world.entity.LivingEntity.m_6469_(LivingEntity.java:1155) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:LivingEntityMixin,pl:mixin:APP:apotheosis.mixins.json:LivingEntityInvoker,pl:mixin:APP:apotheosis.mixins.json:LivingEntityMixin,pl:mixin:APP:apotheosis.mixins.json:MHFMixinLivingEntity,pl:mixin:APP:supplementaries-common.mixins.json:LivingEntityMixin,pl:mixin:APP:blockrunner.common.mixins.json:LivingEntityMixin,pl:mixin:APP:botania_xplat.mixins.json:LivingEntityAccessor,pl:mixin:APP:curios.mixins.json:MixinLivingEntity,pl:mixin:APP:caelus.mixins.json:MixinLivingEntity,pl:mixin:APP:citadel.mixins.json:LivingEntityMixin,pl:mixin:APP:bookshelf.common.mixins.json:entity.AccessorLivingEntity,pl:mixin:APP:bookshelf.common.mixins.json:entity.MixinLivingEntity,pl:mixin:APP:cataclysm.mixins.json:LivingEntityMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinLivingEntity,pl:mixin:APP:mixins.chromaticarsenal.json:MixinLivingEntity,pl:mixin:APP:quark.mixins.json:accessor.AccessorLivingEntity,pl:mixin:APP:charmofundying.mixins.json:MixinLivingEntity,pl:mixin:APP:expandability.mixins.json:swimming.LivingEntityMixin,pl:mixin:APP:expandability-common.mixins.json:swimming.LivingEntityMixin,pl:mixin:A}
    at net.minecraft.world.entity.projectile.AbstractArrow.m_5790_(AbstractArrow.java:327) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:supplementaries-common.mixins.json:AbstractArrowMixin,pl:mixin:APP:quark.mixins.json:accessor.AccessorAbstractArrow,pl:mixin:A}
    at net.minecraft.world.entity.projectile.Projectile.m_6532_(Projectile.java:135) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:elementalcraft.mixins.json:MixinProjectile,pl:mixin:A}
    at net.minecraft.world.entity.projectile.AbstractArrow.m_8119_(AbstractArrow.java:189) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:supplementaries-common.mixins.json:AbstractArrowMixin,pl:mixin:APP:quark.mixins.json:accessor.AccessorAbstractArrow,pl:mixin:A}
    at net.minecraft.world.entity.projectile.Arrow.m_8119_(Arrow.java:104) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:classloading}
    at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:658) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:kubejs-common.mixins.json:ServerLevelMixin,pl:mixin:APP:mixins.hammerlib.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:botania_xplat.mixins.json:ServerLevelMixin,pl:mixin:APP:ftbteamdimensions.mixins.json:ServerLevelAccess,pl:mixin:APP:crafttweaker.mixins.json:common.transform.world.level.MixinServerLevel,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:citadel.mixins.json:ServerLevelMixin,pl:mixin:A}
    at net.minecraft.world.level.Level.m_46653_(Level.java:457) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:beefix:Level,re:classloading,pl:accesstransformer:B,xf:fml:beefix:Level,pl:mixin:APP:kubejs-common.mixins.json:LevelMixin,pl:mixin:APP:mixins.hammerlib.json:LevelMixin,pl:mixin:APP:botania_xplat.mixins.json:LevelAccessor,pl:mixin:APP:ic2.mixins.json:server.LevelMixin,pl:mixin:APP:ftbteamdimensions.mixins.json:LevelAccess,pl:mixin:APP:citadel.mixins.json:LevelMixin,pl:mixin:A}
    at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:323) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:kubejs-common.mixins.json:ServerLevelMixin,pl:mixin:APP:mixins.hammerlib.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:botania_xplat.mixins.json:ServerLevelMixin,pl:mixin:APP:ftbteamdimensions.mixins.json:ServerLevelAccess,pl:mixin:APP:crafttweaker.mixins.json:common.transform.world.level.MixinServerLevel,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:citadel.mixins.json:ServerLevelMixin,pl:mixin:A}
    at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:classloading}
    at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:303) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:kubejs-common.mixins.json:ServerLevelMixin,pl:mixin:APP:mixins.hammerlib.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:botania_xplat.mixins.json:ServerLevelMixin,pl:mixin:APP:ftbteamdimensions.mixins.json:ServerLevelAccess,pl:mixin:APP:crafttweaker.mixins.json:common.transform.world.level.MixinServerLevel,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:citadel.mixins.json:ServerLevelMixin,pl:mixin:A}
    at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:866) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
    at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:292) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
    at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
    at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23573!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
    at java.lang.Thread.run(Unknown Source) [?:?] {re:mixin}

From investigation, this seems to be caused by the dimension name containing '/' but it is not being escaped when being saved as a tag on the mob.

portablejim commented 11 months ago

Something listing dimension names: Screenshot 2023-12-03 110544

In case it matters, modpack is FTB Genesis 1.3.2 with a world taken from singleplayer and moved to a server, but it seemed to be broken before then.

portablejim commented 11 months ago

FTB bug with issue: https://github.com/FTBTeam/FTB-Modpack-Issues/issues/4276

McJty commented 11 months ago

Hmm / is normally not a valid character for dimension names. Weird that that got accepted. This is going to be hard to fix...

McJty commented 11 months ago

Fixed