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 f907a6762b..541ef203a1 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/item/ColorSprayBehaviour.java +++ b/src/main/java/com/gregtechceu/gtceu/common/item/ColorSprayBehaviour.java @@ -458,10 +458,11 @@ private static boolean tryStripBlockColor(Player player, Level world, BlockPos p // MTE special case BlockEntity be = world.getBlockEntity(pos); - if (be instanceof IMachineBlockEntity machineBe) { + if (be instanceof IMachineBlockEntity machineBe && first instanceof IMachineBlockEntity og) { MetaMachine mte = machineBe.getMetaMachine(); - if (mte != null) { - if (mte.isPainted()) { + MetaMachine ogMte = og.getMetaMachine(); + if (mte != null && ogMte != null) { + if (mte.isPainted() && mte.getPaintingColor() == ogMte.getPaintingColor()) { mte.setPaintingColor(mte.getDefaultPaintingColor()); return true; } else return false;