Package net.minecraft.item
Class Item
java.lang.Object
net.minecraft.item.Item
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
AirBlockItem,ArmorItem,ArmorStandItem,ArrowItem,BannerPatternItem,BlockItem,BoatItem,BoneMealItem,BookItem,BucketItem,ChorusFruitItem,CompassItem,DebugStickItem,DecorationItem,DyeItem,EggItem,ElytraItem,EnchantedBookItem,EnchantedGoldenAppleItem,EndCrystalItem,EnderEyeItem,EnderPearlItem,ExperienceBottleItem,FireChargeItem,FireworkChargeItem,FireworkItem,FishingRodItem,FlintAndSteelItem,GlassBottleItem,HoneyBottleItem,HorseArmorItem,KnowledgeBookItem,LeadItem,MilkBucketItem,MinecartItem,MushroomStewItem,MusicDiscItem,NameTagItem,NetherStarItem,NetworkSyncedItem,OnAStickItem,PotionItem,RangedWeaponItem,SaddleItem,ShearsItem,ShieldItem,SnowballItem,SpawnEggItem,SuspiciousStewItem,ToolItem,TridentItem,WritableBookItem,WrittenBookItem
public class Item extends Object implements ItemConvertible
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classItem.Settings -
Field Summary
Fields Modifier and Type Field Description protected static UUIDATTACK_DAMAGE_MODIFIER_IDprotected static UUIDATTACK_SPEED_MODIFIER_IDstatic Map<Block,Item>BLOCK_ITEMSprivate booleanfireproofprivate FoodComponentfoodComponentprotected ItemGroupgroupprivate intmaxCountprivate intmaxDamageprotected static RandomRANDOMprivate Rarityrarityprivate ItemrecipeRemainderprivate StringtranslationKey -
Constructor Summary
Constructors Constructor Description Item(Item.Settings settings) -
Method Summary
-
Field Details
-
BLOCK_ITEMS
-
ATTACK_DAMAGE_MODIFIER_ID
-
ATTACK_SPEED_MODIFIER_ID
-
RANDOM
-
group
-
rarity
-
maxCount
private final int maxCount -
maxDamage
private final int maxDamage -
fireproof
private final boolean fireproof -
recipeRemainder
-
translationKey
-
foodComponent
-
-
Constructor Details
-
Method Details
-
getRawId
-
byRawId
-
fromBlock
Deprecated. -
usageTick
-
postProcessTag
-
canMine
-
asItem
- Specified by:
asItemin interfaceItemConvertible
-
useOnBlock
-
getMiningSpeedMultiplier
-
use
-
finishUsing
-
getMaxCount
public final int getMaxCount() -
getMaxDamage
public final int getMaxDamage() -
isDamageable
public boolean isDamageable() -
postHit
-
postMine
public boolean postMine(ItemStack stack, World world, BlockState state, BlockPos pos, LivingEntity miner) -
isEffectiveOn
-
useOnEntity
public ActionResult useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) -
getName
-
toString
-
getOrCreateTranslationKey
-
getTranslationKey
-
getTranslationKey
-
shouldSyncTagToClient
public boolean shouldSyncTagToClient() -
getRecipeRemainder
-
hasRecipeRemainder
public boolean hasRecipeRemainder() -
inventoryTick
-
onCraft
-
isNetworkSynced
public boolean isNetworkSynced() -
getUseAction
-
getMaxUseTime
-
onStoppedUsing
-
appendTooltip
-
getName
-
hasEnchantmentGlint
-
getRarity
-
isEnchantable
-
rayTrace
protected static BlockHitResult rayTrace(World world, PlayerEntity player, RayTraceContext.FluidHandling fluidHandling) -
getEnchantability
public int getEnchantability() -
appendStacks
-
isIn
-
getGroup
-
canRepair
-
getAttributeModifiers
public Multimap<EntityAttribute,EntityAttributeModifier> getAttributeModifiers(EquipmentSlot slot) -
isUsedOnRelease
-
getStackForRender
-
isIn
-
isFood
public boolean isFood() -
getFoodComponent
-
getDrinkSound
-
getEatSound
-
isFireproof
public boolean isFireproof() -
damage
-