MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / fillAll

Method fillAll

src/main/java/gregapi/fluid/FluidTankGT.java:206–230  ·  view source on GitHub ↗
(FluidStack aFluid)

Source from the content-addressed store, hash-verified

204 public boolean canFillAll(long aAmount) {return aAmount <= 0 || mVoidExcess || mAmount + aAmount <= capacity();}
205
206 public boolean fillAll(FluidStack aFluid) {
207 if (aFluid == null || aFluid.amount <= 0) return T;
208 if (isEmpty()) {
209 long tCapacity = capacity(aFluid);
210 if (aFluid.amount <= tCapacity || mVoidExcess) {
211 mFluid = aFluid.copy();
212 mChangedFluids = T;
213 mAmount = aFluid.amount;
214 if (mAmount > tCapacity) mAmount = tCapacity;
215 return T;
216 }
217 return F;
218 }
219 if (contains(aFluid)) {
220 if (mAmount + aFluid.amount <= capacity()) {
221 mAmount += aFluid.amount;
222 return T;
223 }
224 if (mVoidExcess) {
225 mAmount = capacity();
226 return T;
227 }
228 }
229 return F;
230 }
231
232 public boolean fillAll(FluidStack aFluid, long aMultiplier) {
233 if (aMultiplier <= 0) return T;

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.95
capacityMethod · 0.95
containsMethod · 0.95
copyMethod · 0.45

Tested by

no test coverage detected