Skip to content

Commit

Permalink
Add setMaterialSecondaryARGB (#867)
Browse files Browse the repository at this point in the history
This is added as a counterpart to setMaterialRGB (which I have renamed to setMaterialARGB to be consistent with other methods). I'm adding setMaterialSecondaryARGB because currently to set material secondary colors in kubejs you need to do:
GTMaterials.Diamond.getMaterialInfo().getColors().setColor([0xff0000, 0xff0000, -1, -1, -1, -1, -1, -1, -1, -1])
Whereas with this change its as easy as the primary color:
GTMaterials.Diamond.setMaterialSecondaryARGB(0xff0000)
  • Loading branch information
lonevox authored Feb 5, 2024
1 parent 8bca05c commit 734e54a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,14 @@ public int getToolHarvestLevel() {
return getProperty(PropertyKey.TOOL).getHarvestLevel();
}

public void setMaterialRGB(int materialRGB) {
public void setMaterialARGB(int materialRGB) {
materialInfo.colors.set(0, materialRGB);
}

public void setMaterialSecondaryARGB(int materialRGB) {
materialInfo.colors.set(1, materialRGB);
}

public int getLayerARGB(int layerIndex) {
// get 2nd digit as positive if emissive layer
if (layerIndex < -100) {
Expand Down

0 comments on commit 734e54a

Please sign in to comment.