Class MooshroomEntity

All Implemented Interfaces:
ComponentsAccess, Attackable, DataTracked, EquipmentHolder, Leashable, Shearable, Targeter, ScoreHolder, Nameable, EntityLike, UniquelyIdentifiable

public class MooshroomEntity extends AbstractCowEntity implements Shearable
Mappings:
Namespace Name
named net/minecraft/entity/passive/MooshroomEntity
intermediary net/minecraft/class_1438
official ckm
  • Field Details Link icon

    • VARIANT Link icon

      private static final TrackedData<Integer> VARIANT
      Mappings:
      Namespace Name Mixin selector
      named VARIANT Lnet/minecraft/entity/passive/MooshroomEntity;VARIANT:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_18105 Lnet/minecraft/class_1438;field_18105:Lnet/minecraft/class_2940;
      official bI Lckm;bI:Laku;
    • MUTATION_CHANCE Link icon

      private static final int MUTATION_CHANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MUTATION_CHANCE Lnet/minecraft/entity/passive/MooshroomEntity;MUTATION_CHANCE:I
      intermediary field_30339 Lnet/minecraft/class_1438;field_30339:I
      official bJ Lckm;bJ:I
    • STEW_EFFECTS_NBT_KEY Link icon

      private static final String STEW_EFFECTS_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named STEW_EFFECTS_NBT_KEY Lnet/minecraft/entity/passive/MooshroomEntity;STEW_EFFECTS_NBT_KEY:Ljava/lang/String;
      intermediary field_45751 Lnet/minecraft/class_1438;field_45751:Ljava/lang/String;
      official bK Lckm;bK:Ljava/lang/String;
    • stewEffects Link icon

      Mappings:
      Namespace Name Mixin selector
      named stewEffects Lnet/minecraft/entity/passive/MooshroomEntity;stewEffects:Lnet/minecraft/component/type/SuspiciousStewEffectsComponent;
      intermediary field_45752 Lnet/minecraft/class_1438;field_45752:Lnet/minecraft/class_9298;
      official bM Lckm;bM:Lddm;
    • lightningId Link icon

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

    • MooshroomEntity Link icon

      public MooshroomEntity(EntityType<? extends MooshroomEntity> 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> Lbxe;<init>(Lbxn;Ldkj;)V
  • Method Details Link icon

    • getPathfindingFavor Link icon

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

      public static boolean canSpawn(EntityType<MooshroomEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      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
      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
      official c Lckm;c(Lbxn;Ldkk;Lbxm;Liw;Lbai;)Z
    • onStruckByLightning Link icon

      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
      named onStruckByLightning Lnet/minecraft/entity/Entity;onStruckByLightning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LightningEntity;)V
      intermediary method_5800 Lnet/minecraft/class_1297;method_5800(Lnet/minecraft/class_3218;Lnet/minecraft/class_1538;)V
      official a Lbxe;a(Lasb;Lbye;)V
    • initDataTracker Link icon

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class PassiveEntity
      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 Lbxe;a(Laky$a;)V
    • interactMob Link icon

      public ActionResult interactMob(PlayerEntity player, Hand hand)
      Overrides:
      interactMob in class AbstractCowEntity
      Mappings:
      Namespace Name Mixin selector
      named interactMob Lnet/minecraft/entity/mob/MobEntity;interactMob(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
      intermediary method_5992 Lnet/minecraft/class_1308;method_5992(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      official b Lbyh;b(Lcsi;Lbvb;)Lbvc;
    • sheared Link icon

      public void sheared(ServerWorld world, SoundCategory shearedSoundCategory, ItemStack shears)
      Specified by:
      sheared in interface Shearable
      Mappings:
      Namespace Name Mixin selector
      named sheared Lnet/minecraft/entity/Shearable;sheared(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/sound/SoundCategory;Lnet/minecraft/item/ItemStack;)V
      intermediary method_6636 Lnet/minecraft/class_5147;method_6636(Lnet/minecraft/class_3218;Lnet/minecraft/class_3419;Lnet/minecraft/class_1799;)V
      official a Lbyv;a(Lasb;Lawz;Ldak;)V
    • isShearable Link icon

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

      public 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.

      Overrides:
      writeCustomDataToNbt in class AnimalEntity
      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 Lbxe;b(Lua;)V
    • readCustomDataFromNbt Link icon

      public 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.

      Overrides:
      readCustomDataFromNbt in class AnimalEntity
      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 Lbxe;a(Lua;)V
    • getStewEffectFrom Link icon

      private Optional<SuspiciousStewEffectsComponent> getStewEffectFrom(ItemStack flower)
      Mappings:
      Namespace Name Mixin selector
      named getStewEffectFrom Lnet/minecraft/entity/passive/MooshroomEntity;getStewEffectFrom(Lnet/minecraft/item/ItemStack;)Ljava/util/Optional;
      intermediary method_18436 Lnet/minecraft/class_1438;method_18436(Lnet/minecraft/class_1799;)Ljava/util/Optional;
      official j Lckm;j(Ldak;)Ljava/util/Optional;
    • setVariant Link icon

      private void setVariant(MooshroomEntity.Variant variant)
      Mappings:
      Namespace Name Mixin selector
      named setVariant Lnet/minecraft/entity/passive/MooshroomEntity;setVariant(Lnet/minecraft/entity/passive/MooshroomEntity$Variant;)V
      intermediary method_47846 Lnet/minecraft/class_1438;method_47846(Lnet/minecraft/class_1438$class_4053;)V
      official a Lckm;a(Lckm$a;)V
    • getVariant Link icon

      public MooshroomEntity.Variant getVariant()
      Mappings:
      Namespace Name Mixin selector
      named getVariant Lnet/minecraft/entity/passive/MooshroomEntity;getVariant()Lnet/minecraft/entity/passive/MooshroomEntity$Variant;
      intermediary method_47847 Lnet/minecraft/class_1438;method_47847()Lnet/minecraft/class_1438$class_4053;
      official p Lckm;p()Lckm$a;
    • get Link icon

      @Nullable public <T> T get(ComponentType<? extends T> type)
      Specified by:
      get in interface ComponentsAccess
      Overrides:
      get in class Entity
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/component/ComponentsAccess;get(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
      intermediary method_58694 Lnet/minecraft/class_9473;method_58694(Lnet/minecraft/class_9331;)Ljava/lang/Object;
      official a Lkg;a(Lkk;)Ljava/lang/Object;
    • copyComponentsFrom Link icon

      protected void copyComponentsFrom(ComponentsAccess from)
      Overrides:
      copyComponentsFrom in class Entity
      Mappings:
      Namespace Name Mixin selector
      named copyComponentsFrom Lnet/minecraft/entity/Entity;copyComponentsFrom(Lnet/minecraft/component/ComponentsAccess;)V
      intermediary method_66649 Lnet/minecraft/class_1297;method_66649(Lnet/minecraft/class_9473;)V
      official a Lbxe;a(Lkg;)V
    • setApplicableComponent Link icon

      protected <T> boolean setApplicableComponent(ComponentType<T> type, T value)
      Overrides:
      setApplicableComponent in class Entity
      Mappings:
      Namespace Name Mixin selector
      named setApplicableComponent Lnet/minecraft/entity/Entity;setApplicableComponent(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;)Z
      intermediary method_66654 Lnet/minecraft/class_1297;method_66654(Lnet/minecraft/class_9331;Ljava/lang/Object;)Z
      official b Lbxe;b(Lkk;Ljava/lang/Object;)Z
    • createChild Link icon

      @Nullable public @Nullable MooshroomEntity createChild(ServerWorld serverWorld, PassiveEntity passiveEntity)
      Specified by:
      createChild in class PassiveEntity
      Mappings:
      Namespace Name Mixin selector
      named createChild Lnet/minecraft/entity/passive/MooshroomEntity;createChild(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;)Lnet/minecraft/entity/passive/MooshroomEntity;
      intermediary method_6495 Lnet/minecraft/class_1438;method_6495(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;)Lnet/minecraft/class_1438;
      official b Lckm;b(Lasb;Lbwu;)Lckm;
    • chooseBabyVariant Link icon

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