public abstract class Enchantment
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static Enchantment |
aquaAffinity
Increases underwater mining rate
|
static Enchantment |
baneOfArthropods
Extra damage to spiders, cave spiders and silverfish
|
static Enchantment |
blastProtection
Protection against explosions
|
int |
effectId |
static Enchantment |
efficiency
Faster resource gathering while in use
|
static Enchantment[] |
enchantmentsBookList
The list of enchantments applicable by the anvil from a book
|
static Enchantment[] |
enchantmentsList |
static Enchantment |
featherFalling
Less fall damage
|
static Enchantment |
field_151369_A |
static Enchantment |
field_151370_z |
static Enchantment |
fireAspect
Lights mobs on fire
|
static Enchantment |
fireProtection
Protection against fire
|
static Enchantment |
flame
Flame enchantment for bows.
|
static Enchantment |
fortune
Can multiply the drop rate of items from blocks
|
static Enchantment |
infinity
Infinity enchantment for bows.
|
static Enchantment |
knockback
Knocks mob and players backwards upon hit
|
static Enchantment |
looting
Mobs have a chance to drop more loot
|
protected java.lang.String |
name
Used in localisation and stats.
|
static Enchantment |
power
Power enchantment for bows, add's extra damage to arrows.
|
static Enchantment |
projectileProtection
Protection against projectile entities (e.g. arrows)
|
static Enchantment |
protection
Converts environmental damage to armour damage
|
static Enchantment |
punch
Knockback enchantments for bows, the arrows will knockback the target when hit.
|
static Enchantment |
respiration
Decreases the rate of air loss underwater; increases time between damage while suffocating
|
static Enchantment |
sharpness
Extra damage to mobs
|
static Enchantment |
silkTouch
Blocks mined will drop themselves, even if it should drop something else (e.g. stone will drop stone, not
cobblestone)
|
static Enchantment |
smite
Extra damage to zombies, zombie pigmen and skeletons
|
static Enchantment |
thorns |
EnumEnchantmentType |
type
The EnumEnchantmentType given to this Enchantment.
|
static Enchantment |
unbreaking
Sometimes, the tool's durability will not be spent when the tool is used
|
| Modifier | Constructor and Description |
|---|---|
protected |
Enchantment(int p_i1926_1_,
int p_i1926_2_,
EnumEnchantmentType p_i1926_3_) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToBookList(Enchantment enchantment)
Add to the list of enchantments applicable by the anvil from a book
|
int |
calcModifierDamage(int p_77318_1_,
DamageSource p_77318_2_)
Calculates de damage protection of the enchantment based on level and damage source passed.
|
boolean |
canApply(ItemStack p_92089_1_) |
boolean |
canApplyAtEnchantingTable(ItemStack stack)
This applies specifically to applying at the enchanting table.
|
boolean |
canApplyTogether(Enchantment p_77326_1_)
Determines if the enchantment passed can be applyied together with this enchantment.
|
void |
func_151367_b(EntityLivingBase p_151367_1_,
Entity p_151367_2_,
int p_151367_3_) |
void |
func_151368_a(EntityLivingBase p_151368_1_,
Entity p_151368_2_,
int p_151368_3_) |
float |
func_152376_a(int p_152376_1_,
EnumCreatureAttribute p_152376_2_) |
int |
getMaxEnchantability(int p_77317_1_)
Returns the maximum value of enchantability nedded on the enchantment level passed.
|
int |
getMaxLevel()
Returns the maximum level that the enchantment can have.
|
int |
getMinEnchantability(int p_77321_1_)
Returns the minimal value of enchantability needed on the enchantment level passed.
|
int |
getMinLevel()
Returns the minimum level that the enchantment can have.
|
java.lang.String |
getName()
Return the name of key in translation table of this enchantment.
|
java.lang.String |
getTranslatedName(int p_77316_1_)
Returns the correct traslated name of the enchantment and the level in roman numbers.
|
int |
getWeight() |
boolean |
isAllowedOnBooks()
Is this enchantment allowed to be enchanted on books via Enchantment Table
|
Enchantment |
setName(java.lang.String p_77322_1_)
Sets the enchantment name
|
public static final Enchantment[] enchantmentsList
public static final Enchantment[] enchantmentsBookList
public static final Enchantment protection
public static final Enchantment fireProtection
public static final Enchantment featherFalling
public static final Enchantment blastProtection
public static final Enchantment projectileProtection
public static final Enchantment respiration
public static final Enchantment aquaAffinity
public static final Enchantment thorns
public static final Enchantment sharpness
public static final Enchantment smite
public static final Enchantment baneOfArthropods
public static final Enchantment knockback
public static final Enchantment fireAspect
public static final Enchantment looting
public static final Enchantment efficiency
public static final Enchantment silkTouch
public static final Enchantment unbreaking
public static final Enchantment fortune
public static final Enchantment power
public static final Enchantment punch
public static final Enchantment flame
public static final Enchantment infinity
public static final Enchantment field_151370_z
public static final Enchantment field_151369_A
public final int effectId
public EnumEnchantmentType type
protected java.lang.String name
protected Enchantment(int p_i1926_1_,
int p_i1926_2_,
EnumEnchantmentType p_i1926_3_)
public int getWeight()
public int getMinLevel()
public int getMaxLevel()
public int getMinEnchantability(int p_77321_1_)
public int getMaxEnchantability(int p_77317_1_)
public int calcModifierDamage(int p_77318_1_,
DamageSource p_77318_2_)
public float func_152376_a(int p_152376_1_,
EnumCreatureAttribute p_152376_2_)
public boolean canApplyTogether(Enchantment p_77326_1_)
public Enchantment setName(java.lang.String p_77322_1_)
public java.lang.String getName()
public java.lang.String getTranslatedName(int p_77316_1_)
public boolean canApply(ItemStack p_92089_1_)
public void func_151368_a(EntityLivingBase p_151368_1_, Entity p_151368_2_, int p_151368_3_)
public void func_151367_b(EntityLivingBase p_151367_1_, Entity p_151367_2_, int p_151367_3_)
public boolean canApplyAtEnchantingTable(ItemStack stack)
canApply(ItemStack)
applies for all possible enchantments.stack - public static void addToBookList(Enchantment enchantment)
enchantment - public boolean isAllowedOnBooks()