YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraft.enchantment.Enchantment Class Reference
Inheritance diagram for net.minecraft.enchantment.Enchantment:
net.minecraft.enchantment.EnchantmentArrowDamage net.minecraft.enchantment.EnchantmentArrowFire net.minecraft.enchantment.EnchantmentArrowInfinite net.minecraft.enchantment.EnchantmentArrowKnockback net.minecraft.enchantment.EnchantmentDamage net.minecraft.enchantment.EnchantmentDigging net.minecraft.enchantment.EnchantmentDurability net.minecraft.enchantment.EnchantmentFireAspect net.minecraft.enchantment.EnchantmentKnockback net.minecraft.enchantment.EnchantmentLootBonus net.minecraft.enchantment.EnchantmentOxygen net.minecraft.enchantment.EnchantmentProtection net.minecraft.enchantment.EnchantmentThorns net.minecraft.enchantment.EnchantmentUntouching net.minecraft.enchantment.EnchantmentWaterWorker

Public Member Functions

int getWeight ()
 
int getMinLevel ()
 
int getMaxLevel ()
 
int getMinEnchantability (int par1)
 
int getMaxEnchantability (int par1)
 
int calcModifierDamage (int par1, DamageSource par2DamageSource)
 
int calcModifierLiving (int par1, EntityLiving par2EntityLiving)
 
boolean canApplyTogether (Enchantment par1Enchantment)
 
Enchantment setName (String par1Str)
 
String getName ()
 
String getTranslatedName (int par1)
 
boolean canApply (ItemStack par1ItemStack)
 
boolean canApplyAtEnchantingTable (ItemStack stack)
 

Static Public Member Functions

static void addToBookList (Enchantment enchantment)
 

Public Attributes

final int effectId
 
EnumEnchantmentType type
 

Static Public Attributes

static final Enchantment[] enchantmentsList = new Enchantment[256]
 
static final Enchantment[] field_92090_c
 
static final Enchantment protection = new EnchantmentProtection(0, 10, 0)
 
static final Enchantment fireProtection = new EnchantmentProtection(1, 5, 1)
 
static final Enchantment featherFalling = new EnchantmentProtection(2, 5, 2)
 
static final Enchantment blastProtection = new EnchantmentProtection(3, 2, 3)
 
static final Enchantment projectileProtection = new EnchantmentProtection(4, 5, 4)
 
static final Enchantment respiration = new EnchantmentOxygen(5, 2)
 
static final Enchantment aquaAffinity = new EnchantmentWaterWorker(6, 2)
 
static final Enchantment thorns = new EnchantmentThorns(7, 1)
 
static final Enchantment sharpness = new EnchantmentDamage(16, 10, 0)
 
static final Enchantment smite = new EnchantmentDamage(17, 5, 1)
 
static final Enchantment baneOfArthropods = new EnchantmentDamage(18, 5, 2)
 
static final Enchantment knockback = new EnchantmentKnockback(19, 5)
 
static final Enchantment fireAspect = new EnchantmentFireAspect(20, 2)
 
static final Enchantment looting = new EnchantmentLootBonus(21, 2, EnumEnchantmentType.weapon)
 
static final Enchantment efficiency = new EnchantmentDigging(32, 10)
 
static final Enchantment silkTouch = new EnchantmentUntouching(33, 1)
 
static final Enchantment unbreaking = new EnchantmentDurability(34, 5)
 
static final Enchantment fortune = new EnchantmentLootBonus(35, 2, EnumEnchantmentType.digger)
 
static final Enchantment power = new EnchantmentArrowDamage(48, 10)
 
static final Enchantment punch = new EnchantmentArrowKnockback(49, 2)
 
static final Enchantment flame = new EnchantmentArrowFire(50, 2)
 
static final Enchantment infinity = new EnchantmentArrowInfinite(51, 1)
 

Protected Member Functions

 Enchantment (int par1, int par2, EnumEnchantmentType par3EnumEnchantmentType)
 

Protected Attributes

String name
 

Constructor & Destructor Documentation

net.minecraft.enchantment.Enchantment.Enchantment ( int  par1,
int  par2,
EnumEnchantmentType  par3EnumEnchantmentType 
)
protected

Member Function Documentation

static void net.minecraft.enchantment.Enchantment.addToBookList ( Enchantment  enchantment)
static

Add to the list of enchantments applicable by the anvil from a book

Parameters
enchantment
int net.minecraft.enchantment.Enchantment.calcModifierDamage ( int  par1,
DamageSource  par2DamageSource 
)

Calculates de damage protection of the enchantment based on level and damage source passed.

int net.minecraft.enchantment.Enchantment.calcModifierLiving ( int  par1,
EntityLiving  par2EntityLiving 
)

Calculates de (magic) damage done by the enchantment on a living entity based on level and entity passed.

boolean net.minecraft.enchantment.Enchantment.canApply ( ItemStack  par1ItemStack)
boolean net.minecraft.enchantment.Enchantment.canApplyAtEnchantingTable ( ItemStack  stack)

This applies specifically to applying at the enchanting table. The other method func_92037_a(ItemStack) applies for all possible enchantments.

Parameters
stack
Returns
boolean net.minecraft.enchantment.Enchantment.canApplyTogether ( Enchantment  par1Enchantment)

Determines if the enchantment passed can be applyied together with this enchantment.

int net.minecraft.enchantment.Enchantment.getMaxEnchantability ( int  par1)

Returns the maximum value of enchantability nedded on the enchantment level passed.

int net.minecraft.enchantment.Enchantment.getMaxLevel ( )

Returns the maximum level that the enchantment can have.

int net.minecraft.enchantment.Enchantment.getMinEnchantability ( int  par1)

Returns the minimal value of enchantability needed on the enchantment level passed.

int net.minecraft.enchantment.Enchantment.getMinLevel ( )

Returns the minimum level that the enchantment can have.

String net.minecraft.enchantment.Enchantment.getName ( )

Return the name of key in translation table of this enchantment.

String net.minecraft.enchantment.Enchantment.getTranslatedName ( int  par1)

Returns the correct traslated name of the enchantment and the level in roman numbers.

int net.minecraft.enchantment.Enchantment.getWeight ( )
Enchantment net.minecraft.enchantment.Enchantment.setName ( String  par1Str)

Sets the enchantment name

Member Data Documentation

final Enchantment net.minecraft.enchantment.Enchantment.aquaAffinity = new EnchantmentWaterWorker(6, 2)
static

Increases underwater mining rate

final Enchantment net.minecraft.enchantment.Enchantment.baneOfArthropods = new EnchantmentDamage(18, 5, 2)
static

Extra damage to spiders, cave spiders and silverfish

final Enchantment net.minecraft.enchantment.Enchantment.blastProtection = new EnchantmentProtection(3, 2, 3)
static

Protection against explosions

final int net.minecraft.enchantment.Enchantment.effectId
final Enchantment net.minecraft.enchantment.Enchantment.efficiency = new EnchantmentDigging(32, 10)
static

Faster resource gathering while in use

final Enchantment [] net.minecraft.enchantment.Enchantment.enchantmentsList = new Enchantment[256]
static
final Enchantment net.minecraft.enchantment.Enchantment.featherFalling = new EnchantmentProtection(2, 5, 2)
static

Less fall damage

final Enchantment [] net.minecraft.enchantment.Enchantment.field_92090_c
static
final Enchantment net.minecraft.enchantment.Enchantment.fireAspect = new EnchantmentFireAspect(20, 2)
static

Lights mobs on fire

final Enchantment net.minecraft.enchantment.Enchantment.fireProtection = new EnchantmentProtection(1, 5, 1)
static

Protection against fire

final Enchantment net.minecraft.enchantment.Enchantment.flame = new EnchantmentArrowFire(50, 2)
static

Flame enchantment for bows. Arrows fired by the bow will be on fire. Any target hit will also set on fire.

final Enchantment net.minecraft.enchantment.Enchantment.fortune = new EnchantmentLootBonus(35, 2, EnumEnchantmentType.digger)
static

Can multiply the drop rate of items from blocks

final Enchantment net.minecraft.enchantment.Enchantment.infinity = new EnchantmentArrowInfinite(51, 1)
static

Infinity enchantment for bows. The bow will not consume arrows anymore, but will still required at least one arrow on inventory use the bow.

final Enchantment net.minecraft.enchantment.Enchantment.knockback = new EnchantmentKnockback(19, 5)
static

Knocks mob and players backwards upon hit

final Enchantment net.minecraft.enchantment.Enchantment.looting = new EnchantmentLootBonus(21, 2, EnumEnchantmentType.weapon)
static

Mobs have a chance to drop more loot

String net.minecraft.enchantment.Enchantment.name
protected

Used in localisation and stats.

final Enchantment net.minecraft.enchantment.Enchantment.power = new EnchantmentArrowDamage(48, 10)
static

Power enchantment for bows, add's extra damage to arrows.

final Enchantment net.minecraft.enchantment.Enchantment.projectileProtection = new EnchantmentProtection(4, 5, 4)
static

Protection against projectile entities (e.g. arrows)

final Enchantment net.minecraft.enchantment.Enchantment.protection = new EnchantmentProtection(0, 10, 0)
static

Converts environmental damage to armour damage

final Enchantment net.minecraft.enchantment.Enchantment.punch = new EnchantmentArrowKnockback(49, 2)
static

Knockback enchantments for bows, the arrows will knockback the target when hit.

final Enchantment net.minecraft.enchantment.Enchantment.respiration = new EnchantmentOxygen(5, 2)
static

Decreases the rate of air loss underwater; increases time between damage while suffocating

final Enchantment net.minecraft.enchantment.Enchantment.sharpness = new EnchantmentDamage(16, 10, 0)
static

Extra damage to mobs

final Enchantment net.minecraft.enchantment.Enchantment.silkTouch = new EnchantmentUntouching(33, 1)
static

Blocks mined will drop themselves, even if it should drop something else (e.g. stone will drop stone, not cobblestone)

final Enchantment net.minecraft.enchantment.Enchantment.smite = new EnchantmentDamage(17, 5, 1)
static

Extra damage to zombies, zombie pigmen and skeletons

final Enchantment net.minecraft.enchantment.Enchantment.thorns = new EnchantmentThorns(7, 1)
static
EnumEnchantmentType net.minecraft.enchantment.Enchantment.type

The EnumEnchantmentType given to this Enchantment.

final Enchantment net.minecraft.enchantment.Enchantment.unbreaking = new EnchantmentDurability(34, 5)
static

Sometimes, the tool's durability will not be spent when the tool is used


The documentation for this class was generated from the following file: