Fixed different materials merging

This commit is contained in:
Calclavia 2013-12-23 10:38:08 +08:00
parent 5b2e6c0cb7
commit 7f6c7cd678
2 changed files with 8 additions and 5 deletions

View file

@ -23,7 +23,7 @@ import codechicken.lib.data.MCDataOutput;
*/ */
public abstract class PartAdvancedWire extends PartConductor public abstract class PartAdvancedWire extends PartConductor
{ {
public static final int DEFAULT_COLOR = 16; public static final int DEFAULT_COLOR = 15;
public int color = DEFAULT_COLOR; public int color = DEFAULT_COLOR;
public EnumWireMaterial material = EnumWireMaterial.COPPER; public EnumWireMaterial material = EnumWireMaterial.COPPER;
@ -42,17 +42,20 @@ public abstract class PartAdvancedWire extends PartConductor
if (this.getMaterial() == wire.getMaterial()) if (this.getMaterial() == wire.getMaterial())
{ {
System.out.println("COMMON");
if (this.isInsulated() && wire.isInsulated()) if (this.isInsulated() && wire.isInsulated())
{ {
return this.getColor() == wire.getColor(); return this.getColor() == wire.getColor() || (this.getColor() == DEFAULT_COLOR || wire.getColor() == DEFAULT_COLOR);
} }
return true; return true;
} }
} }
else
{
return CompatibilityModule.isHandler(obj);
}
return CompatibilityModule.isHandler(obj); return false;
} }
@Override @Override

View file

@ -765,7 +765,7 @@ public class PartFlatWire extends PartAdvancedWire implements TFacePart, JNormal
public int getThickness() public int getThickness()
{ {
return this.isInsulated ? 1 : 0; return this.isInsulated ? 2 : 1;
} }
@Override @Override