public class UniversalBucket extends Item
Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
private int |
capacity |
private ItemStack |
empty |
private boolean |
nbtSensitive |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
Constructor and Description |
---|
UniversalBucket() |
UniversalBucket(int capacity,
ItemStack empty,
boolean nbtSensitive) |
Modifier and Type | Method and Description |
---|---|
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.
|
ItemStack |
getEmpty() |
static ItemStack |
getFilledBucket(UniversalBucket item,
Fluid fluid)
Deprecated.
use the NBT-sensitive version
FluidUtil.getFilledBucket(FluidStack) |
FluidStack |
getFluid(ItemStack container) |
java.lang.String |
getItemStackDisplayName(ItemStack stack) |
void |
getSubItems(CreativeTabs tab,
NonNullList<ItemStack> subItems) |
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, canApplyAtEnchantingTable, canContinueUsing, canDestroyBlockInCreative, canDisableShield, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDefaultInstance, getDestroySpeed, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getForgeRarity, getHarvestLevel, getHasSubtypes, getHighlightTip, getHorseArmorTexture, getHorseArmorType, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemBurnTime, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getTileEntityItemStackRenderer, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, getXpRepairRatio, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isInCreativeTab, isMap, isRepairable, isShield, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, readNBTShareTag, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setTileEntityItemStackRenderer, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
private final int capacity
@Nonnull private final ItemStack empty
private final boolean nbtSensitive
public UniversalBucket()
public UniversalBucket(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)
Item
hasContainerItem
in class Item
stack
- The current item stack@Nonnull public ItemStack getContainerItem(@Nonnull ItemStack itemStack)
Item
getContainerItem
in class Item
itemStack
- The current ItemStackpublic void getSubItems(@Nullable CreativeTabs tab, @Nonnull NonNullList<ItemStack> subItems)
getSubItems
in class Item
@Nonnull public java.lang.String getItemStackDisplayName(@Nonnull ItemStack stack)
getItemStackDisplayName
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)
@Deprecated @Nonnull public static ItemStack getFilledBucket(@Nonnull UniversalBucket item, Fluid fluid)
FluidUtil.getFilledBucket(FluidStack)
@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)
Item
getCreatorModId
in class Item
itemStack
- the ItemStack to checkIForgeRegistryEntry.Impl.getRegistryName()
would return null.public ICapabilityProvider initCapabilities(@Nonnull ItemStack stack, NBTTagCompound nbt)
Item
initCapabilities
in class Item
stack
- The ItemStacknbt
- NBT of this item serialized, or null.