Fabric API

Fabric API

106M Downloads

[Indigo] Quad transforms can't change the RenderMaterial

Micalobia opened this issue ยท 1 comments

commented

So I'm having a weird issue where materials don't get applied in QuadTransforms

I know the transform is working because I do other things in my real code, it's just the material that does nothing

Simplified code here

RenderMaterial material = ...
BakedModel model = ...
FabricBakedModel fmodel = model
QuadEmitter emitter = context.getEmitter();

// This works to change the material
for (BakedQuad quad : model.getQuads(...)) {
  emitter.fromVanilla(quad, material, ...)
  emitter.emit();
}

// This doesn't
context.pushTransform((quad) -> {
  quad.material(material);
  return true;
});
fmodel.emitBlockQuads(...)
context.popTransform()

I asked about it in the Fabric discord here, and I couldn't find an explanation other than "It's probably an Indigo bug", which was supported by the bug not appearing with Canvas installed.

commented

Closing as a duplicate of #2639 which explains the cause of the issue. Working on the fix as we speak.