TeamMidnightDust / MidnightLib

Common Library for Team MidnightDust's mods. Provides a config api, common utils, and cosmetics.
https://midnightdust.eu/midnightlib
MIT License
34 stars 17 forks source link

Crash on disabling the hats #1

Closed Madis0 closed 2 years ago

Madis0 commented 2 years ago

Got a crash with hats disabled and looking at my player using F5.

On an isolated instance with only Cull Leaves, Fabric API and Mod Menu this did not occur, however the crash still seems to be related to this mod (library) specifically.

``` ---- Minecraft Crash Report ---- // You're mean. Time: 10/19/21, 7:00 PM Description: Rendering entity in world java.lang.NullPointerException: Cannot invoke "java.util.Map.containsKey(Object)" because "eu.midnightdust.hats.web.HatLoader.PLAYER_HATS" is null at Not Enough Crashes deobfuscated stack trace.(1.17.1+build.61) at eu.midnightdust.hats.witch.WitchHatFeatureRenderer.getHat(WitchHatFeatureRenderer.java:67) at eu.midnightdust.hats.witch.WitchHatFeatureRenderer.render(WitchHatFeatureRenderer.java:52) at eu.midnightdust.hats.witch.WitchHatFeatureRenderer.render(WitchHatFeatureRenderer.java:26) at net.minecraft.client.render.entity.LivingEntityRenderer.render(LivingEntityRenderer:139) at net.minecraft.client.render.entity.PlayerEntityRenderer.render(PlayerEntityRenderer:64) at net.minecraft.client.render.entity.PlayerEntityRenderer.render(PlayerEntityRenderer:42) at net.minecraft.client.render.entity.EntityRenderDispatcher.render(EntityRenderDispatcher:135) at net.minecraft.client.render.WorldRenderer.renderEntity(WorldRenderer:1482) at net.minecraft.client.render.WorldRenderer.render(WorldRenderer:1230) at net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer:1026) at net.minecraft.client.render.GameRenderer.render(GameRenderer:810) at net.minecraft.client.MinecraftClient.render(MinecraftClient:1112) at net.minecraft.client.MinecraftClient.run(MinecraftClient:728) at net.minecraft.client.main.Main.main(Main:217) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:567) at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at eu.midnightdust.hats.witch.WitchHatFeatureRenderer.getHat(WitchHatFeatureRenderer.java:67) at eu.midnightdust.hats.witch.WitchHatFeatureRenderer.render(WitchHatFeatureRenderer.java:52) at eu.midnightdust.hats.witch.WitchHatFeatureRenderer.method_4199(WitchHatFeatureRenderer.java:26) at net.minecraft.class_922.method_4054(class_922.java:139) at net.minecraft.class_1007.method_4215(class_1007.java:64) at net.minecraft.class_1007.method_3936(class_1007.java:42) -- Entity being rendered -- Details: Entity Type: minecraft:player (net.minecraft.class_746) Entity ID: 22 Entity Name: robotkoer Entity's Exact location: 211.50, 4.00, -216.50 Entity's Block location: World: (211,4,-217), Section: (at 3,4,7 in 13,0,-14; chunk contains blocks 208,0,-224 to 223,255,-209), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Passengers: [] Entity's Vehicle: null Entity NBT: {AbsorptionAmount:0.0f,Air:300s,Attributes:[{Base:0.10000000149011612d,Name:"minecraft:generic.movement_speed"}],Brain:{memories:{}},DataVersion:2730,DeathTime:0s,EnderItems:[],FallDistance:0.0f,FallFlying:0b,Fire:-20s,Health:20.0f,HurtByTimestamp:0,HurtTime:0s,Inventory:[],Invulnerable:0b,Motion:[0.0d,-0.0784000015258789d,0.0d],OnGround:1b,PortalCooldown:0,Pos:[211.5d,4.0d,-216.5d],Rotation:[-2.2500002f,-0.15000002f],Score:0,SelectedItemSlot:0,SleepTimer:0s,UUID:[I;1478115109,-617853358,-1742511383,-462221910],XpLevel:0,XpP:0.0f,XpSeed:0,XpTotal:0,abilities:{flySpeed:0.05f,flying:0b,instabuild:0b,invulnerable:0b,mayBuild:1b,mayfly:0b,walkSpeed:0.1f},foodExhaustionLevel:0.0f,foodLevel:20,foodSaturationLevel:5.0f,foodTickTimer:0} Stacktrace: at Not Enough Crashes deobfuscated stack trace.(1.17.1+build.61) at java.lang.Thread.getStackTrace(Thread.java:1596) at net.minecraft.util.crash.CrashReportSection.trimStackTraceEnd(CrashReportSection:523) at net.minecraft.util.crash.CrashReport.addElement(CrashReport:198) at net.minecraft.util.crash.CrashReport.addElement(CrashReport:169) at net.minecraft.client.render.entity.EntityRenderDispatcher.render(EntityRenderDispatcher:160) at net.minecraft.client.render.WorldRenderer.renderEntity(WorldRenderer:1482) at net.minecraft.client.render.WorldRenderer.render(WorldRenderer:1230) at net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer:1026) at net.minecraft.client.render.GameRenderer.render(GameRenderer:810) at net.minecraft.client.MinecraftClient.render(MinecraftClient:1112) at net.minecraft.client.MinecraftClient.run(MinecraftClient:728) at net.minecraft.client.main.Main.main(Main:217) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:567) at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) -- Renderer details -- Details: Assigned renderer: net.minecraft.class_1007@4478a4ff Location: 0.16,-1.61,4.00 - World: (0,-2,3), Section: (at 0,14,3 in 0,-1,0; chunk contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Rotation: -2.2500002 Delta: 0.30000472 Stacktrace: at Not Enough Crashes deobfuscated stack trace.(1.17.1+build.61) at java.lang.Thread.getStackTrace(Thread.java:1596) at net.minecraft.util.crash.CrashReportSection.trimStackTraceEnd(CrashReportSection:523) at net.minecraft.util.crash.CrashReport.addElement(CrashReport:198) at net.minecraft.world.World.addDetailsToCrashReport(World:845) at net.minecraft.client.world.ClientWorld.addDetailsToCrashReport(ClientWorld:370) at net.minecraft.client.MinecraftClient.addDetailsToCrashReport(MinecraftClient:2399) at net.minecraft.client.MinecraftClient.run(MinecraftClient:747) at net.minecraft.client.main.Main.main(Main:217) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:567) at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) -- Affected level -- Details: All players: 1 total; [class_746['robotkoer'/22, l='ClientLevel', x=211.50, y=4.00, z=-216.50]] Chunk stats: 1024, 529 Level dimension: minecraft:overworld Level spawn location: World: (208,4,-208), Section: (at 0,4,0 in 13,0,-13; chunk contains blocks 208,0,-208 to 223,255,-193), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 162 game time, 162 day time Server brand: fabric Server type: Integrated singleplayer server Stacktrace: at net.minecraft.class_638.method_8538(class_638.java:370) at net.minecraft.class_310.method_1587(class_310.java:2399) at net.minecraft.class_310.method_1514(class_310.java:747) at net.minecraft.client.main.Main.main(Main.java:217) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) -- Last reload -- Details: Reload number: 1 Reload reason: initial Finished: Yes Packs: Default, Fabric Mods, lambdabettergrass/default, continuity/default, continuity/glass_pane_culling_fix, cullleaves/smartleaves, Mod Menu Helper -- System Details -- Details: Minecraft Version: 1.17.1 Minecraft Version ID: 1.17.1 Operating System: Windows 10 (amd64) version 10.0 Java Version: 16.0.1, Microsoft Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft Memory: 550450528 bytes (524 MiB) / 1126170624 bytes (1074 MiB) up to 4294967296 bytes (4096 MiB) CPUs: 8 Processor Vendor: GenuineIntel Processor Name: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz Identifier: Intel64 Family 6 Model 126 Stepping 5 Microarchitecture: Ice Lake (Client) Frequency (GHz): 1.50 Number of physical packages: 1 Number of physical CPUs: 4 Number of logical CPUs: 8 Graphics card #0 name: Intel(R) Iris(R) Plus Graphics Graphics card #0 vendor: Intel Corporation (0x8086) Graphics card #0 VRAM (MB): 1024.00 Graphics card #0 deviceId: 0x8a52 Graphics card #0 versionInfo: DriverVersion=27.20.100.8783 Memory slot #0 capacity (MB): 4096.00 Memory slot #0 clockSpeed (GHz): 2.67 Memory slot #0 type: DDR4 Memory slot #1 capacity (MB): 4096.00 Memory slot #1 clockSpeed (GHz): 2.67 Memory slot #1 type: DDR4 Virtual memory max (MB): 14967.05 Virtual memory used (MB): 8927.41 Swap memory total (MB): 6999.05 Swap memory used (MB): 0.00 JVM Flags: 5 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4096m -Xms256m -XX:PermSize=256m Fabric Mods: advanced_runtime_resource_pack: Runtime Resource Pack 0.4.3 advancementinfo: AdvancementInfo 1.17.1-fabric0.36.1-1.2.1 animatica: Animatica 0.1+1.17 antighost: AntiGhost 1.17.1-fabric0.36.1-1.1.4 architectury: Architectury 2.5.32 autoconfig1u: Auto Config v1 Updated 3.2.2 bettermounthud: Better Mount HUD 1.1.2 capes: Capes 1.2.1 cem: Custom Entity Models 0.6.2 citresewn: CITResewn 0.8.0 cloth-api: Cloth API 2.0.54 cloth-basic-math: Cloth Basic Math 0.5.1 cloth-client-events-v0: Cloth Client Events v0 2.0.54 cloth-common-events-v1: Cloth Common Events v1 2.0.54 cloth-config2: Cloth Config v5 5.0.38 cloth-datagen-api-v1: Cloth Datagen v1 2.0.54 cloth-scissors-api-v1: Cloth Scissors API v1 2.0.54 cloth-utils-v1: Cloth Utils v1 2.0.54 colormatic: Colormatic 2.3.0+mc.1.17.1 com_moandjiezana_toml_toml4j: toml4j 0.7.2 completeconfig: CompleteConfig 1.2.0 continuity: Continuity 1.0.1+1.17 crowdin-translate: CrowdinTranslate 1.3+1.17 cullleaves: Cull Leaves 2.3.0 dcch: DCCH 1.0 dynamicfps: Dynamic FPS 2.0.5 enhancedblockentities: Enhanced Block Entities 0.5+1.17 entityculling: EntityCulling-Fabric 1.3.3 fabric: Fabric API 0.40.8+1.17 fabric-api-base: Fabric API Base 0.3.0+a02b446313 fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.3.0+cbda931818 fabric-biome-api-v1: Fabric Biome API (v1) 3.2.0+cbda931818 fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.5+a02b446318 fabric-command-api-v1: Fabric Command API (v1) 1.1.3+5ab9934c18 fabric-commands-v0: Fabric Commands (v0) 0.2.2+92519afa18 fabric-containers-v0: Fabric Containers (v0) 0.1.12+cbda931818 fabric-content-registries-v0: Fabric Content Registries (v0) 0.3.0+cbda931818 fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.5+be9da31018 fabric-dimensions-v1: Fabric Dimensions API (v1) 2.0.11+6cefd57718 fabric-entity-events-v1: Fabric Entity Events (v1) 1.2.3+87cc6e4c18 fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.10+fc40aa9d18 fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+92519afa18 fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.7+cbda931818 fabric-item-api-v1: Fabric Item API (v1) 1.2.4+cbda931818 fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.10+b7ab612118 fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.4+cbda931818 fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.2+36b77c3e18 fabric-language-kotlin: Fabric Language Kotlin 1.6.5+kotlin.1.5.31 fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.4+a02b44633d fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.4+a02b446318 fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+92519afa18 fabric-models-v0: Fabric Models (v0) 0.3.0+a02b446318 fabric-networking-api-v1: Fabric Networking API (v1) 1.0.13+cbda931818 fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.11+a02b446318 fabric-networking-v0: Fabric Networking (v0) 0.3.2+92519afa18 fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.10.9+cbda931818 fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.3+a02b446318 fabric-particles-v1: Fabric Particles (v1) 0.2.4+a02b446318 fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.11+7931163218 fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.4+cbda931818 fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.8+cbda931818 fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.4+7931163218 fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+a02b446313 fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.14+4658223018 fabric-rendering-v0: Fabric Rendering (v0) 1.1.5+7931163218 fabric-rendering-v1: Fabric Rendering (v1) 1.9.0+7931163218 fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.8+a00e834b18 fabric-screen-api-v1: Fabric Screen API (v1) 1.0.4+198a96213d fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.8+cbda931818 fabric-structure-api-v1: Fabric Structure API (v1) 1.1.13+5ab9934c18 fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.2.1+b06cb95b18 fabric-textures-v0: Fabric Textures (v0) 1.0.6+a02b446318 fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.12+b7ab612118 fabric-transfer-api-v1: Fabric Transfer API (v1) 1.4.0+7931163218 fabricloader: Fabric Loader 0.11.6 fabrishot: Fabrishot 1.5.1 ferritecore: FerriteCore 3.0.3 hydrogen: Hydrogen 0.3 indium: Indium 1.0.0+mc1.17.1 iris: Iris 1.1.2+build.9 itemmodelfix: Item Model Fix 1.0.2+1.17 java: OpenJDK 64-Bit Server VM 16 lambdabettergrass: LambdaBetterGrass 1.2.1+1.17 lambdynlights: LambDynamicLights 2.0.2+1.17 languagereload: Language Reload 1.1 lazydfu: LazyDFU 0.1.2 lithium: Lithium 0.7.4 littletweaks: LittleTweaks 0.1.1 midnightlib: MidnightLib 0.2.6 minecraft: Minecraft 1.17.1 mm: Manningham Mills 2.1 modmenu: Mod Menu 2.0.14 morechathistory: MoreChatHistory 1.1.0 no-potion-offset: No Potion Offset ${version} nofade: No Fade 1.17-2.0.0 notenoughcrashes: Not Enough Crashes 3.7.0+1.17.1 org_aperlambda_lambdajcommon: lambdajcommon 1.8.1 org_codehaus_groovy_groovy: groovy 3.0.8 org_codehaus_groovy_groovy-jsr223: groovy-jsr223 3.0.8 org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.5.31 org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.5.31 org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.5.31 org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.5.31 org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.5.2 org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.5.2 org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.3.0 org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.3.0 reeses-sodium-options: Reese's Sodium Options 1.2.0 slight-gui-modifications: 'Slight' GUI Modifications 2.0.1 smoothboot: Smooth Boot 1.16.5-1.6.0 sodium: Sodium 0.3.2+IRIS2-build.9 sodium-extra: Sodium Extra 0.3.5 spruceui: SpruceUI 3.3.0+1.17 tooltipfix: ToolTip Fix 1.0.4-1.17.1 wi_zoom: WI Zoom 1.3-MC1.17.1 yosbr: YOSBR 0.1.1 Launched Version: fabric-loader-0.11.6-1.17.1 Backend library: LWJGL version 3.2.2 build 10 Backend API: Intel(R) Iris(R) Plus Graphics GL version 3.2.0 - Build 27.20.100.8783, Intel Window size: 1024x768 GL Caps: Using framebuffer using OpenGL 3.2 GL debug messages: Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fabric' Type: Integrated Server (map_client.txt) Graphics mode: fancy Resource Packs: vanilla, Fabric Mods, lambdabettergrass/default, continuity/default, continuity/glass_pane_culling_fix, cullleaves/smartleaves, file/Mod Menu Helper Current Language: English (US) CPU: 8x Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz Player Count: 1 / 8; [class_3222['robotkoer'/22, l='ServerLevel[New World]', x=211.50, y=4.00, z=-216.50]] Data Packs: vanilla, Fabric Mods Client Crashes Since Restart: 1 Integrated Server Crashes Since Restart: 0 Suspected Mods: LazyDFU (lazydfu), Fabric Loader (fabricloader) ```
Motschen commented 2 years ago

Please try again with the latest MidnightLib version, it should be fixed now. Sorry for the inconvenience, it was an oversight on my side.

Motschen commented 2 years ago

Lmk if it works, I'll then push it to Modrinth and CurseForge.

Madis0 commented 2 years ago

Seems to work so far, make sure to update Cull Leaves then as well.

Motschen commented 2 years ago

I'll update Cull Leaves soon, but in the meantime you can just include the latest version of MidnightLib in your modpack and it will override the older one shipped with Cull Leaves.

Motschen commented 2 years ago

Both MidnightLib and Cull Leaves are updated on CurseForge, Modrinth and GitHub :)

CREEATION commented 2 years ago

this is still a thing.

crash-2021-10-24_15.08.01-client.txt