Class ProtectionEnchantment

java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment

public class ProtectionEnchantment extends Enchantment
Mappings:
Namespace Name
official ceh
intermediary net/minecraft/class_1900
named net/minecraft/enchantment/ProtectionEnchantment
  • Field Details

    • protectionType

      public final ProtectionEnchantment.Type protectionType
      Mappings:
      Namespace Name Mixin selector
      official a Lceh;a:Lceh$a;
      intermediary field_9133 Lnet/minecraft/class_1900;field_9133:Lnet/minecraft/class_1900$class_1901;
      named protectionType Lnet/minecraft/enchantment/ProtectionEnchantment;protectionType:Lnet/minecraft/enchantment/ProtectionEnchantment$Type;
  • Constructor Details

    • ProtectionEnchantment

      public ProtectionEnchantment(Enchantment.Rarity weight, ProtectionEnchantment.Type protectionType, EquipmentSlot[] slotTypes)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lceh;<init>(Lcdu$a;Lceh$a;[Lbav;)V
      intermediary <init> Lnet/minecraft/class_1900;<init>(Lnet/minecraft/class_1887$class_1888;Lnet/minecraft/class_1900$class_1901;[Lnet/minecraft/class_1304;)V
      named <init> Lnet/minecraft/enchantment/ProtectionEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Rarity;Lnet/minecraft/enchantment/ProtectionEnchantment$Type;[Lnet/minecraft/entity/EquipmentSlot;)V
  • Method Details

    • getMinPower

      public int getMinPower(int level)
      Overrides:
      getMinPower in class Enchantment
      Mappings:
      Namespace Name Mixin selector
      official a Lcdu;a(I)I
      intermediary method_8182 Lnet/minecraft/class_1887;method_8182(I)I
      named getMinPower Lnet/minecraft/enchantment/Enchantment;getMinPower(I)I
    • getMaxPower

      public int getMaxPower(int level)
      Overrides:
      getMaxPower in class Enchantment
      Mappings:
      Namespace Name Mixin selector
      official b Lcdu;b(I)I
      intermediary method_20742 Lnet/minecraft/class_1887;method_20742(I)I
      named getMaxPower Lnet/minecraft/enchantment/Enchantment;getMaxPower(I)I
    • getMaxLevel

      public int getMaxLevel()
      Overrides:
      getMaxLevel in class Enchantment
      Mappings:
      Namespace Name Mixin selector
      official a Lcdu;a()I
      intermediary method_8183 Lnet/minecraft/class_1887;method_8183()I
      named getMaxLevel Lnet/minecraft/enchantment/Enchantment;getMaxLevel()I
    • getProtectionAmount

      public int getProtectionAmount(int level, DamageSource source)
      Overrides:
      getProtectionAmount in class Enchantment
      Mappings:
      Namespace Name Mixin selector
      official a Lcdu;a(ILazz;)I
      intermediary method_8181 Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)I
      named getProtectionAmount Lnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
    • canAccept

      public boolean canAccept(Enchantment other)
      Returns whether this enchantment can exist on an item stack with the other enchantment.
      Overrides:
      canAccept in class Enchantment
      Returns:
      whether this enchantment can exist on an item stack with the other enchantment
      Mappings:
      Namespace Name Mixin selector
      official a Lcdu;a(Lcdu;)Z
      intermediary method_8180 Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Z
      named canAccept Lnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
    • transformFireDuration

      public static int transformFireDuration(LivingEntity entity, int duration)
      Mappings:
      Namespace Name Mixin selector
      official a Lceh;a(Lbbf;I)I
      intermediary method_8238 Lnet/minecraft/class_1900;method_8238(Lnet/minecraft/class_1309;I)I
      named transformFireDuration Lnet/minecraft/enchantment/ProtectionEnchantment;transformFireDuration(Lnet/minecraft/entity/LivingEntity;I)I
    • transformExplosionKnockback

      public static double transformExplosionKnockback(LivingEntity entity, double velocity)
      Mappings:
      Namespace Name Mixin selector
      official a Lceh;a(Lbbf;D)D
      intermediary method_8237 Lnet/minecraft/class_1900;method_8237(Lnet/minecraft/class_1309;D)D
      named transformExplosionKnockback Lnet/minecraft/enchantment/ProtectionEnchantment;transformExplosionKnockback(Lnet/minecraft/entity/LivingEntity;D)D