GeckoLib

GeckoLib

155M Downloads

[HELP] Change colour of entity from data

Totobird-Creations opened this issue ยท 1 comments

commented

I have this piece of code to attempt to change the colour of the entity, but it doesn't seem to work.

@Override
public void renderEarly(DragonEntity entity, MatrixStack stackIn, float ticks, VertexConsumerProvider renderTypeBuffer, VertexConsumer vertexBuilder, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float partialTicks) {
    red = red * ((entity.getDataTracker().get(entity.COLOUR) >> 16) & 0xff) / 255.0f;
    green = green *  ((entity.getDataTracker().get(entity.COLOUR) >>  8) & 0xff) / 255.0f;
    blue = blue * ((entity.getDataTracker().get(entity.COLOUR)) & 0xff) / 255.0f;
    super.renderEarly(entity, stackIn, ticks, renderTypeBuffer, vertexBuilder, packedLightIn, packedOverlayIn, red, green, blue, partialTicks);
}

How can I make the entity render with the r g and b values multiplied by some number?

commented

This is for bug reports, please use discord for code help