diff --git a/enderio-base/src/main/java/com/enderio/base/client/paint/PaintedBlockColor.java b/enderio-base/src/main/java/com/enderio/base/client/paint/PaintedBlockColor.java index 3494bcc77..31feffd95 100644 --- a/enderio-base/src/main/java/com/enderio/base/client/paint/PaintedBlockColor.java +++ b/enderio-base/src/main/java/com/enderio/base/client/paint/PaintedBlockColor.java @@ -29,7 +29,7 @@ public int getColor(BlockState state, @Nullable BlockAndTintGetter level, @Nulla if (entity instanceof PaintedBlockEntity paintedBlockEntity) { Optional paint = paintedBlockEntity.getPrimaryPaint(); - if (state.getBlock() instanceof PaintedSlabBlock && tintIndex < 0) { + if (state.getBlock() instanceof PaintedSlabBlock && tintIndex >= 0) { paint = paintedBlockEntity.getSecondaryPaint(); } @@ -61,11 +61,12 @@ public int getColor(ItemStack itemStack, int tintIndex) { public static int moveTintIndex(int original) { return -original - 2; } + public static int unmoveTintIndex(int original) { if (original > 0) { return original; } else { - return -original + 2; + return -original - 2; } } }