Skip to content

Commit

Permalink
Fixed NPE when holding a frame w/ missing material (#3294)
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursivePineapple authored Sep 28, 2024
1 parent 85334d7 commit ac33966
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/gregtech/common/blocks/ItemFrames.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public String getItemStackDisplayName(ItemStack aStack) {
public int getColorFromItemStack(ItemStack aStack, int aPass) {
int meta = aStack.getItemDamage();
Materials material = BlockFrameBox.getMaterial(meta);
if (material == null) return 0;
return (material.mRGBa[0] << 16) | (material.mRGBa[1] << 8) | material.mRGBa[2];
}

Expand Down

0 comments on commit ac33966

Please sign in to comment.