Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Forge] Crash with tetra item #575

Closed
MoePus opened this issue Dec 25, 2024 · 2 comments
Closed

[Forge] Crash with tetra item #575

MoePus opened this issue Dec 25, 2024 · 2 comments

Comments

@MoePus
Copy link

MoePus commented Dec 25, 2024

Tetra may init a UnresolvedItemModel

package se.mickelus.tetra.client.model;

class UnresolvedItemModel$Baked extends SimpleBakedModel {
   private static final Material MISSING_TEXTURE;

   public UnresolvedItemModel$Baked(ItemOverrides itemOverrideList) {
      super(List.of(), Map.of(), false, false, false, UnitTextureAtlasSprite.INSTANCE, ItemTransforms.f_111786_, itemOverrideList, RenderTypeGroup.EMPTY);
   }

   public TextureAtlasSprite m_6160_() {
      return MISSING_TEXTURE.m_119204_();
   }

   public List getRenderTypes(ItemStack itemStack, boolean fabulous) {
      return List.of();
   }

   static {
      MISSING_TEXTURE = new Material(TextureAtlas.f_118259_, MissingTextureAtlasSprite.m_118071_());
   }
}

The problem is, in Forge item wont get rendered if RenderTypes is empty, but with Continuity, the UnresolvedItemModel is wrapped by EmissiveBakedModel which calls emitItemQuads. And culledFaces is inited with Map.of() in UnresolvedItemModel, it will return null when calling getQuads with a direction which leads to crash.

Crash Log: https://mclo.gs/ZzWdP33

@PepperCode1
Copy link
Owner

Report this to Forgified Fabric API. It does not correctly handle item getRenderTypes and getRenderPasses.

@PepperCode1 PepperCode1 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2024
@PepperCode1
Copy link
Owner

Sinytra/ForgifiedFabricAPI#186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants