Class LightningEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.LightningEntity
All Implemented Interfaces:
DataTracked, ScoreHolder, CommandOutput, Nameable, EntityLike

public class LightningEntity extends Entity
Mappings:
Namespace Name
named net/minecraft/entity/LightningEntity
intermediary net/minecraft/class_1538
official btq
  • Field Details

    • field_30062

      private static final int field_30062
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_30062 Lnet/minecraft/entity/LightningEntity;field_30062:I
      intermediary field_30062 Lnet/minecraft/class_1538;field_30062:I
      official c Lbtq;c:I
    • field_33906

      private static final double field_33906
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33906 Lnet/minecraft/entity/LightningEntity;field_33906:D
      intermediary field_33906 Lnet/minecraft/class_1538;field_33906:D
      official d Lbtq;d:D
    • field_33907

      private static final double field_33907
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33907 Lnet/minecraft/entity/LightningEntity;field_33907:D
      intermediary field_33907 Lnet/minecraft/class_1538;field_33907:D
      official e Lbtq;e:D
    • ambientTick

      private int ambientTick
      Mappings:
      Namespace Name Mixin selector
      named ambientTick Lnet/minecraft/entity/LightningEntity;ambientTick:I
      intermediary field_7185 Lnet/minecraft/class_1538;field_7185:I
      official f Lbtq;f:I
    • seed

      public long seed
      Mappings:
      Namespace Name Mixin selector
      named seed Lnet/minecraft/entity/LightningEntity;seed:J
      intermediary field_7186 Lnet/minecraft/class_1538;field_7186:J
      official b Lbtq;b:J
    • remainingActions

      private int remainingActions
      Mappings:
      Namespace Name Mixin selector
      named remainingActions Lnet/minecraft/entity/LightningEntity;remainingActions:I
      intermediary field_7183 Lnet/minecraft/class_1538;field_7183:I
      official g Lbtq;g:I
    • cosmetic

      private boolean cosmetic
      Mappings:
      Namespace Name Mixin selector
      named cosmetic Lnet/minecraft/entity/LightningEntity;cosmetic:Z
      intermediary field_7184 Lnet/minecraft/class_1538;field_7184:Z
      official h Lbtq;h:Z
    • channeler

      Mappings:
      Namespace Name Mixin selector
      named channeler Lnet/minecraft/entity/LightningEntity;channeler:Lnet/minecraft/server/network/ServerPlayerEntity;
      intermediary field_7182 Lnet/minecraft/class_1538;field_7182:Lnet/minecraft/class_3222;
      official i Lbtq;i:Larg;
    • struckEntities

      private final Set<Entity> struckEntities
      Mappings:
      Namespace Name Mixin selector
      named struckEntities Lnet/minecraft/entity/LightningEntity;struckEntities:Ljava/util/Set;
      intermediary field_33904 Lnet/minecraft/class_1538;field_33904:Ljava/util/Set;
      official j Lbtq;j:Ljava/util/Set;
    • blocksSetOnFire

      private int blocksSetOnFire
      Mappings:
      Namespace Name Mixin selector
      named blocksSetOnFire Lnet/minecraft/entity/LightningEntity;blocksSetOnFire:I
      intermediary field_33905 Lnet/minecraft/class_1538;field_33905:I
      official k Lbtq;k:I
  • Constructor Details

    • LightningEntity

      public LightningEntity(EntityType<? extends LightningEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      official <init> Lbsw;<init>(Lbtc;Ldca;)V
  • Method Details

    • setCosmetic

      public void setCosmetic(boolean cosmetic)
      Mappings:
      Namespace Name Mixin selector
      named setCosmetic Lnet/minecraft/entity/LightningEntity;setCosmetic(Z)V
      intermediary method_29498 Lnet/minecraft/class_1538;method_29498(Z)V
      official a Lbtq;a(Z)V
    • getSoundCategory

      public SoundCategory getSoundCategory()
      Returns the sound category for sounds from this entity.

      This is used by Entity.playSound(SoundEvent, float, float) and defaults to SoundCategory.NEUTRAL. Hostile entities should override this to return SoundCategory.HOSTILE.

      Overrides:
      getSoundCategory in class Entity
      Returns:
      the sound category for sounds from this entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getSoundCategory Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
      intermediary method_5634 Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
      official de Lbsw;de()Lawb;
    • getChanneler

      @Nullable public @Nullable ServerPlayerEntity getChanneler()
      Mappings:
      Namespace Name Mixin selector
      named getChanneler Lnet/minecraft/entity/LightningEntity;getChanneler()Lnet/minecraft/server/network/ServerPlayerEntity;
      intermediary method_35052 Lnet/minecraft/class_1538;method_35052()Lnet/minecraft/class_3222;
      official p Lbtq;p()Larg;
    • setChanneler

      public void setChanneler(@Nullable @Nullable ServerPlayerEntity channeler)
      Mappings:
      Namespace Name Mixin selector
      named setChanneler Lnet/minecraft/entity/LightningEntity;setChanneler(Lnet/minecraft/server/network/ServerPlayerEntity;)V
      intermediary method_6961 Lnet/minecraft/class_1538;method_6961(Lnet/minecraft/class_3222;)V
      official b Lbtq;b(Larg;)V
    • powerLightningRod

      private void powerLightningRod()
      Mappings:
      Namespace Name Mixin selector
      named powerLightningRod Lnet/minecraft/entity/LightningEntity;powerLightningRod()V
      intermediary method_31499 Lnet/minecraft/class_1538;method_31499()V
      official v Lbtq;v()V
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class Entity
      See Also:
      API Note:
      This can be overridden to add additional logics. super.tick(); should be called in those cases.
      Implementation Note:
      By default, this delegates all logics to Entity.baseTick().
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/Entity;tick()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      official l Lbsw;l()V
    • getAffectedBlockPos

      private BlockPos getAffectedBlockPos()
      Mappings:
      Namespace Name Mixin selector
      named getAffectedBlockPos Lnet/minecraft/entity/LightningEntity;getAffectedBlockPos()Lnet/minecraft/util/math/BlockPos;
      intermediary method_36607 Lnet/minecraft/class_1538;method_36607()Lnet/minecraft/class_2338;
      official w Lbtq;w()Liz;
    • spawnFire

      private void spawnFire(int spreadAttempts)
      Mappings:
      Namespace Name Mixin selector
      named spawnFire Lnet/minecraft/entity/LightningEntity;spawnFire(I)V
      intermediary method_6960 Lnet/minecraft/class_1538;method_6960(I)V
      official b Lbtq;b(I)V
    • cleanOxidation

      private static void cleanOxidation(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named cleanOxidation Lnet/minecraft/entity/LightningEntity;cleanOxidation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
      intermediary method_34707 Lnet/minecraft/class_1538;method_34707(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
      official b Lbtq;b(Ldca;Liz;)V
    • cleanOxidationAround

      private static void cleanOxidationAround(World world, BlockPos pos, BlockPos.Mutable mutablePos, int count)
      Mappings:
      Namespace Name Mixin selector
      named cleanOxidationAround Lnet/minecraft/entity/LightningEntity;cleanOxidationAround(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos$Mutable;I)V
      intermediary method_34709 Lnet/minecraft/class_1538;method_34709(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338$class_2339;I)V
      official a Lbtq;a(Ldca;Liz;Liz$a;I)V
    • cleanOxidationAround

      private static Optional<BlockPos> cleanOxidationAround(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named cleanOxidationAround Lnet/minecraft/entity/LightningEntity;cleanOxidationAround(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/util/Optional;
      intermediary method_34710 Lnet/minecraft/class_1538;method_34710(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Ljava/util/Optional;
      official c Lbtq;c(Ldca;Liz;)Ljava/util/Optional;
    • shouldRender

      public boolean shouldRender(double distance)
      Overrides:
      shouldRender in class Entity
      Mappings:
      Namespace Name Mixin selector
      named shouldRender Lnet/minecraft/entity/Entity;shouldRender(D)Z
      intermediary method_5640 Lnet/minecraft/class_1297;method_5640(D)Z
      official a Lbsw;a(D)Z
    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      API Note:
      Subclasses should override this and add to the builder any data that needs to be tracked.
      Mappings:
      Namespace Name Mixin selector
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
      official a Lbsw;a(Lako$a;)V
    • readCustomDataFromNbt

      protected void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      Specified by:
      readCustomDataFromNbt in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      official a Lbsw;a(Lus;)V
    • writeCustomDataToNbt

      protected void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      Specified by:
      writeCustomDataToNbt in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      official b Lbsw;b(Lus;)V
    • getBlocksSetOnFire

      public int getBlocksSetOnFire()
      Mappings:
      Namespace Name Mixin selector
      named getBlocksSetOnFire Lnet/minecraft/entity/LightningEntity;getBlocksSetOnFire()I
      intermediary method_37220 Lnet/minecraft/class_1538;method_37220()I
      official s Lbtq;s()I
    • getStruckEntities

      public Stream<Entity> getStruckEntities()
      Mappings:
      Namespace Name Mixin selector
      named getStruckEntities Lnet/minecraft/entity/LightningEntity;getStruckEntities()Ljava/util/stream/Stream;
      intermediary method_37221 Lnet/minecraft/class_1538;method_37221()Ljava/util/stream/Stream;
      official u Lbtq;u()Ljava/util/stream/Stream;