Class BaseSpawner

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

public abstract class BaseSpawner extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • EVENT_SPAWN

      private static final int EVENT_SPAWN
      See Also:
    • spawnDelay

      private int spawnDelay
    • spawnPotentials

      private SimpleWeightedRandomList<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

    • 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(CompoundTag p_186382_)
    • 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()