Structurize

Structurize

40M Downloads

java.lang.NullPointerException: getting capability (Rendering Entity in World)

Coraline77447 opened this issue ยท 7 comments

commented

Prerequisites

  • I am running the latest alpha version of Structurize for my Minecraft version.
  • I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.16.5
  • Structurize Version: 0.13.148-ALPHA
  • MineColonies Version (if related bug): 0.14.77-BETA
  • Related Mods and their Versions: A.V.A Alliance of Valiant Arms: 1.6.5

Expected behavior

I place a holographic image of a decoration structure to be able to see my surrounding buildings when they're fully upgraded to see how big they'll get when fully upgraded (Why I'm saying all of this is cause I'm kinda making my colony cramped up with limited amount of space since some IRL cities are kind of cramped/tight spaced in between each other ya know? i.g. New York City).

Actual behavior

When I right-clicked with the build wand to see my buildings as their fully upgraded versions (since my buildings are only at level 2 based off from the Builder's Hut level which is at level 2) to see how my tavern would look like with the surrounding structures in my colony the game suddenly went to the dirt background screen with the text saying "Saving World" before the Not Enough Crashes screen came up saying which mods caused the error.

Why I wanted to do that is cause without right-clicking the build wand on the ground near my structures then I won't be able to see what they'll look like when they're fully upgraded since I'm working with somewhat limited amount of space...

Steps to reproduce the issue

  1. Build a few buildings from MineColonies and some simple paths, simple path intersections and corners from MineColonies.
  2. Then make (get from creative mode) any gun from A.V.A Alliance of Valiant Arms mod and place down the tavern hut block (any variant would probably work) and then right-click with the build wand on the ground near youe buildings to put a holograph of say a simple path on one of the existing simple paths that your builder built to see how your tavern would look like when it's done and fully upgraded.
  3. Then wait for the game to suddenly crash on you.

Logs

Notes

BTW why I don't have the first box at the top of this report checked is cause MineColonies is asking for Structurize 0.13.148-ALPHA, not the latest alpha release of Structurize or else this issue could have been prevented if you made MineColonies require the latest alpha build of Structurize. (Especially for the latest beta release of MineColonies!)

Or else Minecraft will not load at all without Structurize 0.13.148-ALPHA, so I and everyone else who's playing with MineColonies is stuck on a old/outdated alpha version of Structurize!..
Please make MineColonies require the latest alpha release of Structurize to resolve this issue...

One last thing, I've tried to make this report with as much detail as possible that I can give to you so that you guys can potentially fix this issue since this is my first time making a crash report on Structurize that involves both MineColonies and another mod called A.V.A Alliance of Valiant Arms mod....
Since I usually would just ignore the crashes and try to remove the mods that caused the error(s) and just keep playing on my current worlds without the mods that caused the fatal error(s).....


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

About MineColonies not accepting the latest version of structurize: there were actually breaking changes in the structurize versions after 0.13.148, so minecolonies needs to be adjusted to accept the latest. It should be bumped soon.

commented

Report to ava mod, it should be their fault, using orElseThrow() is definitely bad design in the modded environment.
To ava mod: we are using fake worlds to render our structures, such worlds are optimized as much as possible including removing capability handlers, thus the following obviously has to crash

java.lang.NullPointerException: getting capability
	at pellucid.ava.misc.cap.WorldData.lambda$getCap$3(WorldData.java:106) ~[ava:1.6.5] {re:classloading}
	at net.minecraftforge.common.util.LazyOptional.orElseThrow(LazyOptional.java:296) ~[forge:?] {re:mixin,re:classloading}
	at pellucid.ava.misc.cap.WorldData.getCap(WorldData.java:106) ~[ava:1.6.5] {re:classloading}
	at pellucid.ava.events.AVACommonEvent.cap(AVACommonEvent.java:54) ~[ava:1.6.5] {re:classloading}
	at pellucid.ava.events.AVACommonEvent.isCaughtByUAV(AVACommonEvent.java:88) ~[ava:1.6.5] {re:classloading}
	at pellucid.ava.misc.renderers.AVATPRenderer.renderUAV(AVATPRenderer.java:193) ~[ava:1.6.5] {re:classloading}
commented

So how can I adjust MineColonies to accept the latest alpha release of Structurize?
Also an outdated version of Structurize may not be the main cause of the issue, even if I were to stick with the latest alpha version of MineColonies or the one prier to the latest version with 0.13.148 that I could still get the error since I made a gun from A.V.A.
If I were to have made a pistol from A.V.A early on then a crash would have occurred and I'm gonna go send a report to A.V.A since Not Enough Crashes detected A.V.A as well which A.V.A may have been the start of the chain of events that lead to the fatal error.
So I apologize for sending a report on Structurize's issue tracker when this issue is clearly coming from a difrent mod but why I thought that Structurize was apart of the cause was that Not Enough Crashes told me which mods caused the fatal error...

Also What's the propose of orElseThrow() capability handler anyways? Since you're telling me that it's clearly a poor modded environment to use in a mod.

commented

you cannot adjust it. However, it should be bumped today or tomorrow.

commented

Okay, Btw I'm in the process of making a crash report to A.V.A now.

commented

Also What's the propose of orElseThrow() capability handler anyways? Since you're telling me that it's clearly a poor modded environment to use in a mod.

mostly debug, even though you should just discard actions around worlds that are not the same as player world

commented

So why is it on in the first place since I'm not in debug mode in any of the mods in my current world?
I didn't even noticed about that till I made the 1911 Colt 45 from A.V.A and tried to use the build tool to see what my buildings would look like when they're fully completed?
Why was orElseThrow() being fired when it's not supposed to be active at all?

I know that you'll not know why it fired when I wasn't in any debug mode but I just wanted to ask anyways as of speaking from my thoughts cause what's going on with A.V.A isn't understandable at all...
It's making me think that I shouldn't be playing with A.V.A till the author of A.V.A fixes this issue
So now all I'll have left as of firearms for me to use on my current world is Mr.Crayfish's Gun mod which apparently doesn't use "orElseThrow" in it's code or if it does it's not active during a live singleplayer modded world with Structurize and MineColonies.
Since I've already crafted a firearm from that mod which is a machine pistol which is litterly just called Machine Pistol.