diff --git a/src/main/java/com/gregtechceu/gtceu/common/item/ColorSprayBehaviour.java b/src/main/java/com/gregtechceu/gtceu/common/item/ColorSprayBehaviour.java index 541ef203a1..ed2d4a4916 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/item/ColorSprayBehaviour.java +++ b/src/main/java/com/gregtechceu/gtceu/common/item/ColorSprayBehaviour.java @@ -345,7 +345,7 @@ private boolean tryPaintSpecialBlock(Player player, Level world, BlockPos pos, B if (be instanceof IMachineBlockEntity machineBe && first instanceof IMachineBlockEntity og) { MetaMachine mte = machineBe.getMetaMachine(); MetaMachine ogMte = og.getMetaMachine(); - if (mte != null) { + if (mte != null && ogMte != null) { if (mte.getPaintingColor() != this.color.getTextColor() && mte.getPaintingColor() == ogMte.getPaintingColor()) { mte.setPaintingColor(this.color.getTextColor());