EvilCraft

EvilCraft

19M Downloads

Evilcraft broom rendering with BetterWithMods and ConnectedTextureMod causes crash

AryaRaiin opened this issue ยท 20 comments

commented

Issue type:

Rendering crash

  • ๐Ÿ› Bug

Short description:

Loading up BetterWithMods, ConnectedTextureMod, and Evilcraft causes a rendering crash.

Steps to reproduce the problem:

  1. Create modpack with:

BetterWithMods-1.12-2.3.20-1027.ja
CTM-MC1.12.2-0.3.3.22.jar
CyclopsCore-1.12.2-1.0.4.jar
EvilCraft-1.12.2-0.10.69.jar

Forge version: forge:1.12.2-14.23.5.2815

  1. Launch Minecraft instance.
  2. Create new world in creative.
  3. Open inventory.
  4. Type "broom".
  5. Minecraft instance crashes upon attempting to render broom object, along with broom part icons.

Expected behaviour:

Typing "broom" in creative search bar renders broom object, along with additional broom part icons.


Versions:

  • This mod: EvilCraft-1.12.2-0.10.69.jar
  • Minecraft: 1.12.2
  • Forge: 1.12.2-14.23.5.2815

Log file:

https://pastebin.com/yjmZJeB8

commented

Urgh, still? Looks like #747 still has not been fully fixed.

commented

@tterrag1098 I'll need your help here.

For some reason, EC's broom models are working fine when Chisel and CTM are loaded. However, when BWM is added, this crash starts to occur. As far as I can see BWM is doing nothing wrong with its CTM compat implementation, so I think there is some other obscure mod interaction going on.

I'm mainly wondering why CTM is wrapping over EC's models, no interaction has been implemented for this, so there should be no reason why this is needed.
If you would need to do this however, then it looks like CTM is ignoring parent model item overrides, while EC's models need this, and will fail to render otherwise. AFAIK, vanilla always checks the ItemOverrides before calling the getQuads method on a model, but it looks like CTM is not consistent with this behaviour.

If I've gone wrong in my reasoning above, please let me know.

commented

Hey, i got a crash related to this, i'm using the mods mentioned above, but had no problem until I removed the resource pack i was using (Unity Textures), then got crash when scrolling through JEI when looking for Zombie Head Recipes, I disabled the resource pack due to it not rendering Railcraft Steam
Fluid properly, i'm gonna try enabling it again and checking to see if it crashes.

Hope it can help
Cheers and really like the mod!
https://pastebin.com/1XuXVEzv

Pastebin
commented

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

commented

Let's not close this just yet.

@tterrag1098 Any input you can provide on my comment above?

commented

I can confirm you that if you'r using a texture pack, it's not crashing.

Regards!.

commented

As far as I can tell, CTM is behaving correctly here, the crash is now EvilCraft's model crashing when I do what the author asked me to:

If you would need to do this however, then it looks like CTM is ignoring parent model item overrides, while EC's models need this, and will fail to render otherwise. AFAIK, vanilla always checks the ItemOverrides before calling the getQuads method on a model, but it looks like CTM is not consistent with this behaviour.

commented

@tterrag1098 I haven't looked at the new CTM code in detail yet. But if the same crash is occuring, then it must mean that getOverrides is still not being called on the broom model.

I did some quick searching through the CTM codebase, and I found this call to getOverrides. However, it only seems to be called when Item#hasCustomProperties() returns true. As far as I know, this check is not needed (vanilla does not seem to do it). Since EC brooms will return false here, this check will therefore always fail, and getOverrides will not be called.

@tterrag1098 Am I misunderstanding the code? Or is it possible that this could be a/the cause of the problem?

commented

Vanilla absolutely does do that check, I pulled the code straight from the superclass.

commented

I don't know if this will solve everyone's issue (I don't have BWM in my pack but I do have Aether Legacy and CTM) but after reading the texture pack comments, I did a little testing.

What I found was that if the Official Connected Textures Pack is at the top of the texture pack list (meaning nothing else is overwriting it), that causes the broom parts to disappear in JEI and for crashes to occur when trying to look at the broom part recipes in the Origins of Darkness. If I remove the CTM pack, the crashes stop. I tested this with different combinations of the default textures, Unity, and even the Rustic CTM texture pack. The Official CTM pack was the only thing that caused the problem.

I don't know if BWM overwrites any textures but if it does, maybe that's causing a similar issue?

commented

If it's overrides, this was fixed in the latest release.

commented

I realized I should have given more info and error logs so here we go...

I made a test modpack with the following:

  • Forge 2847
  • ConnectedTexturesMod 1.0.0.29
  • Cyclops Core 1.5.1
  • Evilcraft 0.10.78
  • JEI 4.15.0.268

With just default textures, the JEI page where the broom parts appear looks normal.
2019-10-19 (1)

With the CTM texture pack + default textures, the broom parts disappear in JEI.
2019-10-19

And when I attempt to open up Origins of Darkness to see the recipes, Minecraft crashes and this is the report: https://pastebin.com/qL7eg2zA

Pastebin
commented

For funnies, I decided to test it with BWM as well. In particular, I added:

  • Better With Lib 1.5
  • Better With Mods 2.3.20-1027 (I also tried with the latest beta 2.3.20-1037 but the results were the same)

With the default textures, broom parts were gone.
2019-10-20

With Unity as the main texture pack, the broom parts were back again.
2019-10-20 (1)

And this is the crash report from when I attempted to open Origin of Darkness with only default textures enabled: https://pastebin.com/A0v8Q8Pg

Pastebin
commented

@tterrag1098 You were correct regarding the Item#hasCustomProperties() check. However, this seems to not be the problem in this case.

The issue seems to be that EC creates a custom model via the ItemOverrideList#handleItemState() method. However, CTM is never calling this method. Instead, CTM skips it and calls ItemOverrideList#applyOverride() directly (which is normally called by ItemOverrideList#handleItemState()).

So unless I'm missing something, it think CTM should be calling ItemOverrideList#handleItemState() instead of ItemOverrideList#applyOverride() (the latter is even deprecated).

commented

Sorry, I can't support that kind of override, since I then have nothing to cache it by. I'd recommend handling the fallback condition more gracefully, however this investigation should focus on why the model is getting wrapped by CTM at all in the first place.

commented

Sorry, I can't support that kind of override

Hrm, it's not ideal that vanilla compatibility is not maintained.

this investigation should focus on why the model is getting wrapped by CTM at all in the first place

I agree, that's what I mentioned earlier this year as well.
Unfortunately, I have no insights on CTM's API for overriding models, but it looks like BetterWithMods may be making (incorrect) use of it.

@tterrag1098 Any ideas as to whether it is possible that BetterWithMods may doing something that causes EC models to be wrapped implicitly?

commented

I just tested it and this crash/rendering issue still exists with the CTM texture pack.

commented

Closing this due to inactivity, feel free to re-open should this still occur.

commented

@faeldray I would suggest re-opening this issue over at CTM's issue tracker, since they appear to be changing Vanilla model semantics.

commented

I don't know if you are still looking into this, but I don't have BWM, yet I still crash. It's only the broom too. Here's an error log: https://pastebin.com/isa00L9v This seems to have started when I loaded in the Connected Textures Pack.

Pastebin