[Bug] BakedModelConsumer doesn't support FabricBakedModel
Phoupraw opened this issue ยท 1 comments
The context:
var itemRenderer = MinecraftClient.getInstance().getItemRenderer();
ItemStack nestedStack = ... ;
var itemModel = (BakedModel & FabricBakedModel) itemRenderer.getModel(nestedStack, null, null, 0);
The code below can't render itemModel
if it uses emitItemQuads
to render:
context.bakedModelConsumer().accept(itemModel);
You should use the code below instead:
if (itemModel.isVanillaAdapter()) {
context.bakedModelConsumer().accept(itemModel);
} else {
itemModel.emitItemQuads(nestedStack, randomSupplier, context);
}