3232
3333public 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
0 commit comments