Use cutout buffer mixer rendering

This commit is contained in:
simibubi 2023-03-03 00:33:45 +01:00
parent 00e733e608
commit 6902aa007a
2 changed files with 6 additions and 3 deletions

View file

@ -49,11 +49,12 @@ public class MechanicalMixerRenderer extends KineticBlockEntityRenderer<Mechanic
.light(light)
.renderInto(ms, vb);
VertexConsumer vbCutout = buffer.getBuffer(RenderType.cutoutMipped());
SuperByteBuffer headRender = CachedBufferer.partial(AllPartialModels.MECHANICAL_MIXER_HEAD, blockState);
headRender.rotateCentered(Direction.UP, angle)
.translate(0, -renderedHeadOffset, 0)
.light(light)
.renderInto(ms, vb);
.renderInto(ms, vbCutout);
}
}

View file

@ -22,8 +22,10 @@ public class MixerInstance extends EncasedCogInstance implements DynamicInstance
super(materialManager, blockEntity, false);
this.mixer = blockEntity;
mixerHead = getRotatingMaterial().getModel(AllPartialModels.MECHANICAL_MIXER_HEAD, blockState)
.createInstance();
mixerHead = materialManager.defaultCutout()
.material(AllMaterialSpecs.ROTATING)
.getModel(AllPartialModels.MECHANICAL_MIXER_HEAD, blockState)
.createInstance();
mixerHead.setRotationAxis(Direction.Axis.Y);