Fixed unchecked warning
This commit is contained in:
parent
8cf66a7f1d
commit
29b886ea8d
1 changed files with 2 additions and 2 deletions
|
@ -74,11 +74,11 @@ public class TileCable extends TileEntity implements ITickable, IEnergyStorage,
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
|
||||
if (capability == CapabilityEnergy.ENERGY) {
|
||||
return (T) this;
|
||||
return CapabilityEnergy.ENERGY.cast(this);
|
||||
}
|
||||
return super.getCapability(capability, facing);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue