Immersive Engineering

Immersive Engineering

134M Downloads

Core sample tooltip crash when passed a null level

Technici4n opened this issue ยท 2 comments

commented

Description of the issue:

See also AppliedEnergistics/Applied-Energistics-2#6316. While we could likely provide the level, it is explicitly marked @Nullable, so an NPE crash is definitely not something that should happen:

   public void appendHoverText(ItemStack p_41421_, @Nullable Level p_41422_, List<Component> p_41423_, TooltipFlag p_41424_) {
   }

Crashlog:

https://gist.github.com/DoughnutDev/2640228d257c734de9ef5b30d48469c9

commented

That's fine, it's what I expected. I'll make AE2 pass a Level "eventually".

commented

I can easily stop it from crashing by just returning early with a null level (and will do that), but I probably won't be able to provide a useful tooltip without a level (unless I start making guesses and use a global Level).