Relics

Relics

10M Downloads

Crash when rendering necklace overlay. Mod expects Player Entity from renderViewEntity

iChun opened this issue ยท 2 comments

commented

Crosspost from iChun/Hats#207

Hats uses a dummy Entity (extends Entity) to shift the render camera and to allow rendering the player without third person by replacing the renderViewEntity which is also of Entity type.

This line casts directly to PlayerEntity without checking if the renderViewEntity is a player first, leading to a crash.
https://github.com/SSKirillSS/relics/blob/master/src/main/java/it/hurts/sskirillss/relics/items/relics/ReflectionNecklaceItem.java#L175

commented

Thanks for the info. Should be fixed in 9841914.

commented

Yesterday I got a crash because of this very reason.
I'll leave the crash dump here in hopes that it helps.

 ---- Minecraft Crash Report ----
// My bad.

Time: 16-04-21 6:36
Description: Unexpected error

java.lang.ClassCastException: me.ichun.mods.hats.client.entity.EntityDummy cannot be cast to net.minecraft.entity.player.PlayerEntity
	at it.hurts.sskirillss.relics.items.relics.ReflectionNecklaceItem$ReflectionNecklaceClientEvents.onOverlayRender(ReflectionNecklaceItem.java:175) ~[?:0.1.10.1] {re:classloading}
	at net.minecraftforge.eventbus.ASMEventHandler_259_ReflectionNecklaceClientEvents_onOverlayRender_Pre.invoke(.dynamic) ~[?:?] {}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.eventbus.EventBus$$Lambda$2628/60799116.invoke(Unknown Source) ~[?:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.client.gui.ForgeIngameGui.pre(ForgeIngameGui.java:828) ~[?:?] {re:classloading}
	at net.minecraftforge.client.gui.ForgeIngameGui.func_238445_a_(ForgeIngameGui.java:121) ~[?:?] {re:classloading}
	at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:765) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
	at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:976) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.1.0.jar:36.1] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$488/1203142603.call(Unknown Source) [forge-1.16.5-36.1.0.jar:36.1] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at it.hurts.sskirillss.relics.items.relics.ReflectionNecklaceItem$ReflectionNecklaceClientEvents.onOverlayRender(ReflectionNecklaceItem.java:175) ~[?:0.1.10.1] {re:classloading}
	at net.minecraftforge.eventbus.ASMEventHandler_259_ReflectionNecklaceClientEvents_onOverlayRender_Pre.invoke(.dynamic) ~[?:?] {}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.eventbus.EventBus$$Lambda$2628/60799116.invoke(Unknown Source) ~[?:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
	at net.minecraftforge.client.gui.ForgeIngameGui.pre(ForgeIngameGui.java:828) ~[?:?] {re:classloading}
	at net.minecraftforge.client.gui.ForgeIngameGui.func_238445_a_(ForgeIngameGui.java:121) ~[?:?] {re:classloading}
-- Affected level --
Details:
	All players: 1 total; [ClientPlayerEntity['Yaranaika_san'/286, l='ClientLevel', x=70.20, y=63.00, z=-162.82]]
	Chunk stats: Client Chunk Cache: 441, 272
	Level dimension: minecraft:overworld
	Level spawn location: World: (16,70,-208), Chunk: (at 0,4,0 in 1,-13; contains blocks 16,0,-208 to 31,255,-193), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
	Level time: 8320 game time, 8320 day time
	Server brand: forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.world.ClientWorld.func_72914_a(ClientWorld.java:617) ~[?:?] {re:mixin,re:classloading,xf:OptiFine:default}
	at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2029) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:628) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.1.0.jar:36.1] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$488/1203142603.call(Unknown Source) [forge-1.16.5-36.1.0.jar:36.1] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading}


-- System Details --
Details:
	Minecraft Version: 1.16.5
	Minecraft Version ID: 1.16.5
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_51, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1836458728 bytes (1751 MB) / 3489660928 bytes (3328 MB) up to 4294967296 bytes (4096 MB)
	CPUs: 8
	JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	ModLauncher: 8.0.9+86+master.3cf110c
	ModLauncher launch target: fmlclient
	ModLauncher naming: srg
	ModLauncher services: 
		/mixin-0.8.2.jar mixin PLUGINSERVICE 
		/eventbus-4.0.0.jar eventbus PLUGINSERVICE 
		/forge-1.16.5-36.1.0.jar object_holder_definalize PLUGINSERVICE 
		/forge-1.16.5-36.1.0.jar runtime_enum_extender PLUGINSERVICE 
		/accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE 
		/forge-1.16.5-36.1.0.jar capability_inject_definalize PLUGINSERVICE 
		/forge-1.16.5-36.1.0.jar runtimedistcleaner PLUGINSERVICE 
		/mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE 
		/OptiFine_1.16.5_HD_U_G7.jar OptiFine TRANSFORMATIONSERVICE 
		/forge-1.16.5-36.1.0.jar fml TRANSFORMATIONSERVICE 
	FML: 36.1
	Forge: net.minecraftforge:36.1.0
	FML Language Providers: 
		[email protected]
		minecraft@1
	Mod List: 
		forge-1.16.5-36.1.0-client.jar                    |Minecraft                     |minecraft                     |1.16.5              |DONE      |NOSIGNATURE
		luckyblock-1.16.5-1-forge.jar                     |Lucky Block                   |lucky                         |1.16.5-1            |DONE      |NOSIGNATURE
		cleancut-mc1.16-2.2-forge.jar                     |Clean Cut                     |cleancut                      |2.2                 |DONE      |NOSIGNATURE
		CyclopsCore-1.16.5-1.11.5.jar                     |Cyclops Core                  |cyclopscore                   |1.11.5              |DONE      |NOSIGNATURE
		QuarkOddities-1.16.3.jar                          |Quark Oddities                |quarkoddities                 |1.16.3              |DONE      |NOSIGNATURE
		DungeonsMod-1.16.3-1.3.12.jar                     |Dungeons Mod                  |dungeonsmod                   |1.16.3-1.3.12       |DONE      |NOSIGNATURE
		morevanillalib-1.16.4-1.4.0.jar                   |MoreVanillaLib                |morevanillalib                |1.4.0               |DONE      |NOSIGNATURE
		Hats-1.16.5-10.1.0.jar                            |Hats                          |hats                          |10.1.0              |DONE      |NOSIGNATURE
		BiomesOPlenty-1.16.4-13.0.0.432-universal.jar     |Biomes O' Plenty              |biomesoplenty                 |1.16.4-13.0.0.432   |DONE      |NOSIGNATURE
		vanillaexcavators-1.16.2-2.1.3.jar                |Vanilla Excavators            |vanillaexcavators             |2.1.3               |DONE      |NOSIGNATURE
		Bountiful+Baubles+FORGE-1.16.3-0.0.2.jar          |Bountiful Baubles             |bountifulbaubles              |NONE                |DONE      |NOSIGNATURE
		morevanillatools-1.16.4-2.2.0.jar                 |MoreVanillaTools              |morevanillatools              |2.2.0               |DONE      |NOSIGNATURE
		jei-1.16.5-7.6.4.86.jar                           |Just Enough Items             |jei                           |7.6.4.86            |DONE      |NOSIGNATURE
		EverlastingAbilities-1.16.5-1.7.1.jar             |EverlastingAbilities          |everlastingabilities          |1.7.1               |DONE      |NOSIGNATURE
		towers_of_the_wild-1.16.4-2.0.1.jar               |Towers Of The Wild            |towers_of_the_wild            |1.16.4-2.0.1        |DONE      |NOSIGNATURE
		caelus-forge-1.16.5-2.1.3.0.jar                   |Caelus API                    |caelus                        |1.16.5-2.1.3.0      |DONE      |NOSIGNATURE
		curios-forge-1.16.5-4.0.5.1.jar                   |Curios API                    |curios                        |1.16.5-4.0.5.1      |DONE      |NOSIGNATURE
		tetra-1.16.5-3.8.0.jar                            |Tetra                         |tetra                         |3.8.0               |DONE      |NOSIGNATURE
		Patchouli-1.16.4-50.jar                           |Patchouli                     |patchouli                     |1.16.4-50           |DONE      |NOSIGNATURE
		Neat+1.7-27.jar                                   |Neat                          |neat                          |1.7-27              |DONE      |NOSIGNATURE
		Waystones_1.16.5-7.4.0.jar                        |Waystones                     |waystones                     |7.4.0               |DONE      |NOSIGNATURE
		gravestone-1.16.5-1.0.1.jar                       |Gravestone Mod                |gravestone                    |1.16.5-1.0.1        |DONE      |NOSIGNATURE
		Clumps-6.0.0.21.jar                               |Clumps                        |clumps                        |6.0.0.21            |DONE      |NOSIGNATURE
		mgui-1.16.4-3.1.3.jar                             |mgui                          |mgui                          |3.1.3               |DONE      |NOSIGNATURE
		journeymap-1.16.5-5.7.1.jar                       |Journeymap                    |journeymap                    |5.7.1               |DONE      |NOSIGNATURE
		FastWorkbench-1.16.4-4.5.1.jar                    |FastWorkbench                 |fastbench                     |4.5.1               |DONE      |NOSIGNATURE
		Placebo-1.16.4-4.4.1.jar                          |Placebo                       |placebo                       |4.4.1               |DONE      |NOSIGNATURE
		AutoRegLib-1.6-47.jar                             |AutoRegLib                    |autoreglib                    |1.6-47              |DONE      |NOSIGNATURE
		NaturesCompass-1.16.5-1.8.6.jar                   |Nature's Compass              |naturescompass                |1.16.5-1.8.6        |DONE      |NOSIGNATURE
		Artifacts-1.16.5-2.8.4.jar                        |Artifacts                     |artifacts                     |1.16.5-2.8.4        |DONE      |NOSIGNATURE
		performant-1.16.2-5-3.40m.jar                     |Performant                    |performant                    |3.40m               |DONE      |NOSIGNATURE
		vanillahammers-1.16.2-2.1.3.jar                   |Vanilla Hammers               |vanillahammers                |2.1.3               |DONE      |NOSIGNATURE
		travelers_index-1.16.4-1.0.2.jar                  |Traveler's Index              |travelers_index               |1.16.4-1.0.2        |DONE      |NOSIGNATURE
		relics-0.1.10.1.jar                               |Relics                        |relics                        |0.1.10.1            |DONE      |NOSIGNATURE
		Project_MMO-1.16.5-3.52.7.jar                     |Project MMO                   |pmmo                          |1.16.5-3.52.7       |DONE      |NOSIGNATURE
		curiouselytra-forge-1.16.5-4.0.2.3.jar            |Curious Elytra                |curiouselytra                 |1.16.5-4.0.2.3      |DONE      |NOSIGNATURE
		iChunUtil-1.16.5-10.2.0.jar                       |iChunUtil                     |ichunutil                     |10.2.0              |DONE      |NOSIGNATURE
		JustEnoughResources-1.16.3-0.12.0.100.jar         |Just Enough Resources         |jeresources                   |0.12.0.100          |DONE      |NOSIGNATURE
		forge-1.16.5-36.1.0-universal.jar                 |Forge                         |forge                         |36.1.0              |DONE      |22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90
		Psi+1.16-93.jar                                   |Psi                           |psi                           |1.16-92             |DONE      |NOSIGNATURE
		Quark-r2.4-310.jar                                |Quark                         |quark                         |r2.4-310            |DONE      |NOSIGNATURE
		AppleSkin-mc1.16.2-forge-1.0.14.jar               |AppleSkin                     |appleskin                     |1.0.14              |DONE      |NOSIGNATURE
		betterendforge-1.16.4-1.5.1.jar                   |BetterEnd Forge               |betterendforge                |1.16.4-1.5.1        |DONE      |NOSIGNATURE
		dungeonsarise1.16.5-1.2.68a-HF.jar                |Dungeons Arise                |dungeons_arise                |1.2.68a             |DONE      |NOSIGNATURE
	Crash Report UUID: 27e181cd-65f1-4805-8182-a4f161de8e54
	[Psi] Active spell: None
	Patchouli open book context: n/a
	Launched Version: 1.16.5-forge-36.1.0
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: AMD Radeon(TM) Vega 8 Graphics GL version 4.6.148202 Compatibility Profile Context 21.3.1 27.20.15003.1004, ATI Technologies Inc.
	GL Caps: Using framebuffer using OpenGL 3.0
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'forge'
	Type: Client (map_client.txt)
	Graphics mode: fast
	Resource Packs: 
	Current Language: English (US)
	CPU: 8x AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx 
	OptiFine Version: OptiFine_1.16.5_HD_U_G7
	OptiFine Build: 20210305-003221
	Render Distance Chunks: 8
	Mipmaps: 4
	Anisotropic Filtering: 1
	Antialiasing: 0
	Multitexture: false
	Shaders: null
	OpenGlVersion: 4.6.148202 Compatibility Profile Context 21.3.1 27.20.15003.1004
	OpenGlRenderer: AMD Radeon(TM) Vega 8 Graphics
	OpenGlVendor: ATI Technologies Inc.
	CpuCount: 8
[16abr2021 06:36:57.560] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:func_179870_a:123]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\...\AppData\Roaming\.minecraft\MioModPack\crash-reports\crash-2021-04-16_06.36.56-client.txt