Remove deprecated gas API methods

This commit is contained in:
aidancbrady 2016-06-29 19:58:13 -04:00
parent 163e37de86
commit c5a414df37
17 changed files with 1 additions and 207 deletions

View file

@ -16,9 +16,6 @@ public interface IGasHandler
*/
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer);
@Deprecated
public int receiveGas(ForgeDirection side, GasStack stack);
/**
* Draws a certain amount of gas from this block.
* @param amount - amount to draw
@ -26,9 +23,6 @@ public interface IGasHandler
*/
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer);
@Deprecated
public GasStack drawGas(ForgeDirection side, int amount);
/**
* Whether or not this block can accept gas from a certain side.
* @param side - side to check

View file

@ -272,24 +272,12 @@ public class PartPressurizedTube extends PartTransmitter<IGasHandler, GasNetwork
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -398,24 +398,12 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -56,24 +56,12 @@ public class TileEntityAmbientAccumulator extends TileEntityContainerBlock imple
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return collectedGas.draw(amount, doTransfer);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -366,24 +366,12 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -423,24 +423,12 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectri
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -420,12 +420,6 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
@ -437,12 +431,6 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -428,12 +428,6 @@ public class TileEntityChemicalWasher extends TileEntityNoisyElectricBlock imple
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
@ -445,12 +439,6 @@ public class TileEntityChemicalWasher extends TileEntityNoisyElectricBlock imple
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -651,12 +651,6 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
@ -672,12 +666,6 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -1093,12 +1093,6 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{
@ -1127,12 +1121,6 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -179,24 +179,12 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
return gasTank.receive(stack, doTransfer);
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -406,12 +406,6 @@ public class TileEntityPRC extends TileEntityBasicMachine<PressurizedInput, Pres
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
@ -423,12 +417,6 @@ public class TileEntityPRC extends TileEntityBasicMachine<PressurizedInput, Pres
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -465,24 +465,12 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
return !hasFrequency() ? 0 : frequency.storedGas.receive(stack, doTransfer);
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return !hasFrequency() ? null : frequency.storedGas.draw(amount, doTransfer);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -435,24 +435,12 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
return gasTank.receive(stack, doTransfer);
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
return gasTank.draw(amount, doTransfer);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -292,12 +292,6 @@ public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock im
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
@ -309,12 +303,6 @@ public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock im
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{

View file

@ -294,12 +294,6 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public void readFromNBT(NBTTagCompound nbtTags)
{
@ -336,12 +330,6 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{

View file

@ -129,32 +129,12 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl
return 0;
}
@Override
public int receiveGas(ForgeDirection side, GasStack stack)
{
return receiveGas(side, stack, true);
}
@Override
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
{
if(getReactor() != null)
{
if(getReactor().getSteamTank().getFluidAmount() > 0)
{
return new GasStack(GasRegistry.getGas("steam"), getReactor().getSteamTank().drain(amount, doTransfer).amount);
}
}
return null;
}
@Override
public GasStack drawGas(ForgeDirection side, int amount)
{
return drawGas(side, amount, true);
}
@Override
public boolean canReceiveGas(ForgeDirection side, Gas type)
{
@ -164,7 +144,7 @@ public class TileEntityReactorPort extends TileEntityReactorBlock implements IFl
@Override
public boolean canDrawGas(ForgeDirection side, Gas type)
{
return (type == GasRegistry.getGas("steam"));
return false;
}
@Override