mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-27 07:26:48 +01:00
Fix BakedModelBuilder not wrapping models
This commit is contained in:
parent
7e3671fa9a
commit
c2b78f8e0e
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@ package com.jozufozu.flywheel.core.model;
|
|||
import java.util.Random;
|
||||
|
||||
import com.jozufozu.flywheel.core.virtual.VirtualEmptyBlockGetter;
|
||||
import com.jozufozu.flywheel.fabric.model.DefaultLayerFilteringBakedModel;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
|
||||
|
@ -42,6 +43,10 @@ public final class BakedModelBuilder implements Bufferable {
|
|||
|
||||
@Override
|
||||
public void bufferInto(ModelBlockRenderer blockRenderer, VertexConsumer consumer, Random random) {
|
||||
BakedModel model = DefaultLayerFilteringBakedModel.wrap(this.model);
|
||||
if (consumer instanceof ShadeSeparatingVertexConsumer shadeSeparatingWrapper) {
|
||||
model = shadeSeparatingWrapper.wrapModel(model);
|
||||
}
|
||||
blockRenderer.tesselateBlock(renderWorld, model, referenceState, BlockPos.ZERO, poseStack, consumer, false, random, 42, OverlayTexture.NO_OVERLAY);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue