Class BucketPickupHandlerWrapper
java.lang.Object
net.neoforged.neoforge.fluids.capability.wrappers.BucketPickupHandlerWrapper
- All Implemented Interfaces:
IFluidHandler
@Deprecated(since="1.21.9",
forRemoval=true)
public class BucketPickupHandlerWrapper
extends Object
implements IFluidHandler
Deprecated, for removal: This API element is subject to removal in a future version.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforge.fluids.capability.IFluidHandler
IFluidHandler.FluidAction -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlockPosDeprecated, for removal: This API element is subject to removal in a future version.protected final BucketPickupDeprecated, for removal: This API element is subject to removal in a future version.private static final org.apache.logging.log4j.LoggerDeprecated, for removal: This API element is subject to removal in a future version.protected final PlayerDeprecated, for removal: This API element is subject to removal in a future version.protected final LevelDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionBucketPickupHandlerWrapper(Player player, BucketPickup bucketPickupHandler, Level world, BlockPos blockPos) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiondrain(int maxDrain, IFluidHandler.FluidAction action) Deprecated, for removal: This API element is subject to removal in a future version.Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.drain(FluidStack resource, IFluidHandler.FluidAction action) Deprecated, for removal: This API element is subject to removal in a future version.Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.intfill(FluidStack resource, IFluidHandler.FluidAction action) Deprecated, for removal: This API element is subject to removal in a future version.Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.getFluidInTank(int tank) Deprecated, for removal: This API element is subject to removal in a future version.Returns the FluidStack in a given tank.intgetTankCapacity(int tank) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves the maximum fluid amount for a given tank.intgetTanks()Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of fluid storage units ("tanks") availablebooleanisFluidValid(int tank, FluidStack stack) Deprecated, for removal: This API element is subject to removal in a future version.This function is a way to determine which fluids can exist inside a given handler.
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGERDeprecated, for removal: This API element is subject to removal in a future version. -
player
Deprecated, for removal: This API element is subject to removal in a future version. -
bucketPickupHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
world
Deprecated, for removal: This API element is subject to removal in a future version. -
blockPos
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
BucketPickupHandlerWrapper
public BucketPickupHandlerWrapper(Player player, BucketPickup bucketPickupHandler, Level world, BlockPos blockPos) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getTanks
public int getTanks()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerReturns the number of fluid storage units ("tanks") available- Specified by:
getTanksin interfaceIFluidHandler- Returns:
- The number of tanks available
-
getFluidInTank
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerReturns the FluidStack in a given tank.IMPORTANT: This FluidStack MUST NOT be modified. This method is not for altering internal contents. Any implementers who are able to detect modification via this method should throw an exception. It is ENTIRELY reasonable and likely that the stack returned here will be a copy.
SERIOUSLY: DO NOT MODIFY THE RETURNED FLUIDSTACK
- Specified by:
getFluidInTankin interfaceIFluidHandler- Parameters:
tank- Tank to query.- Returns:
- FluidStack in a given tank. FluidStack.EMPTY if the tank is empty.
-
getTankCapacity
public int getTankCapacity(int tank) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerRetrieves the maximum fluid amount for a given tank.- Specified by:
getTankCapacityin interfaceIFluidHandler- Parameters:
tank- Tank to query.- Returns:
- The maximum fluid amount held by the tank.
-
isFluidValid
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerThis function is a way to determine which fluids can exist inside a given handler. General purpose tanks will basically always return TRUE for this.- Specified by:
isFluidValidin interfaceIFluidHandler- Parameters:
tank- Tank to query for validitystack- Stack to test with for validity- Returns:
- TRUE if the tank can hold the FluidStack, not considering current state. (Basically, is a given fluid EVER allowed in this tank?) Return FALSE if the answer to that question is 'no.'
-
fill
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerFills fluid into internal tanks, distribution is left entirely to the IFluidHandler.- Specified by:
fillin interfaceIFluidHandler- Parameters:
resource- FluidStack representing the Fluid and maximum amount of fluid to be filled.action- If SIMULATE, fill will only be simulated.- Returns:
- Amount of resource that was (or would have been, if simulated) filled.
-
drain
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerDrains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.- Specified by:
drainin interfaceIFluidHandler- Parameters:
resource- FluidStack representing the Fluid and maximum amount of fluid to be drained.action- If SIMULATE, drain will only be simulated.- Returns:
- FluidStack representing the Fluid and amount that was (or would have been, if simulated) drained.
-
drain
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IFluidHandlerDrains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.This method is not Fluid-sensitive.
- Specified by:
drainin interfaceIFluidHandler- Parameters:
maxDrain- Maximum amount of fluid to drain.action- If SIMULATE, drain will only be simulated.- Returns:
- FluidStack representing the Fluid and amount that was (or would have been, if simulated) drained.
-
FluidUtil.tryPickupFluid(net.neoforged.neoforge.transfer.ResourceHandler<net.neoforged.neoforge.transfer.fluid.FluidResource>, net.minecraft.world.entity.player.Player, net.minecraft.world.level.Level, net.minecraft.core.BlockPos, net.minecraft.core.Direction)instead.