Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 1b2cc9a

Browse files
committed
made the cable insulation texture grayscale
1 parent ffd5119 commit 1b2cc9a

File tree

8 files changed

+9
-8
lines changed

8 files changed

+9
-8
lines changed

common/src/main/java/muramasa/antimatter/pipe/BlockCable.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
public class BlockCable<T extends Cable<T>> extends BlockPipe<T> {
3434

35+
public static final int INSULATION_COLOR = 0x404040;
3536
public final boolean insulated;
3637

3738
public BlockCable(T type, PipeSize size, boolean insulated) {
@@ -40,12 +41,12 @@ public BlockCable(T type, PipeSize size, boolean insulated) {
4041
String prefix = insulated ? "cable" : "wire";
4142
this.side = new Texture(Ref.ID, "block/pipe/" + prefix + "_side");
4243
this.faces = new Texture[]{
43-
new Texture(Ref.ID, "block/pipe/" + prefix + "_vtiny"),
44-
new Texture(Ref.ID, "block/pipe/" + prefix + "_tiny"),
45-
new Texture(Ref.ID, "block/pipe/" + prefix + "_small"),
46-
new Texture(Ref.ID, "block/pipe/" + prefix + "_normal"),
47-
new Texture(Ref.ID, "block/pipe/" + prefix + "_large"),
48-
new Texture(Ref.ID, "block/pipe/" + prefix + "_huge")
44+
new Texture(Ref.ID, "block/pipe/" + "wire_vtiny"),
45+
new Texture(Ref.ID, "block/pipe/" + "wire_tiny"),
46+
new Texture(Ref.ID, "block/pipe/" + "wire_small"),
47+
new Texture(Ref.ID, "block/pipe/" + "wire_normal"),
48+
new Texture(Ref.ID, "block/pipe/" + "wire_large"),
49+
new Texture(Ref.ID, "block/pipe/" + "wire_huge")
4950
};
5051
}
5152

@@ -71,7 +72,7 @@ public int getBlockColor(BlockState state, @Nullable BlockGetter world, @Nullabl
7172
if (!(state.getBlock() instanceof BlockCable) && world == null || pos == null) return -1;
7273
BlockEntityPipe<?> pipe = getTilePipe(world, pos);
7374
if (insulated && pipe != null && pipe.getPipeColor() != -1 && i == 0) return pipe.getPipeColor();
74-
if (insulated) return i == 1 ? getRGB() : -1;
75+
if (insulated) return i == 1 ? getRGB() : i == 0 ? INSULATION_COLOR : -1;
7576
return i == 0 || i == 1 ? getRGB() : -1;
7677
}
7778

@@ -80,7 +81,7 @@ public int getItemColor(ItemStack stack, @Nullable Block block, int i) {
8081
if (insulated && stack.getTag() != null && stack.getTag().contains(Ref.KEY_PIPE_TILE_COLOR) && i == 0){
8182
return stack.getTag().getInt(Ref.KEY_PIPE_TILE_COLOR);
8283
}
83-
return insulated ? i == 1 ? getRGB() : -1 : getRGB();
84+
return insulated ? i == 1 ? getRGB() : i == 0 ? INSULATION_COLOR : -1 : getRGB();
8485
}
8586

8687
@Override
3.93 KB
Loading
4.02 KB
Loading
4.1 KB
Loading
4.17 KB
Loading
4.16 KB
Loading
4.2 KB
Loading
4.2 KB
Loading

0 commit comments

Comments
 (0)