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

Method getFluid

src/main/java/gregapi/data/FL.java:1003–1012  ·  view source on GitHub ↗
(ItemStack aStack, boolean aCheckIFluidContainerItems)

Source from the content-addressed store, hash-verified

1001 }
1002
1003 public static FluidStack getFluid(ItemStack aStack, boolean aCheckIFluidContainerItems) {
1004 if (ST.invalid(aStack)) return null;
1005 if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) {
1006 FluidStack rFluid = ((IFluidContainerItem)aStack.getItem()).drain(ST.amount(1, aStack), Integer.MAX_VALUE, T);
1007 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;
1008 return rFluid;
1009 }
1010 FluidContainerData tData = FULL_TO_DATA.get(new ItemStackContainer(aStack));
1011 return tData==null?NF:tData.fluid.copy();
1012 }
1013
1014 public static ItemStack getEmpty(ItemStack aStack, boolean aCheckIFluidContainerItems) {
1015 if (ST.invalid(aStack)) return NI;

Callers 15

getBurnTimeMethod · 0.95
loadCraftingRecipesMethod · 0.95
loadUsageRecipesMethod · 0.95
setItemData_Method · 0.95
fillMethod · 0.95
drainMethod · 0.95
getFluidContentMethod · 0.95
getFoodLevelMethod · 0.95
getSaturationMethod · 0.95
getHydrationMethod · 0.95
getTemperatureMethod · 0.95
getTemperatureEffectMethod · 0.95

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