public class ItemFood extends Item
Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
private boolean |
alwaysEdible |
private int |
healAmount |
private boolean |
isWolfsFavoriteMeat |
int |
itemUseDuration |
private float |
potionEffectProbability |
private PotionEffect |
potionId |
private float |
saturationModifier |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
Constructor and Description |
---|
ItemFood(int amount,
boolean isWolfFood) |
ItemFood(int amount,
float saturation,
boolean isWolfFood) |
Modifier and Type | Method and Description |
---|---|
int |
getHealAmount(ItemStack stack) |
EnumAction |
getItemUseAction(ItemStack stack) |
int |
getMaxItemUseDuration(ItemStack stack) |
float |
getSaturationModifier(ItemStack stack) |
boolean |
isWolfsFavoriteMeat() |
protected void |
onFoodEaten(ItemStack stack,
World worldIn,
EntityPlayer player) |
ActionResult<ItemStack> |
onItemRightClick(World worldIn,
EntityPlayer playerIn,
EnumHand handIn) |
ItemStack |
onItemUseFinish(ItemStack stack,
World worldIn,
EntityLivingBase entityLiving) |
ItemFood |
setAlwaysEdible() |
ItemFood |
setPotionEffect(PotionEffect effect,
float probability) |
addInformation, addPropertyOverride, canApplyAtEnchantingTable, canContinueUsing, canDestroyBlockInCreative, canDisableShield, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getCreatorModId, getDamage, getDefaultInstance, getDestroySpeed, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getForgeRarity, getHarvestLevel, getHasSubtypes, getHighlightTip, getHorseArmorTexture, getHorseArmorType, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemBurnTime, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getMaxDamage, getMaxDamage, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getSubItems, getTileEntityItemStackRenderer, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, getXpRepairRatio, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isInCreativeTab, isMap, isRepairable, isShield, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUse, 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
public final int itemUseDuration
private final int healAmount
private final float saturationModifier
private final boolean isWolfsFavoriteMeat
private boolean alwaysEdible
private PotionEffect potionId
private float potionEffectProbability
public ItemFood(int amount, float saturation, boolean isWolfFood)
public ItemFood(int amount, boolean isWolfFood)
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving)
onItemUseFinish
in class Item
protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player)
public int getMaxItemUseDuration(ItemStack stack)
getMaxItemUseDuration
in class Item
public EnumAction getItemUseAction(ItemStack stack)
getItemUseAction
in class Item
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn)
onItemRightClick
in class Item
public int getHealAmount(ItemStack stack)
public float getSaturationModifier(ItemStack stack)
public boolean isWolfsFavoriteMeat()
public ItemFood setPotionEffect(PotionEffect effect, float probability)
public ItemFood setAlwaysEdible()