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_312066_)
    • reset

      public void reset()
    • hasMobToSpawn

      public boolean hasMobToSpawn()
    • hasFinishedSpawningAllMobs

      public boolean hasFinishedSpawningAllMobs(TrialSpawnerConfig p_311805_, int p_312034_)
    • haveAllCurrentMobsDied

      public boolean haveAllCurrentMobsDied()
    • isReadyToSpawnNextMob

      public boolean isReadyToSpawnNextMob(ServerLevel p_311818_, TrialSpawnerConfig p_312100_, int p_312550_)
    • countAdditionalPlayers

      public int countAdditionalPlayers(BlockPos p_312262_)
    • tryDetectPlayers

      public void tryDetectPlayers(ServerLevel p_311852_, BlockPos p_312503_, PlayerDetector p_312592_, int p_312480_)
    • isReadyToOpenShutter

      public boolean isReadyToOpenShutter(ServerLevel p_312291_, TrialSpawnerConfig p_312182_, float p_312417_)
    • isReadyToEjectItems

      public boolean isReadyToEjectItems(ServerLevel p_312692_, TrialSpawnerConfig p_312027_, float p_312374_)
    • isCooldownFinished

      public boolean isCooldownFinished(ServerLevel p_312743_)
    • setEntityId

      public void setEntityId(TrialSpawner p_312044_, RandomSource p_312864_, EntityType<?> p_312415_)
    • getOrCreateNextSpawnData

      protected SpawnData getOrCreateNextSpawnData(TrialSpawner p_312745_, RandomSource p_312242_)
    • getOrCreateDisplayEntity

      @Nullable public Entity getOrCreateDisplayEntity(TrialSpawner p_312366_, Level p_312148_, TrialSpawnerState p_311790_)
    • getUpdateTag

      public CompoundTag getUpdateTag(TrialSpawnerState p_312104_)
    • getSpin

      public double getSpin()
    • getOSpin

      public double getOSpin()