Skip to content

Commit

Permalink
forgot mm check
Browse files Browse the repository at this point in the history
  • Loading branch information
omergunr100 committed Dec 12, 2024
1 parent 5e8f8d9 commit 949e5a2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 949e5a2

Please sign in to comment.