Package net.minecraftforge.fluids
Class DispenseFluidContainer
- java.lang.Object
-
- net.minecraft.dispenser.DefaultDispenseItemBehavior
-
- net.minecraftforge.fluids.DispenseFluidContainer
-
- All Implemented Interfaces:
IDispenseItemBehavior
public class DispenseFluidContainer extends DefaultDispenseItemBehavior
Fills or drains a fluid container item using a Dispenser.
-
-
Field Summary
Fields Modifier and Type Field Description private DefaultDispenseItemBehavior
dispenseBehavior
private static DispenseFluidContainer
INSTANCE
-
Fields inherited from interface net.minecraft.dispenser.IDispenseItemBehavior
LOGGER, NOOP
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DispenseFluidContainer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private ItemStack
dumpContainer(IBlockSource source, ItemStack stack)
Drains a filled container and places the fluid in front of the Dispenser.ItemStack
execute(IBlockSource source, ItemStack stack)
private ItemStack
fillContainer(IBlockSource source, ItemStack stack)
Picks up fluid in front of a Dispenser and fills a container with it.static DispenseFluidContainer
getInstance()
-
Methods inherited from class net.minecraft.dispenser.DefaultDispenseItemBehavior
dispense, playAnimation, playSound, spawnItem
-
-
-
-
Field Detail
-
INSTANCE
private static final DispenseFluidContainer INSTANCE
-
dispenseBehavior
private final DefaultDispenseItemBehavior dispenseBehavior
-
-
Method Detail
-
getInstance
public static DispenseFluidContainer getInstance()
-
execute
@Nonnull public ItemStack execute(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
- Overrides:
execute
in classDefaultDispenseItemBehavior
-
fillContainer
@Nonnull private ItemStack fillContainer(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
Picks up fluid in front of a Dispenser and fills a container with it.
-
dumpContainer
@Nonnull private ItemStack dumpContainer(IBlockSource source, @Nonnull ItemStack stack)
Drains a filled container and places the fluid in front of the Dispenser.
-
-