Interface IDispensibleContainerItemExtension
public interface IDispensibleContainerItemExtension
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
emptyContents
(@Nullable net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.phys.BlockHitResult hitResult, @Nullable net.minecraft.world.item.ItemStack container) Empties the contents of the container and returns whether it was successful.private net.minecraft.world.item.DispensibleContainerItem
self()
-
Method Details
-
self
private net.minecraft.world.item.DispensibleContainerItem self() -
emptyContents
default boolean emptyContents(@Nullable @Nullable net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.world.phys.BlockHitResult hitResult, @Nullable @Nullable net.minecraft.world.item.ItemStack container) Empties the contents of the container and returns whether it was successful.- Parameters:
entity
- Player who empties the container. May be null for blocks like dispensers.level
- Level to place the content inpos
- The position in the level to empty the contenthitResult
- Hit result of the interaction. May be null for blocks like dispensers.container
- ItemStack of the container. May be null for backwards compatibility.- Returns:
- true if emptying the contents of the container was successful, false otherwise
-