Class DamageSource

java.lang.Object
net.minecraft.entity.damage.DamageSource

public class DamageSource extends Object
Mappings:
Namespace Name
named net/minecraft/entity/damage/DamageSource
intermediary net/minecraft/class_1282
official brk
  • Field Details

    • type

      private final RegistryEntry<DamageType> type
      Mappings:
      Namespace Name Mixin selector
      named type Lnet/minecraft/entity/damage/DamageSource;type:Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary field_42291 Lnet/minecraft/class_1282;field_42291:Lnet/minecraft/class_6880;
      official a Lbrk;a:Ljm;
    • attacker

      @Nullable private final @Nullable Entity attacker
      Mappings:
      Namespace Name Mixin selector
      named attacker Lnet/minecraft/entity/damage/DamageSource;attacker:Lnet/minecraft/entity/Entity;
      intermediary field_42292 Lnet/minecraft/class_1282;field_42292:Lnet/minecraft/class_1297;
      official b Lbrk;b:Lbsr;
    • source

      @Nullable private final @Nullable Entity source
      Mappings:
      Namespace Name Mixin selector
      named source Lnet/minecraft/entity/damage/DamageSource;source:Lnet/minecraft/entity/Entity;
      intermediary field_42293 Lnet/minecraft/class_1282;field_42293:Lnet/minecraft/class_1297;
      official c Lbrk;c:Lbsr;
    • position

      @Nullable private final @Nullable Vec3d position
      Mappings:
      Namespace Name Mixin selector
      named position Lnet/minecraft/entity/damage/DamageSource;position:Lnet/minecraft/util/math/Vec3d;
      intermediary field_42294 Lnet/minecraft/class_1282;field_42294:Lnet/minecraft/class_243;
      official d Lbrk;d:Lexc;
  • Constructor Details

    • DamageSource

      private DamageSource(RegistryEntry<DamageType> type, @Nullable @Nullable Entity source, @Nullable @Nullable Entity attacker, @Nullable @Nullable Vec3d position)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/damage/DamageSource;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)V
      intermediary <init> Lnet/minecraft/class_1282;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_1297;Lnet/minecraft/class_1297;Lnet/minecraft/class_243;)V
      official <init> Lbrk;<init>(Ljm;Lbsr;Lbsr;Lexc;)V
    • DamageSource

      public DamageSource(RegistryEntry<DamageType> type, @Nullable @Nullable Entity source, @Nullable @Nullable Entity attacker)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/damage/DamageSource;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/Entity;)V
      intermediary <init> Lnet/minecraft/class_1282;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_1297;Lnet/minecraft/class_1297;)V
      official <init> Lbrk;<init>(Ljm;Lbsr;Lbsr;)V
    • DamageSource

      public DamageSource(RegistryEntry<DamageType> type, Vec3d position)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/damage/DamageSource;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/util/math/Vec3d;)V
      intermediary <init> Lnet/minecraft/class_1282;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_243;)V
      official <init> Lbrk;<init>(Ljm;Lexc;)V
    • DamageSource

      public DamageSource(RegistryEntry<DamageType> type, @Nullable @Nullable Entity attacker)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/damage/DamageSource;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/Entity;)V
      intermediary <init> Lnet/minecraft/class_1282;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_1297;)V
      official <init> Lbrk;<init>(Ljm;Lbsr;)V
    • DamageSource

      public DamageSource(RegistryEntry<DamageType> type)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/damage/DamageSource;<init>(Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary <init> Lnet/minecraft/class_1282;<init>(Lnet/minecraft/class_6880;)V
      official <init> Lbrk;<init>(Ljm;)V
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getExhaustion

      public float getExhaustion()
      Mappings:
      Namespace Name Mixin selector
      named getExhaustion Lnet/minecraft/entity/damage/DamageSource;getExhaustion()F
      intermediary method_5528 Lnet/minecraft/class_1282;method_5528()F
      official a Lbrk;a()F
    • isDirect

      public boolean isDirect()
      Mappings:
      Namespace Name Mixin selector
      named isDirect Lnet/minecraft/entity/damage/DamageSource;isDirect()Z
      intermediary method_60489 Lnet/minecraft/class_1282;method_60489()Z
      official b Lbrk;b()Z
    • getSource

      @Nullable public @Nullable Entity getSource()
      Mappings:
      Namespace Name Mixin selector
      named getSource Lnet/minecraft/entity/damage/DamageSource;getSource()Lnet/minecraft/entity/Entity;
      intermediary method_5526 Lnet/minecraft/class_1282;method_5526()Lnet/minecraft/class_1297;
      official c Lbrk;c()Lbsr;
    • getAttacker

      @Nullable public @Nullable Entity getAttacker()
      Mappings:
      Namespace Name Mixin selector
      named getAttacker Lnet/minecraft/entity/damage/DamageSource;getAttacker()Lnet/minecraft/entity/Entity;
      intermediary method_5529 Lnet/minecraft/class_1282;method_5529()Lnet/minecraft/class_1297;
      official d Lbrk;d()Lbsr;
    • getWeaponStack

      @Nullable public @Nullable ItemStack getWeaponStack()
      Mappings:
      Namespace Name Mixin selector
      named getWeaponStack Lnet/minecraft/entity/damage/DamageSource;getWeaponStack()Lnet/minecraft/item/ItemStack;
      intermediary method_60948 Lnet/minecraft/class_1282;method_60948()Lnet/minecraft/class_1799;
      official e Lbrk;e()Lcuq;
    • getDeathMessage

      public Text getDeathMessage(LivingEntity killed)
      Mappings:
      Namespace Name Mixin selector
      named getDeathMessage Lnet/minecraft/entity/damage/DamageSource;getDeathMessage(Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/text/Text;
      intermediary method_5506 Lnet/minecraft/class_1282;method_5506(Lnet/minecraft/class_1309;)Lnet/minecraft/class_2561;
      official a Lbrk;a(Lbtn;)Lwz;
    • getName

      public String getName()
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/entity/damage/DamageSource;getName()Ljava/lang/String;
      intermediary method_5525 Lnet/minecraft/class_1282;method_5525()Ljava/lang/String;
      official f Lbrk;f()Ljava/lang/String;
    • isScaledWithDifficulty

      public boolean isScaledWithDifficulty()
      Mappings:
      Namespace Name Mixin selector
      named isScaledWithDifficulty Lnet/minecraft/entity/damage/DamageSource;isScaledWithDifficulty()Z
      intermediary method_5514 Lnet/minecraft/class_1282;method_5514()Z
      official g Lbrk;g()Z
    • isSourceCreativePlayer

      public boolean isSourceCreativePlayer()
      Mappings:
      Namespace Name Mixin selector
      named isSourceCreativePlayer Lnet/minecraft/entity/damage/DamageSource;isSourceCreativePlayer()Z
      intermediary method_5530 Lnet/minecraft/class_1282;method_5530()Z
      official h Lbrk;h()Z
    • getPosition

      @Nullable public @Nullable Vec3d getPosition()
      Mappings:
      Namespace Name Mixin selector
      named getPosition Lnet/minecraft/entity/damage/DamageSource;getPosition()Lnet/minecraft/util/math/Vec3d;
      intermediary method_5510 Lnet/minecraft/class_1282;method_5510()Lnet/minecraft/class_243;
      official i Lbrk;i()Lexc;
    • getStoredPosition

      @Nullable public @Nullable Vec3d getStoredPosition()
      Mappings:
      Namespace Name Mixin selector
      named getStoredPosition Lnet/minecraft/entity/damage/DamageSource;getStoredPosition()Lnet/minecraft/util/math/Vec3d;
      intermediary method_48791 Lnet/minecraft/class_1282;method_48791()Lnet/minecraft/class_243;
      official j Lbrk;j()Lexc;
    • isIn

      public boolean isIn(TagKey<DamageType> tag)
      Mappings:
      Namespace Name Mixin selector
      named isIn Lnet/minecraft/entity/damage/DamageSource;isIn(Lnet/minecraft/registry/tag/TagKey;)Z
      intermediary method_48789 Lnet/minecraft/class_1282;method_48789(Lnet/minecraft/class_6862;)Z
      official a Lbrk;a(Lawu;)Z
    • isOf

      public boolean isOf(RegistryKey<DamageType> typeKey)
      Mappings:
      Namespace Name Mixin selector
      named isOf Lnet/minecraft/entity/damage/DamageSource;isOf(Lnet/minecraft/registry/RegistryKey;)Z
      intermediary method_49708 Lnet/minecraft/class_1282;method_49708(Lnet/minecraft/class_5321;)Z
      official a Lbrk;a(Lakq;)Z
    • getType

      public DamageType getType()
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/entity/damage/DamageSource;getType()Lnet/minecraft/entity/damage/DamageType;
      intermediary method_48792 Lnet/minecraft/class_1282;method_48792()Lnet/minecraft/class_8110;
      official k Lbrk;k()Lbrm;
    • getTypeRegistryEntry

      public RegistryEntry<DamageType> getTypeRegistryEntry()
      Mappings:
      Namespace Name Mixin selector
      named getTypeRegistryEntry Lnet/minecraft/entity/damage/DamageSource;getTypeRegistryEntry()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_48793 Lnet/minecraft/class_1282;method_48793()Lnet/minecraft/class_6880;
      official l Lbrk;l()Ljm;