Interface IDispensibleContainerItemExtension


public interface IDispensibleContainerItemExtension
  • Method Summary

    Modifier and Type
    Method
    Description
    default 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
     
  • 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 in
      pos - The position in the level to empty the content
      hitResult - 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