Class MooshroomEntity

All Implemented Interfaces:
Shearable, CommandOutput, Nameable, EntityLike

public class MooshroomEntity extends CowEntity implements Shearable
Mappings:
Namespace Name
official bnr
intermediary net/minecraft/class_1438
named net/minecraft/entity/passive/MooshroomEntity
  • Field Details

    • TYPE

      private static final TrackedData<String> TYPE
      Mappings:
      Namespace Name Mixin selector
      official bX Lbnr;bX:Laaj;
      intermediary field_18105 Lnet/minecraft/class_1438;field_18105:Lnet/minecraft/class_2940;
      named TYPE Lnet/minecraft/entity/passive/MooshroomEntity;TYPE:Lnet/minecraft/entity/data/TrackedData;
    • MUTATION_CHANCE

      private static final int MUTATION_CHANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official bY Lbnr;bY:I
      intermediary field_30339 Lnet/minecraft/class_1438;field_30339:I
      named MUTATION_CHANCE Lnet/minecraft/entity/passive/MooshroomEntity;MUTATION_CHANCE:I
    • stewEffect

      @Nullable private @Nullable StatusEffect stewEffect
      Mappings:
      Namespace Name Mixin selector
      official ca Lbnr;ca:Lbbe;
      intermediary field_18106 Lnet/minecraft/class_1438;field_18106:Lnet/minecraft/class_1291;
      named stewEffect Lnet/minecraft/entity/passive/MooshroomEntity;stewEffect:Lnet/minecraft/entity/effect/StatusEffect;
    • stewEffectDuration

      private int stewEffectDuration
      Mappings:
      Namespace Name Mixin selector
      official cb Lbnr;cb:I
      intermediary field_18107 Lnet/minecraft/class_1438;field_18107:I
      named stewEffectDuration Lnet/minecraft/entity/passive/MooshroomEntity;stewEffectDuration:I
    • lightningId

      @Nullable private @Nullable UUID lightningId
      Mappings:
      Namespace Name Mixin selector
      official cc Lbnr;cc:Ljava/util/UUID;
      intermediary field_18108 Lnet/minecraft/class_1438;field_18108:Ljava/util/UUID;
      named lightningId Lnet/minecraft/entity/passive/MooshroomEntity;lightningId:Ljava/util/UUID;
  • Constructor Details

    • MooshroomEntity

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

    • getPathfindingFavor

      public float getPathfindingFavor(BlockPos pos, WorldView world)
      Overrides:
      getPathfindingFavor in class AnimalEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lbcl;a(Lgt;Lcha;)F
      intermediary method_6144 Lnet/minecraft/class_1314;method_6144(Lnet/minecraft/class_2338;Lnet/minecraft/class_4538;)F
      named getPathfindingFavor Lnet/minecraft/entity/mob/PathAwareEntity;getPathfindingFavor(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/WorldView;)F
    • canSpawn

      public static boolean canSpawn(EntityType<MooshroomEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      official c Lbnr;c(Lbbr;Lcgy;Lbcg;Lgt;Lamn;)Z
      intermediary method_20665 Lnet/minecraft/class_1438;method_20665(Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      named canSpawn Lnet/minecraft/entity/passive/MooshroomEntity;canSpawn(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
    • onStruckByLightning

      public void onStruckByLightning(ServerWorld world, LightningEntity lightning)
      Called when the entity is struck by lightning. This sets the entity on fire and deals lightning damage by default; entities that do not take such damage should override this method to do nothing.
      Overrides:
      onStruckByLightning in class Entity
      Mappings:
      Namespace Name Mixin selector
      official a Lbbn;a(Lagg;Lbcb;)V
      intermediary method_5800 Lnet/minecraft/class_1297;method_5800(Lnet/minecraft/class_3218;Lnet/minecraft/class_1538;)V
      named onStruckByLightning Lnet/minecraft/entity/Entity;onStruckByLightning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LightningEntity;)V
    • initDataTracker

      protected void initDataTracker()
      Initializes data tracker.
      Overrides:
      initDataTracker in class PassiveEntity
      Mappings:
      Namespace Name Mixin selector
      official a_ Lbbn;a_()V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693()V
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker()V
    • interactMob

      public ActionResult interactMob(PlayerEntity player, Hand hand)
      Overrides:
      interactMob in class CowEntity
      Mappings:
      Namespace Name Mixin selector
      official b Lbce;b(Lbuc;Lbai;)Lbaj;
      intermediary method_5992 Lnet/minecraft/class_1308;method_5992(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      named interactMob Lnet/minecraft/entity/mob/MobEntity;interactMob(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
    • sheared

      public void sheared(SoundCategory shearedSoundCategory)
      Specified by:
      sheared in interface Shearable
      Mappings:
      Namespace Name Mixin selector
      official a Lbcs;a(Lajx;)V
      intermediary method_6636 Lnet/minecraft/class_5147;method_6636(Lnet/minecraft/class_3419;)V
      named sheared Lnet/minecraft/entity/Shearable;sheared(Lnet/minecraft/sound/SoundCategory;)V
    • isShearable

      public boolean isShearable()
      Specified by:
      isShearable in interface Shearable
      Mappings:
      Namespace Name Mixin selector
      official a Lbcs;a()Z
      intermediary method_27072 Lnet/minecraft/class_5147;method_27072()Z
      named isShearable Lnet/minecraft/entity/Shearable;isShearable()Z
    • writeCustomDataToNbt

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses has 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.

      Overrides:
      writeCustomDataToNbt in class AnimalEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lbbn;b(Lpj;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses has 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.

      Overrides:
      readCustomDataFromNbt in class AnimalEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbbn;a(Lpj;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • getStewEffectFrom

      private Optional<Pair<StatusEffect,Integer>> getStewEffectFrom(ItemStack flower)
      Mappings:
      Namespace Name Mixin selector
      official m Lbnr;m(Lcax;)Ljava/util/Optional;
      intermediary method_18436 Lnet/minecraft/class_1438;method_18436(Lnet/minecraft/class_1799;)Ljava/util/Optional;
      named getStewEffectFrom Lnet/minecraft/entity/passive/MooshroomEntity;getStewEffectFrom(Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
    • setType

      private void setType(MooshroomEntity.Type type)
      Mappings:
      Namespace Name Mixin selector
      official a Lbnr;a(Lbnr$a;)V
      intermediary method_18433 Lnet/minecraft/class_1438;method_18433(Lnet/minecraft/class_1438$class_4053;)V
      named setType Lnet/minecraft/entity/passive/MooshroomEntity;setType(Lnet/minecraft/entity/passive/MooshroomEntity$Type;)V
    • getMooshroomType

      public MooshroomEntity.Type getMooshroomType()
      Mappings:
      Namespace Name Mixin selector
      official t Lbnr;t()Lbnr$a;
      intermediary method_18435 Lnet/minecraft/class_1438;method_18435()Lnet/minecraft/class_1438$class_4053;
      named getMooshroomType Lnet/minecraft/entity/passive/MooshroomEntity;getMooshroomType()Lnet/minecraft/entity/passive/MooshroomEntity$Type;
    • createChild

      public MooshroomEntity createChild(ServerWorld serverWorld, PassiveEntity passiveEntity)
      Overrides:
      createChild in class CowEntity
      Mappings:
      Namespace Name Mixin selector
      official c Lbnr;c(Lagg;Lbbk;)Lbnr;
      intermediary method_6495 Lnet/minecraft/class_1438;method_6495(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;)Lnet/minecraft/class_1438;
      named createChild Lnet/minecraft/entity/passive/MooshroomEntity;createChild(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;)Lnet/minecraft/entity/passive/MooshroomEntity;
    • chooseBabyType

      private MooshroomEntity.Type chooseBabyType(MooshroomEntity mooshroom)
      Mappings:
      Namespace Name Mixin selector
      official a Lbnr;a(Lbnr;)Lbnr$a;
      intermediary method_18434 Lnet/minecraft/class_1438;method_18434(Lnet/minecraft/class_1438;)Lnet/minecraft/class_1438$class_4053;
      named chooseBabyType Lnet/minecraft/entity/passive/MooshroomEntity;chooseBabyType(Lnet/minecraft/entity/passive/MooshroomEntity;)Lnet/minecraft/entity/passive/MooshroomEntity$Type;