类 SwordItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.TieredItem
net.minecraft.world.item.SwordItem
- 所有已实现的接口:
FeatureElement
,Vanishable
,ItemLike
,IForgeItem
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.item.Item
Item.Properties
-
字段概要
字段修饰符和类型字段说明private final float
private final com.google.common.collect.Multimap<Attribute,
AttributeModifier> 从类继承的字段 net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器构造器说明SwordItem
(Tier pTier, int pAttackDamageModifier, float pAttackSpeedModifier, Item.Properties pProperties) -
方法概要
修饰符和类型方法说明boolean
canAttackBlock
(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer) boolean
canPerformAction
(ItemStack stack, ToolAction toolAction) Queries if an item can perform the given action.float
com.google.common.collect.Multimap<Attribute,
AttributeModifier> getDefaultAttributeModifiers
(EquipmentSlot pEquipmentSlot) float
getDestroySpeed
(ItemStack pStack, BlockState pState) boolean
hurtEnemy
(ItemStack pStack, LivingEntity pTarget, LivingEntity pAttacker) boolean
isCorrectToolForDrops
(BlockState pBlock) boolean
mineBlock
(ItemStack pStack, Level pLevel, BlockState pState, BlockPos pPos, LivingEntity pEntityLiving) 从类继承的方法 net.minecraft.world.item.TieredItem
getEnchantmentValue, getTier, isValidRepairItem
从类继承的方法 net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoad
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
字段详细资料
-
attackDamage
private final float attackDamage -
defaultModifiers
-
-
构造器详细资料
-
SwordItem
public SwordItem(Tier pTier, int pAttackDamageModifier, float pAttackSpeedModifier, Item.Properties pProperties)
-
-
方法详细资料
-
getDamage
public float getDamage() -
canAttackBlock
- 覆盖:
canAttackBlock
在类中Item
-
getDestroySpeed
- 覆盖:
getDestroySpeed
在类中Item
-
hurtEnemy
-
mineBlock
public boolean mineBlock(ItemStack pStack, Level pLevel, BlockState pState, BlockPos pPos, LivingEntity pEntityLiving) -
isCorrectToolForDrops
- 覆盖:
isCorrectToolForDrops
在类中Item
-
getDefaultAttributeModifiers
public com.google.common.collect.Multimap<Attribute,AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot pEquipmentSlot) - 覆盖:
getDefaultAttributeModifiers
在类中Item
-
canPerformAction
从接口复制的说明:IForgeItem
Queries if an item can perform the given action. SeeToolActions
for a description of each stock action- 指定者:
canPerformAction
在接口中IForgeItem
- 参数:
stack
- The stack being usedtoolAction
- The action being queried- 返回:
- True if the stack can perform the action
-