public class UniversalBucket extends Item
Item.Properties
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, random
delegate
Constructor and Description |
---|
UniversalBucket(Item.Properties properties) |
UniversalBucket(Item.Properties properties,
int capacity,
ItemStack empty,
boolean nbtSensitive) |
Modifier and Type | Method and Description |
---|---|
void |
fillItemGroup(ItemGroup tab,
NonNullList<ItemStack> subItems) |
int |
getCapacity() |
ItemStack |
getContainerItem(ItemStack itemStack)
ItemStack sensitive version of getContainerItem.
|
java.lang.String |
getCreatorModId(ItemStack itemStack)
Called to get the Mod ID of the mod that *created* the ItemStack, instead of
the real Mod ID that *registered* it.
|
ITextComponent |
getDisplayName(ItemStack stack) |
ItemStack |
getEmpty() |
FluidStack |
getFluid(ItemStack container) |
boolean |
hasContainerItem(ItemStack stack)
ItemStack sensitive version of hasContainerItem
|
ICapabilityProvider |
initCapabilities(ItemStack stack,
NBTTagCompound nbt)
Called from ItemStack.setItem, will hold extra data for the life of this
ItemStack.
|
boolean |
isNbtSensitive() |
void |
onFillBucket(FillBucketEvent event) |
ActionResult<ItemStack> |
onItemRightClick(World world,
EntityPlayer player,
EnumHand hand) |
addInformation, addPropertyOverride, asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getShareTag, getTileEntityItemStackRenderer, getToolTypes, getTranslationKey, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, hitEntity, inventoryTick, isComplex, isDamageable, isEnchantable, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemUse, onItemUseFinish, onPlayerStoppedUsing, rayTrace, register, registerItems, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canHarvestBlock, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getCreativeTabs, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getHorseArmorType, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasCustomEntity, isBeaconPayment, isBookEnchantable, isDamaged, isShield, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
public UniversalBucket(Item.Properties properties)
public UniversalBucket(Item.Properties properties, int capacity, @Nonnull ItemStack empty, boolean nbtSensitive)
capacity
- Capacity of the containerempty
- Item used for filling with the bucket event and returned when emptiednbtSensitive
- Whether the empty item is NBT sensitive (usually true if empty and full are the same items)public boolean hasContainerItem(@Nonnull ItemStack stack)
IForgeItem
stack
- The current item stack@Nonnull public ItemStack getContainerItem(@Nonnull ItemStack itemStack)
IForgeItem
itemStack
- The current ItemStackpublic void fillItemGroup(@Nullable ItemGroup tab, @Nonnull NonNullList<ItemStack> subItems)
fillItemGroup
in class Item
@Nonnull public ITextComponent getDisplayName(@Nonnull ItemStack stack)
getDisplayName
in class Item
@Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand)
onItemRightClick
in class Item
public void onFillBucket(FillBucketEvent event)
@Nullable public FluidStack getFluid(@Nonnull ItemStack container)
public int getCapacity()
@Nonnull public ItemStack getEmpty()
public boolean isNbtSensitive()
@Nullable public java.lang.String getCreatorModId(@Nonnull ItemStack itemStack)
IForgeItem
itemStack
- the ItemStack to check#getRegistryName()
would return null.public ICapabilityProvider initCapabilities(@Nonnull ItemStack stack, NBTTagCompound nbt)
IForgeItem
stack
- The ItemStacknbt
- NBT of this item serialized, or null.