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

Method getFluidForFilledItem

src/main/java/gregapi/util/UT.java:460–469  ·  view source on GitHub ↗
(ItemStack aStack, boolean aCheckIFluidContainerItems)

Source from the content-addressed store, hash-verified

458 }
459
460 @Deprecated public static FluidStack getFluidForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) {
461 if (ST.invalid(aStack)) return null;
462 if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) {
463 FluidStack rFluid = ((IFluidContainerItem)aStack.getItem()).drain(ST.amount(1, aStack), Integer.MAX_VALUE, T);
464 if (IL.Cell_Universal_Fluid.equal(aStack, T, T) && (temperature(rFluid, DEF_ENV_TEMP) > MT.Sn.mMeltingPoint || !simple(rFluid) || acid(rFluid) || powerconducting(rFluid))) return NF;
465 return rFluid;
466 }
467 FluidContainerData tData = sFilled2Data.get(new ItemStackContainer(aStack));
468 return tData==null?NF:tData.fluid.copy();
469 }
470
471 @Deprecated public static ItemStack getContainerForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) {
472 if (ST.invalid(aStack)) return NI;

Callers

nothing calls this directly

Calls 12

invalidMethod · 0.95
amountMethod · 0.95
temperatureMethod · 0.95
simpleMethod · 0.95
acidMethod · 0.95
powerconductingMethod · 0.95
getItemMethod · 0.65
drainMethod · 0.65
equalMethod · 0.65
getMethod · 0.65
getCapacityMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected