Class TrialSpawnerData

java.lang.Object
net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData

public class TrialSpawnerData extends Object
  • Field Details

    • TAG_SPAWN_DATA

      public static final String TAG_SPAWN_DATA
      See Also:
    • TAG_NEXT_MOB_SPAWNS_AT

      private static final String TAG_NEXT_MOB_SPAWNS_AT
      See Also:
    • MAP_CODEC

      public static com.mojang.serialization.MapCodec<TrialSpawnerData> MAP_CODEC
    • detectedPlayers

      protected final Set<UUID> detectedPlayers
    • currentMobs

      protected final Set<UUID> currentMobs
    • cooldownEndsAt

      protected long cooldownEndsAt
    • nextMobSpawnsAt

      protected long nextMobSpawnsAt
    • totalMobsSpawned

      protected int totalMobsSpawned
    • nextSpawnData

      protected Optional<SpawnData> nextSpawnData
    • ejectingLootTable

      protected Optional<ResourceLocation> ejectingLootTable
    • spawnPotentials

      protected SimpleWeightedRandomList<SpawnData> spawnPotentials
    • displayEntity

      @Nullable protected Entity displayEntity
    • spin

      protected double spin
    • oSpin

      protected double oSpin
  • Constructor Details

  • Method Details

    • setSpawnPotentialsFromConfig

      public void setSpawnPotentialsFromConfig(TrialSpawnerConfig p_311202_)
    • reset

      public void reset()
    • hasMobToSpawn

      public boolean hasMobToSpawn()
    • hasFinishedSpawningAllMobs

      public boolean hasFinishedSpawningAllMobs(TrialSpawnerConfig p_310871_, int p_313160_)
    • haveAllCurrentMobsDied

      public boolean haveAllCurrentMobsDied()
    • isReadyToSpawnNextMob

      public boolean isReadyToSpawnNextMob(ServerLevel p_312376_, TrialSpawnerConfig p_313089_, int p_311969_)
    • countAdditionalPlayers

      public int countAdditionalPlayers(BlockPos p_310055_)
    • tryDetectPlayers

      public void tryDetectPlayers(ServerLevel p_313049_, BlockPos p_310981_, PlayerDetector p_312393_, int p_310864_)
    • isReadyToOpenShutter

      public boolean isReadyToOpenShutter(ServerLevel p_311936_, TrialSpawnerConfig p_312846_, float p_312381_)
    • isReadyToEjectItems

      public boolean isReadyToEjectItems(ServerLevel p_309478_, TrialSpawnerConfig p_310848_, float p_310189_)
    • isCooldownFinished

      public boolean isCooldownFinished(ServerLevel p_312277_)
    • setEntityId

      public void setEntityId(TrialSpawner p_311233_, RandomSource p_312395_, EntityType<?> p_311226_)
    • getOrCreateNextSpawnData

      protected SpawnData getOrCreateNextSpawnData(TrialSpawner p_311810_, RandomSource p_311692_)
    • getOrCreateDisplayEntity

      @Nullable public Entity getOrCreateDisplayEntity(TrialSpawner p_310895_, Level p_310374_, TrialSpawnerState p_310556_)
    • getUpdateTag

      public CompoundTag getUpdateTag(TrialSpawnerState p_310015_)
    • getSpin

      public double getSpin()
    • getOSpin

      public double getOSpin()