Covered dense cables (#3030)

* Renamed all dense smart cable related things to include smart
* Added dense covered cables
* Added abstract PartDenseCable to reduce redundant code
* Added dense covered recipes

* Ensures ItemPart ordering to be consitent.

Now takes the metadata into account to preserve the ordering for colored
items instead of just the part type name and depend on the insertion
order of a hashmap.
This commit is contained in:
yueh
2017-08-17 18:41:39 +02:00
committed by GitHub
parent 4f9fd1b369
commit b61219ef88
77 changed files with 818 additions and 61 deletions
@@ -36,7 +36,7 @@ import appeng.helpers.Reflected;
import appeng.util.Platform;
public class PartDenseCable extends PartCable
public abstract class PartDenseCable extends PartCable
{
@Reflected
public PartDenseCable( final ItemStack is )
@@ -52,12 +52,6 @@ public class PartDenseCable extends PartCable
return BusSupport.DENSE_CABLE;
}
@Override
public AECableType getCableConnectionType()
{
return AECableType.DENSE_SMART;
}
@Override
public void getBoxes( final IPartCollisionHelper bch )
{
@@ -135,25 +129,16 @@ public class PartDenseCable extends PartCable
}
}
private boolean isSmart( final AEPartLocation of )
{
final TileEntity te = this.getTile().getWorld().getTileEntity( this.getTile().getPos().offset( of.getFacing() ) );
if( te instanceof IGridHost )
{
final AECableType t = ( (IGridHost) te ).getCableConnectionType( of.getOpposite() );
return t == AECableType.SMART;
}
return false;
}
private boolean isDense( final AEPartLocation of )
{
final TileEntity te = this.getTile().getWorld().getTileEntity( this.getTile().getPos().offset( of.getFacing() ) );
if( te instanceof IGridHost )
{
final AECableType t = ( (IGridHost) te ).getCableConnectionType( of.getOpposite() );
return t == AECableType.DENSE_SMART;
return t == AECableType.DENSE_COVERED || t == AECableType.DENSE_SMART;
}
return false;
}