类 Enchantment
java.lang.Object
net.minecraft.world.item.enchantment.Enchantment
- 所有已实现的接口:
IForgeEnchantment
- 直接已知子类:
ArrowDamageEnchantment
,ArrowFireEnchantment
,ArrowInfiniteEnchantment
,ArrowKnockbackEnchantment
,ArrowPiercingEnchantment
,BindingCurseEnchantment
,DamageEnchantment
,DigDurabilityEnchantment
,DiggingEnchantment
,FireAspectEnchantment
,FishingSpeedEnchantment
,FrostWalkerEnchantment
,KnockbackEnchantment
,LootBonusEnchantment
,MendingEnchantment
,MultiShotEnchantment
,OxygenEnchantment
,ProtectionEnchantment
,QuickChargeEnchantment
,SoulSpeedEnchantment
,SweepingEdgeEnchantment
,SwiftSneakEnchantment
,ThornsEnchantment
,TridentChannelingEnchantment
,TridentImpalerEnchantment
,TridentLoyaltyEnchantment
,TridentRiptideEnchantment
,UntouchingEnchantment
,VanishingCurseEnchantment
,WaterWalkerEnchantment
,WaterWorkerEnchantment
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明final EnchantmentCategory
protected String
private final Enchantment.Rarity
private final EquipmentSlot[]
-
构造器概要
构造器限定符构造器说明protected
Enchantment
(Enchantment.Rarity pRarity, EnchantmentCategory pCategory, EquipmentSlot[] pApplicableSlots) -
方法概要
修饰符和类型方法说明static Enchantment
byId
(int pId) boolean
This applies specifically to applying at the enchanting table.boolean
canEnchant
(ItemStack pStack) protected boolean
checkCompatibility
(Enchantment pOther) void
doPostAttack
(LivingEntity pAttacker, Entity pTarget, int pLevel) void
doPostHurt
(LivingEntity pTarget, Entity pAttacker, int pLevel) float
getDamageBonus
(int pLevel, MobType pType) 已过时。int
getDamageProtection
(int pLevel, DamageSource pSource) getFullname
(int pLevel) int
getMaxCost
(int pLevel) int
int
getMinCost
(int pLevel) int
protected String
getSlotItems
(LivingEntity pEntity) boolean
Is this enchantment allowed to be enchanted on books via Enchantment Tablefinal boolean
isCompatibleWith
(Enchantment pOther) boolean
isCurse()
boolean
boolean
boolean
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraftforge.common.extensions.IForgeEnchantment
allowedInCreativeTab, getDamageBonus
-
字段详细资料
-
slots
-
rarity
-
category
-
descriptionId
-
-
构造器详细资料
-
Enchantment
protected Enchantment(Enchantment.Rarity pRarity, EnchantmentCategory pCategory, EquipmentSlot[] pApplicableSlots)
-
-
方法详细资料
-
byId
-
getSlotItems
-
getRarity
-
getMinLevel
public int getMinLevel() -
getMaxLevel
public int getMaxLevel() -
getMinCost
public int getMinCost(int pLevel) -
getMaxCost
public int getMaxCost(int pLevel) -
getDamageProtection
-
getDamageBonus
已过时。 -
isCompatibleWith
-
checkCompatibility
-
getOrCreateDescriptionId
-
getDescriptionId
-
getFullname
-
canEnchant
-
doPostAttack
-
doPostHurt
-
isTreasureOnly
public boolean isTreasureOnly() -
isCurse
public boolean isCurse() -
isTradeable
public boolean isTradeable() -
isDiscoverable
public boolean isDiscoverable() -
canApplyAtEnchantingTable
This applies specifically to applying at the enchanting table. The other methodcanEnchant(ItemStack)
applies for all possible enchantments.- 参数:
stack
-- 返回:
-
isAllowedOnBooks
public boolean isAllowedOnBooks()Is this enchantment allowed to be enchanted on books via Enchantment Table- 返回:
- false to disable the vanilla feature
-