Class BaseSpawner

java.lang.Object
net.minecraft.world.level.BaseSpawner

public abstract class BaseSpawner extends Object
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • EVENT_SPAWN

      private static final int EVENT_SPAWN
      See Also:
      Constant Field Values
    • EMPTY_POTENTIALS

      private static WeightedRandomList<SpawnData> EMPTY_POTENTIALS
    • spawnDelay

      private int spawnDelay
    • spawnPotentials

      private WeightedRandomList<SpawnData> spawnPotentials
    • nextSpawnData

      private SpawnData nextSpawnData
    • spin

      private double spin
    • oSpin

      private double oSpin
    • minSpawnDelay

      private int minSpawnDelay
    • maxSpawnDelay

      private int maxSpawnDelay
    • spawnCount

      private int spawnCount
    • displayEntity

      @Nullable private Entity displayEntity
    • maxNearbyEntities

      private int maxNearbyEntities
    • requiredPlayerRange

      private int requiredPlayerRange
    • spawnRange

      private int spawnRange
    • random

      private final Random random
  • Constructor Details

    • BaseSpawner

      public BaseSpawner()
  • Method Details

    • getEntityId

      @Nullable private ResourceLocation getEntityId(@Nullable Level p_151333_, BlockPos p_151334_)
    • setEntityId

      public void setEntityId(EntityType<?> p_45463_)
    • isNearPlayer

      private boolean isNearPlayer(Level p_151344_, BlockPos p_151345_)
    • clientTick

      public void clientTick(Level p_151320_, BlockPos p_151321_)
    • serverTick

      public void serverTick(ServerLevel p_151312_, BlockPos p_151313_)
    • delay

      private void delay(Level p_151351_, BlockPos p_151352_)
    • load

      public void load(@Nullable Level p_151329_, BlockPos p_151330_, CompoundTag p_151331_)
    • save

      public CompoundTag save(@Nullable Level p_151340_, BlockPos p_151341_, CompoundTag p_151342_)
    • getOrCreateDisplayEntity

      @Nullable public Entity getOrCreateDisplayEntity(Level p_151315_)
    • onEventTriggered

      public boolean onEventTriggered(Level p_151317_, int p_151318_)
    • setNextSpawnData

      public void setNextSpawnData(@Nullable Level p_151325_, BlockPos p_151326_, SpawnData p_151327_)
    • broadcastEvent

      public abstract void broadcastEvent(Level p_151322_, BlockPos p_151323_, int p_151324_)
    • getSpin

      public double getSpin()
    • getoSpin

      public double getoSpin()
    • getSpawnerEntity

      @Nullable public Entity getSpawnerEntity()
    • getSpawnerBlockEntity

      @Nullable public BlockEntity getSpawnerBlockEntity()