Primitive Mobs

Primitive Mobs

10M Downloads

ColorUtil-related crash with some Betweenlands blocks

nihiltres opened this issue ยท 3 comments

commented

I haven't looked through the issue carefully, but in my creative world I was wearing Camouflage Armor and decided to break some blocks in a small structure testing the growth behaviour of some Betweenlands plants, when the game suddenly crashed.

It superficially looks like ColorUtil.getBlockStateColor() is the issue and probably needs a tweak to fail more gracefully. The relevant portion of my crash log follows:

[13:55:03] [main/FATAL] [net.minecraft.client.Minecraft]: Reported exception thrown!
net.minecraft.util.ReportedException: Ticking entity
	at net.minecraft.world.World.func_72939_s(World.java:1770) ~[amu.class:?]
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1845) ~[bib.class:?]
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1096) ~[bib.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397) [bib.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
Caused by: java.util.NoSuchElementException: No value present
	at java.util.Optional.get(Unknown Source) ~[?:1.8.0_121]
	at thebetweenlands.client.render.model.baked.ModelConnectedTexture$ModelBakedConnectedFace.func_188616_a(ModelConnectedTexture.java:222) ~[ModelConnectedTexture$ModelBakedConnectedFace.class:?]
	at thebetweenlands.client.render.model.baked.ModelCombined$BakedCombinedModel.func_188616_a(ModelCombined.java:126) ~[ModelCombined$BakedCombinedModel.class:?]
	at net.daveyx0.primitivemobs.util.ColorUtil.getBlockStateColor(ColorUtil.java:87) ~[ColorUtil.class:?]
	at net.daveyx0.primitivemobs.util.ColorUtil.getBlockStateColor(ColorUtil.java:47) ~[ColorUtil.class:?]
	at net.daveyx0.primitivemobs.item.ItemCamouflageArmor.changeColor(ItemCamouflageArmor.java:192) ~[ItemCamouflageArmor.class:?]
	at net.daveyx0.primitivemobs.item.ItemCamouflageArmor.onArmorTick(ItemCamouflageArmor.java:55) ~[ItemCamouflageArmor.class:?]
	at net.minecraft.entity.player.InventoryPlayer.func_70429_k(InventoryPlayer.java:371) ~[aec.class:?]
	at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:511) ~[aed.class:?]
	at net.minecraft.client.entity.EntityPlayerSP.func_70636_d(EntityPlayerSP.java:1011) ~[bud.class:?]
	at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2170) ~[vp.class:?]
	at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:234) ~[aed.class:?]
	at net.minecraft.client.entity.EntityPlayerSP.func_70071_h_(EntityPlayerSP.java:181) ~[bud.class:?]
	at net.minecraft.world.World.func_72866_a(World.java:1990) ~[amu.class:?]
	at net.minecraft.world.World.func_72870_g(World.java:1952) ~[amu.class:?]
	at net.minecraft.world.World.func_72939_s(World.java:1756) ~[amu.class:?]
	... 18 more
commented

Just tried to relaunch that world, and the crash immediately recurs; while fortunately this is just my creative test world and I can manually delete my player file with little loss, this should be treated as a serious bug given that it can entirely brick saves.

If it turns out to be on the Betweenlands' side, I'll happily send the bug over to them.

commented

I should have fail-safes for this, hmmm. Thanks for reporting, will take a look.

commented

Thanks! Should be implemented next update