reformatted all src files (#141)

This commit is contained in:
YoungOnion
2022-09-17 05:08:02 -06:00
committed by GitHub
parent 3328bfcda2
commit 9011273229
1056 changed files with 88127 additions and 110597 deletions
@@ -19,61 +19,50 @@
package appeng.fluids.util;
import appeng.api.storage.data.IAEFluidStack;
import appeng.util.Platform;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.FluidTank;
import appeng.api.storage.data.IAEFluidStack;
import appeng.util.Platform;
public class AEFluidTank extends FluidTank implements IAEFluidTank {
private final IAEFluidInventory host;
public class AEFluidTank extends FluidTank implements IAEFluidTank
{
private final IAEFluidInventory host;
public AEFluidTank(IAEFluidInventory host, int capacity) {
super(capacity);
this.host = host;
if (host instanceof TileEntity) {
this.setTileEntity((TileEntity) host);
}
}
public AEFluidTank( IAEFluidInventory host, int capacity )
{
super( capacity );
this.host = host;
if( host instanceof TileEntity )
{
this.setTileEntity( (TileEntity) host );
}
}
@Override
protected void onContentsChanged() {
if (this.host != null && Platform.isServer()) {
this.host.onFluidInventoryChanged(this, 0);
}
super.onContentsChanged();
}
@Override
protected void onContentsChanged()
{
if( this.host != null && Platform.isServer() )
{
this.host.onFluidInventoryChanged( this, 0 );
}
super.onContentsChanged();
}
@Override
public void setFluidInSlot(int slot, IAEFluidStack fluid) {
if (slot == 0) {
this.setFluid(fluid == null ? null : fluid.getFluidStack());
this.onContentsChanged();
}
}
@Override
public void setFluidInSlot( int slot, IAEFluidStack fluid )
{
if( slot == 0 )
{
this.setFluid( fluid == null ? null : fluid.getFluidStack() );
this.onContentsChanged();
}
}
@Override
public IAEFluidStack getFluidInSlot(int slot) {
if (slot == 0) {
return AEFluidStack.fromFluidStack(this.getFluid());
}
return null;
}
@Override
public IAEFluidStack getFluidInSlot( int slot )
{
if( slot == 0 )
{
return AEFluidStack.fromFluidStack( this.getFluid() );
}
return null;
}
@Override
public int getSlots()
{
return 1;
}
@Override
public int getSlots() {
return 1;
}
}