Class BaseSpawner

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

public abstract class BaseSpawner extends Object
  • Field Details

    • SPAWN_DATA_TAG

      public static final String SPAWN_DATA_TAG
      See Also:
    • 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

      @Nullable 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
  • Constructor Details

    • BaseSpawner

      public BaseSpawner()
  • Method Details

    • setEntityId

      public void setEntityId(EntityType<?> p_253682_, @Nullable Level p_254041_, RandomSource p_254221_, BlockPos p_254050_)
    • 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_254323_, BlockPos p_254313_)
    • onEventTriggered

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

      protected void setNextSpawnData(@Nullable Level p_151325_, BlockPos p_151326_, SpawnData p_151327_)
    • getOrCreateNextSpawnData

      private SpawnData getOrCreateNextSpawnData(@Nullable Level p_254503_, RandomSource p_253892_, BlockPos p_254487_)
    • 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()