public class UniversalBucket extends Item
Item.PropertiesATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, randomdelegate| 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, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanApplyAtEnchantingTable, 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, showDurabilityBarpublic 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)
IForgeItemstack - The current item stack@Nonnull public ItemStack getContainerItem(@Nonnull ItemStack itemStack)
IForgeItemitemStack - 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 Itempublic 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)
IForgeItemitemStack - the ItemStack to check#getRegistryName() would return null.public ICapabilityProvider initCapabilities(@Nonnull ItemStack stack, NBTTagCompound nbt)
IForgeItemstack - The ItemStacknbt - NBT of this item serialized, or null.