use of net.moddingplayground.frame.api.bannerpatterns.v0.BannerContext in project frame-fabric by moddingplayground.
the class BannerBlockEntityRendererMixin method frame_renderBannerPattern.
@Unique
private static void frame_renderBannerPattern(FrameBannerPatternData data, MatrixStack stack, VertexConsumerProvider vertices, ModelPart part, int light, int overlay, boolean banner) {
BannerContext context = BannerContext.from(banner);
FrameBannerPattern pattern = data.pattern();
Identifier id = pattern.getSpriteId(context);
SpriteIdentifier spriteId = FRAME_SPRITE_IDS.apply(context.getAtlas(), id);
DyeColor color = data.color();
float[] colors = color.getColorComponents();
part.render(stack, spriteId.getVertexConsumer(vertices, RenderLayer::getEntityNoOutline), light, overlay, colors[0], colors[1], colors[2], 1.0f);
}
Aggregations