Added super calls back in to re-enable attached capabilities.
This commit is contained in:
parent
882f240307
commit
754a1f1de3
|
@ -370,13 +370,18 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IT
|
||||||
@Override
|
@Override
|
||||||
public boolean hasCapability( Capability<?> capability, @Nullable EnumFacing facing )
|
public boolean hasCapability( Capability<?> capability, @Nullable EnumFacing facing )
|
||||||
{
|
{
|
||||||
return this.duality.hasCapability( capability, facing );
|
return this.duality.hasCapability( capability, facing )
|
||||||
|
|| super.hasCapability( capability, facing );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||||
{
|
{
|
||||||
return this.duality.getCapability( capability, facing );
|
T result = this.duality.getCapability( capability, facing );
|
||||||
|
if( result != null )
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return super.getCapability( capability, facing );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -400,7 +400,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||||
AEPartLocation partLocation = AEPartLocation.fromFacing( fromSide );
|
AEPartLocation partLocation = AEPartLocation.fromFacing( fromSide );
|
||||||
|
|
||||||
IPart part = getPart( partLocation );
|
IPart part = getPart( partLocation );
|
||||||
return part != null && part.hasCapability( capabilityClass );
|
boolean result = part != null && part.hasCapability( capabilityClass );
|
||||||
|
|
||||||
|
return result || super.hasCapability( capabilityClass, fromSide );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -410,7 +412,14 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||||
AEPartLocation partLocation = AEPartLocation.fromFacing( fromSide );
|
AEPartLocation partLocation = AEPartLocation.fromFacing( fromSide );
|
||||||
|
|
||||||
IPart part = getPart( partLocation );
|
IPart part = getPart( partLocation );
|
||||||
return part == null ? null : part.getCapability( capabilityClass );
|
T result = part == null ? null : part.getCapability( capabilityClass );
|
||||||
|
|
||||||
|
if( result != null )
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.getCapability( capabilityClass, fromSide );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue