Class OminousItemSpawnerEntity

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

public class OminousItemSpawnerEntity extends Entity
Mappings:
Namespace Name
named net/minecraft/entity/OminousItemSpawnerEntity
intermediary net/minecraft/class_9461
official bwl
  • Field Details

    • MIN_SPAWN_ITEM_AFTER_TICKS

      private static final int MIN_SPAWN_ITEM_AFTER_TICKS
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MIN_SPAWN_ITEM_AFTER_TICKS Lnet/minecraft/entity/OminousItemSpawnerEntity;MIN_SPAWN_ITEM_AFTER_TICKS:I
      intermediary field_50129 Lnet/minecraft/class_9461;field_50129:I
      official b Lbwl;b:I
    • MAX_SPAWN_ITEM_AFTER_TICKS

      private static final int MAX_SPAWN_ITEM_AFTER_TICKS
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_SPAWN_ITEM_AFTER_TICKS Lnet/minecraft/entity/OminousItemSpawnerEntity;MAX_SPAWN_ITEM_AFTER_TICKS:I
      intermediary field_50130 Lnet/minecraft/class_9461;field_50130:I
      official c Lbwl;c:I
    • SPAWN_ITEM_AFTER_TICKS_NBT_KEY

      private static final String SPAWN_ITEM_AFTER_TICKS_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SPAWN_ITEM_AFTER_TICKS_NBT_KEY Lnet/minecraft/entity/OminousItemSpawnerEntity;SPAWN_ITEM_AFTER_TICKS_NBT_KEY:Ljava/lang/String;
      intermediary field_50131 Lnet/minecraft/class_9461;field_50131:Ljava/lang/String;
      official d Lbwl;d:Ljava/lang/String;
    • ITEM_NBT_KEY

      private static final String ITEM_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named ITEM_NBT_KEY Lnet/minecraft/entity/OminousItemSpawnerEntity;ITEM_NBT_KEY:Ljava/lang/String;
      intermediary field_50132 Lnet/minecraft/class_9461;field_50132:Ljava/lang/String;
      official e Lbwl;e:Ljava/lang/String;
    • ITEM

      private static final TrackedData<ItemStack> ITEM
      Mappings:
      Namespace Name Mixin selector
      named ITEM Lnet/minecraft/entity/OminousItemSpawnerEntity;ITEM:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_50133 Lnet/minecraft/class_9461;field_50133:Lnet/minecraft/class_2940;
      official f Lbwl;f:Lalc;
    • field_50128

      public static final int field_50128
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_50128 Lnet/minecraft/entity/OminousItemSpawnerEntity;field_50128:I
      intermediary field_50128 Lnet/minecraft/class_9461;field_50128:I
      official a Lbwl;a:I
    • spawnItemAfterTicks

      private long spawnItemAfterTicks
      Mappings:
      Namespace Name Mixin selector
      named spawnItemAfterTicks Lnet/minecraft/entity/OminousItemSpawnerEntity;spawnItemAfterTicks:J
      intermediary field_50134 Lnet/minecraft/class_9461;field_50134:J
      official g Lbwl;g:J
  • Constructor Details

    • OminousItemSpawnerEntity

      public OminousItemSpawnerEntity(EntityType<? extends OminousItemSpawnerEntity> 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> Lbvj;<init>(Lbvq;Ldhh;)V
  • Method Details

    • create

      public static OminousItemSpawnerEntity create(World world, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/entity/OminousItemSpawnerEntity;create(Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/OminousItemSpawnerEntity;
      intermediary method_58638 Lnet/minecraft/class_9461;method_58638(Lnet/minecraft/class_1937;Lnet/minecraft/class_1799;)Lnet/minecraft/class_9461;
      official a Lbwl;a(Ldhh;Lcxo;)Lbwl;
    • 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 h Lbvj;h()V
    • tickServer

      private void tickServer(ServerWorld world)
      Mappings:
      Namespace Name Mixin selector
      named tickServer Lnet/minecraft/entity/OminousItemSpawnerEntity;tickServer(Lnet/minecraft/server/world/ServerWorld;)V
      intermediary method_58641 Lnet/minecraft/class_9461;method_58641(Lnet/minecraft/class_3218;)V
      official a Lbwl;a(Lash;)V
    • tickClient

      private void tickClient()
      Mappings:
      Namespace Name Mixin selector
      named tickClient Lnet/minecraft/entity/OminousItemSpawnerEntity;tickClient()V
      intermediary method_58642 Lnet/minecraft/class_9461;method_58642()V
      official p Lbwl;p()V
    • spawnItem

      private void spawnItem()
      Mappings:
      Namespace Name Mixin selector
      named spawnItem Lnet/minecraft/entity/OminousItemSpawnerEntity;spawnItem()V
      intermediary method_58643 Lnet/minecraft/class_9461;method_58643()V
      official s Lbwl;s()V
    • spawnProjectile

      private Entity spawnProjectile(ServerWorld world, ProjectileItem item, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named spawnProjectile Lnet/minecraft/entity/OminousItemSpawnerEntity;spawnProjectile(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ProjectileItem;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/Entity;
      intermediary method_61432 Lnet/minecraft/class_9461;method_61432(Lnet/minecraft/class_3218;Lnet/minecraft/class_9463;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1297;
      official a Lbwl;a(Lash;Lcyj;Lcxo;)Lbvj;
    • 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 Lbvj;a(Lalg$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 Lbvj;a(Lux;)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 Lbvj;b(Lux;)V
    • canAddPassenger

      protected boolean canAddPassenger(Entity passenger)
      Returns whether entity can ride this entity.

      Returning false causes other entities to be unable to ride this entity. For example, BoatEntity uses this to restrict how many passengers can ride the same boat (2 for normal, 1 for chest boat).

      This is the opposite of Entity.canStartRiding(net.minecraft.entity.Entity).

      Overrides:
      canAddPassenger in class Entity
      Returns:
      whether entity can ride this entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named canAddPassenger Lnet/minecraft/entity/Entity;canAddPassenger(Lnet/minecraft/entity/Entity;)Z
      intermediary method_5818 Lnet/minecraft/class_1297;method_5818(Lnet/minecraft/class_1297;)Z
      official r Lbvj;r(Lbvj;)Z
    • couldAcceptPassenger

      protected boolean couldAcceptPassenger()
      Returns true if this entity supports passengers in general.
      Overrides:
      couldAcceptPassenger in class Entity
      Returns:
      true if this entity supports passengers in general
      Mappings:
      Namespace Name Mixin selector
      named couldAcceptPassenger Lnet/minecraft/entity/Entity;couldAcceptPassenger()Z
      intermediary method_48921 Lnet/minecraft/class_1297;method_48921()Z
      official bR Lbvj;bR()Z
    • addPassenger

      protected void addPassenger(Entity passenger)
      Adds passenger as a passenger. This should not be called normally; call Entity.startRiding(Entity) instead. (Note that the entity to pass and the entity to call are swapped in this case; entity.startRiding(vehicle) is the equivalent of vehicle.addPassenger(entity).)
      Overrides:
      addPassenger in class Entity
      Throws:
      IllegalStateException - when the method is called directly
      Mappings:
      Namespace Name Mixin selector
      named addPassenger Lnet/minecraft/entity/Entity;addPassenger(Lnet/minecraft/entity/Entity;)V
      intermediary method_5627 Lnet/minecraft/class_1297;method_5627(Lnet/minecraft/class_1297;)V
      official p Lbvj;p(Lbvj;)V
    • getPistonBehavior

      public PistonBehavior getPistonBehavior()
      Returns the behavior of the piston for this entity.

      This is PistonBehavior.NORMAL by default. AreaEffectCloudEntity, MarkerEntity, and marker ArmorStandEntity return PistonBehavior.IGNORE, causing the piston to not affect the entity's position. Other piston behaviors are inapplicable to entities, and treated like PistonBehavior.NORMAL.

      Overrides:
      getPistonBehavior in class Entity
      Returns:
      the behavior of the piston for this entity
      Mappings:
      Namespace Name Mixin selector
      named getPistonBehavior Lnet/minecraft/entity/Entity;getPistonBehavior()Lnet/minecraft/block/piston/PistonBehavior;
      intermediary method_5657 Lnet/minecraft/class_1297;method_5657()Lnet/minecraft/class_3619;
      official n_ Lbvj;n_()Leub;
    • canAvoidTraps

      public boolean canAvoidTraps()
      Returns whether the entity cannot trigger pressure plates or tripwires.

      BatEntity is the only entity in vanilla that can avoid traps.

      Overrides:
      canAvoidTraps in class Entity
      Returns:
      whether the entity cannot trigger pressure plates or tripwires
      Mappings:
      Namespace Name Mixin selector
      named canAvoidTraps Lnet/minecraft/entity/Entity;canAvoidTraps()Z
      intermediary method_5696 Lnet/minecraft/class_1297;method_5696()Z
      official s_ Lbvj;s_()Z
    • addParticles

      public void addParticles()
      Mappings:
      Namespace Name Mixin selector
      named addParticles Lnet/minecraft/entity/OminousItemSpawnerEntity;addParticles()V
      intermediary method_58639 Lnet/minecraft/class_9461;method_58639()V
      official l Lbwl;l()V
    • getItem

      public ItemStack getItem()
      Mappings:
      Namespace Name Mixin selector
      named getItem Lnet/minecraft/entity/OminousItemSpawnerEntity;getItem()Lnet/minecraft/item/ItemStack;
      intermediary method_58640 Lnet/minecraft/class_9461;method_58640()Lnet/minecraft/class_1799;
      official m Lbwl;m()Lcxo;
    • setItem

      private void setItem(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named setItem Lnet/minecraft/entity/OminousItemSpawnerEntity;setItem(Lnet/minecraft/item/ItemStack;)V
      intermediary method_58636 Lnet/minecraft/class_9461;method_58636(Lnet/minecraft/class_1799;)V
      official a Lbwl;a(Lcxo;)V
    • damage

      public final boolean damage(ServerWorld world, DamageSource source, float amount)
      Applies a damage to this entity. The exact implementation differs between subclasses.

      LivingEntity has health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.

      Some entities like ItemEntity also have health value, which the overridden method decrements. There also exist several entities, like EndCrystalEntity, where any damage discards the entity (perhaps with an explosion).

      If this is overridden, it must check the result of

      invalid reference
      #isInvulnerableTo
      and return early.
      Specified by:
      damage in class Entity
      Returns:
      whether the entity was actually damaged
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;F)Z
      intermediary method_64397 Lnet/minecraft/class_1297;method_64397(Lnet/minecraft/class_3218;Lnet/minecraft/class_1282;F)Z
      official a Lbvj;a(Lash;Lbtz;F)Z