[1.20.1 Bug]: Client Crash - Invalid ResourceLocation "dragonsurvival:fake inventory player_adult"
ByThePowerOfScience opened this issue · 1 comments
■ Your Discord ID or other contacts
@ abadhaiku
■ Dragon Survival version
DragonSurvival-1.20.1-11.06.2024
■ Forge/Neoforge version
Forge 47.2.30
■ Single game or server?
Host site
■ Describe the bug
Hiya, fellow mod dev here. I'm an admin on the server in question.
When trying to use /invsee
on a dragon player, I get a consistent client crash with the following stacktrace:
Remapped Stacktrace
net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location: dragonsurvival:fake inventory player_adult
at TRANSFORMER/[email protected]/net.minecraft.resources.ResourceLocation.assertValidPath(ResourceLocation.java:236)
at TRANSFORMER/[email protected]/net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:38)
at TRANSFORMER/[email protected]/by.dragonsurvivalteam.dragonsurvival.client.skins.DragonSkins.fetchSkinFile(DragonSkins.java:90)
at TRANSFORMER/[email protected]/by.dragonsurvivalteam.dragonsurvival.client.skins.DragonSkins.fetchSkinFile(DragonSkins.java:163)
at TRANSFORMER/[email protected]/by.dragonsurvivalteam.dragonsurvival.client.skins.DragonSkins.getPlayerSkin(DragonSkins.java:74)
at TRANSFORMER/[email protected]/by.dragonsurvivalteam.dragonsurvival.client.render.ClientDragonRender.thirdPersonPreRender(ClientDragonRender.java:244)
at TRANSFORMER/[email protected]/by.dragonsurvivalteam.dragonsurvival.client.render.__ClientDragonRender_thirdPersonPreRender_Pre.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.entity.player.PlayerRenderer.redirect$zfm001$modernfix$fireCheckingPoseStack(PlayerRenderer.java:1020)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.entity.player.PlayerRenderer.render(PlayerRenderer.java:62)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.entity.player.PlayerRenderer.render(PlayerRenderer.java:44)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.entity.EntityRenderDispatcher.render(EntityRenderDispatcher.java:140)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.inventory.InventoryScreen.lambda$renderEntityInInventory$1(InventoryScreen.java:138)
at TRANSFORMER/[email protected]/com.mojang.blaze3d.systems.RenderSystem.runAsFancy(RenderSystem.java:1191)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.inventory.InventoryScreen.redirect$hge000$dragonsurvival$dragonScreenEntityRender(InventoryScreen.java:1567)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.inventory.InventoryScreen.renderEntityInInventory(InventoryScreen.java:137)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.inventory.InventoryScreen.renderEntityInInventoryFollowsAngle(InventoryScreen.java:116)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.inventory.InventoryScreen.renderEntityInInventoryFollowsMouse(InventoryScreen.java:97)
at TRANSFORMER/[email protected]/earth.terrarium.prometheus.client.screens.InvseeScreen.renderBg(InvseeScreen.java:66)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.render(AbstractContainerScreen.java:92)
at TRANSFORMER/[email protected]/com.teamresourceful.resourcefullib.client.screens.AbstractContainerCursorScreen.render(AbstractContainerCursorScreen.java:22)
at TRANSFORMER/[email protected]/earth.terrarium.prometheus.client.screens.InvseeScreen.render(InvseeScreen.java:50)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.Screen.renderWithTooltip(Screen.java:109)
at TRANSFORMER/[email protected]/net.minecraftforge.client.ForgeHooksClient.drawScreenInternal(ForgeHooksClient.java:427)
at TRANSFORMER/[email protected]/net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:420)
at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:965)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.runTick(Minecraft.java:1146)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.run(Minecraft.java:718)
at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:218)
[...internal lines]
Yeah, looks like Minecraft throws a fit when you have spaces in your ResourceLocation
subkey.
Replacing the spaces with underscores on the declaration will fix it, just remember to make the same change to its uses too so you don't go around in circles wondering why it isn't working like I've done before. 😅
Cheers!
■ Crash Report File and Logs
fake inventory player
seems to be the player name that gets passed to dragon survival which then tries to fetch the corresponding skin file in here
so technically the mod you're using is setting an invalid player name here
since spaces are not actually allowed (at least you cannot use them in an actual username)
I'm not sure how safe it would be to start modifying the username that gets passed by replacing spaces with underscores here or if there is an easy way to ignore profiles like that / if it would be correct to do so
(i suppose for that mod it should be fine since their fake player wouldn't be a dragon)