类 BucketItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.BucketItem
- 所有已实现的接口:
FeatureElement
,DispensibleContainerItem
,ItemLike
,IForgeDispensibleContainerItem
,IForgeItem
- 直接已知子类:
MobBucketItem
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.item.Item
Item.Properties
-
字段概要
字段从类继承的字段 net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器构造器说明BucketItem
(Supplier<? extends Fluid> supplier, Item.Properties builder) BucketItem
(Fluid pContent, Item.Properties pProperties) 已过时。 -
方法概要
修饰符和类型方法说明protected boolean
canBlockContainFluid
(Level worldIn, BlockPos posIn, BlockState blockstate) void
checkExtraContent
(Player pPlayer, Level pLevel, ItemStack pContainerStack, BlockPos pPos) boolean
emptyContents
(Player pPlayer, Level pLevel, BlockPos pPos, BlockHitResult pResult) 已过时。boolean
emptyContents
(Player pPlayer, Level pLevel, BlockPos pPos, BlockHitResult pResult, ItemStack container) Empties the contents of the container and returns whether it was successful.static ItemStack
getEmptySuccessItem
(ItemStack pBucketStack, Player pPlayer) getFluid()
initCapabilities
(ItemStack stack, CompoundTag nbt) Called from ItemStack.setItem, will hold extra data for the life of this ItemStack.protected void
playEmptySound
(Player pPlayer, LevelAccessor pLevel, BlockPos pPos) use
(Level pLevel, Player pPlayer, InteractionHand pHand) 从类继承的方法 net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoad
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
字段详细资料
-
-
fluidSupplier
-
-
构造器详细资料
-
BucketItem
已过时。 -
BucketItem
- 参数:
supplier
- A fluid supplier such asRegistryObject<Fluid>
-
-
方法详细资料
-
use
-
getEmptySuccessItem
-
checkExtraContent
public void checkExtraContent(@Nullable Player pPlayer, Level pLevel, ItemStack pContainerStack, BlockPos pPos) - 指定者:
checkExtraContent
在接口中DispensibleContainerItem
-
emptyContents
@Deprecated public boolean emptyContents(@Nullable Player pPlayer, Level pLevel, BlockPos pPos, @Nullable BlockHitResult pResult) 已过时。- 指定者:
emptyContents
在接口中DispensibleContainerItem
-
emptyContents
public boolean emptyContents(@Nullable Player pPlayer, Level pLevel, BlockPos pPos, @Nullable BlockHitResult pResult, @Nullable ItemStack container) 从接口复制的说明:IForgeDispensibleContainerItem
Empties the contents of the container and returns whether it was successful.- 指定者:
emptyContents
在接口中IForgeDispensibleContainerItem
- 参数:
pPlayer
- Player who empties the container. May be null for blocks like dispensers.pLevel
- Level to place the content inpPos
- The position in the level to empty the contentpResult
- 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
-
playEmptySound
-
initCapabilities
从接口复制的说明:IForgeItem
Called from ItemStack.setItem, will hold extra data for the life of this ItemStack. Can be retrieved from stack.getCapabilities() The NBT can be null if this is not called from readNBT or if the item the stack is changing FROM is different then this item, or the previous item had no capabilities. This is called BEFORE the stacks item is set so you can use stack.getItem() to see the OLD item. Remember that getItem CAN return null.- 指定者:
initCapabilities
在接口中IForgeItem
- 参数:
stack
- The ItemStacknbt
- NBT of this item serialized, or null.- 返回:
- A holder instance associated with this ItemStack where you can hold capabilities for the life of this item.
-
getFluid
-
canBlockContainFluid
-