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