Skip to content

Commit

Permalink
Merge branch '1.18.2' into 1.19.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Thutmose committed Nov 5, 2022
2 parents ca662f2 + 018d30a commit 7fc2f17
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
15 changes: 11 additions & 4 deletions src/main/java/thut/bling/client/render/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,19 @@ public static void renderModel(final PoseStack mat, final MultiBufferSource buff
}
colour = new Color(ret.getTextColor() + 0xFF000000);
}
for (final IExtendedModelPart part1 : model.getParts().values())
try
{
part1.setRGBABrO(colour.getRed(), colour.getGreen(), colour.getBlue(), 255, brightness, overlay);
part1.setRGBABrO(notColurable, 255, 255, 255, 255, brightness, overlay);
for (final IExtendedModelPart part1 : model.getParts().values())
{
part1.setRGBABrO(colour.getRed(), colour.getGreen(), colour.getBlue(), 255, brightness, overlay);
part1.setRGBABrO(notColurable, 255, 255, 255, 255, brightness, overlay);
}
renderable.renderAll(mat, Util.makeBuilder(buff, Util.DUMMY));
}
catch (Exception e)
{
e.printStackTrace();
}
renderable.renderAll(mat, Util.makeBuilder(buff, Util.DUMMY));
}
}

Expand Down
26 changes: 11 additions & 15 deletions src/main/java/thut/core/client/render/model/parts/Part.java
Original file line number Diff line number Diff line change
Expand Up @@ -388,21 +388,17 @@ public void setRGBABrO(@Nullable Predicate<Material> material, final int r, fina
}
if (material != null && !Mesh.debug)
{
// Incase this is being rendered while a new materials set loads in.
synchronized (this.materials)
{
this.materials.forEach(m -> {
if (material.test(m))
{
m.rgbabro[0] = r;
m.rgbabro[1] = g;
m.rgbabro[2] = b;
m.rgbabro[3] = a;
m.rgbabro[4] = this.brightness;
m.rgbabro[5] = this.overlay;
}
});
}
this.materials.forEach(m -> {
if (material.test(m))
{
m.rgbabro[0] = r;
m.rgbabro[1] = g;
m.rgbabro[2] = b;
m.rgbabro[3] = a;
m.rgbabro[4] = this.brightness;
m.rgbabro[5] = this.overlay;
}
});
}
else
{
Expand Down

0 comments on commit 7fc2f17

Please sign in to comment.