Class ProtectionEnchantment

java.lang.Object
net.minecraft.enchantment.Enchantment
net.minecraft.enchantment.ProtectionEnchantment
All Implemented Interfaces:
ToggleableFeature

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

    • protectionType

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

    • ProtectionEnchantment

      public ProtectionEnchantment(Enchantment.Properties properties, ProtectionEnchantment.Type protectionType)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/enchantment/ProtectionEnchantment;<init>(Lnet/minecraft/enchantment/Enchantment$Properties;Lnet/minecraft/enchantment/ProtectionEnchantment$Type;)V
      intermediary <init> Lnet/minecraft/class_1900;<init>(Lnet/minecraft/class_1887$class_9427;Lnet/minecraft/class_1900$class_1901;)V
      official <init> Ldal;<init>(Ldac$b;Ldal$a;)V
  • Method Details

    • getProtectionAmount

      public int getProtectionAmount(int level, DamageSource source)
      Overrides:
      getProtectionAmount in class Enchantment
      Mappings:
      Namespace Name Mixin selector
      named getProtectionAmount Lnet/minecraft/enchantment/Enchantment;getProtectionAmount(ILnet/minecraft/entity/damage/DamageSource;)I
      intermediary method_8181 Lnet/minecraft/class_1887;method_8181(ILnet/minecraft/class_1282;)I
      official a Ldac;a(ILbrp;)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
      named canAccept Lnet/minecraft/enchantment/Enchantment;canAccept(Lnet/minecraft/enchantment/Enchantment;)Z
      intermediary method_8180 Lnet/minecraft/class_1887;method_8180(Lnet/minecraft/class_1887;)Z
      official a Ldac;a(Ldac;)Z
    • transformFireDuration

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

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