接口 IDispensibleContainerItemExtension
- 所有已知子接口:
DispensibleContainerItem
- 所有已知实现类:
BucketItem
,MobBucketItem
,SolidBucketItem
public interface IDispensibleContainerItemExtension
-
方法概要
修饰符和类型方法说明default boolean
emptyContents
(@Nullable LivingEntity entity, Level level, BlockPos pos, @Nullable BlockHitResult hitResult, @Nullable ItemStack container) Empties the contents of the container and returns whether it was successful.private DispensibleContainerItem
self()
-
方法详细资料
-
self
-
emptyContents
default boolean emptyContents(@Nullable @Nullable LivingEntity entity, Level level, BlockPos pos, @Nullable @Nullable BlockHitResult hitResult, @Nullable @Nullable ItemStack container) Empties the contents of the container and returns whether it was successful.- 参数:
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.- 返回:
- true if emptying the contents of the container was successful, false otherwise
-