Record Class TrialSpawnerConfig

java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerConfig

public record TrialSpawnerConfig(int spawnRange, float totalMobs, float simultaneousMobs, float totalMobsAddedPerPlayer, float simultaneousMobsAddedPerPlayer, int ticksBetweenSpawn, SimpleWeightedRandomList<SpawnData> spawnPotentialsDefinition, SimpleWeightedRandomList<ResourceKey<LootTable>> lootTablesToEject, ResourceKey<LootTable> itemsToDropWhenOminous) extends Record
  • Field Details

    • spawnRange

      private final int spawnRange
      The field for the spawnRange record component.
    • totalMobs

      private final float totalMobs
      The field for the totalMobs record component.
    • simultaneousMobs

      private final float simultaneousMobs
      The field for the simultaneousMobs record component.
    • totalMobsAddedPerPlayer

      private final float totalMobsAddedPerPlayer
      The field for the totalMobsAddedPerPlayer record component.
    • simultaneousMobsAddedPerPlayer

      private final float simultaneousMobsAddedPerPlayer
      The field for the simultaneousMobsAddedPerPlayer record component.
    • ticksBetweenSpawn

      private final int ticksBetweenSpawn
      The field for the ticksBetweenSpawn record component.
    • spawnPotentialsDefinition

      private final SimpleWeightedRandomList<SpawnData> spawnPotentialsDefinition
      The field for the spawnPotentialsDefinition record component.
    • lootTablesToEject

      private final SimpleWeightedRandomList<ResourceKey<LootTable>> lootTablesToEject
      The field for the lootTablesToEject record component.
    • itemsToDropWhenOminous

      private final ResourceKey<LootTable> itemsToDropWhenOminous
      The field for the itemsToDropWhenOminous record component.
    • DEFAULT

      public static final TrialSpawnerConfig DEFAULT
    • CODEC

      public static final com.mojang.serialization.Codec<TrialSpawnerConfig> CODEC
  • Constructor Details

    • TrialSpawnerConfig

      public TrialSpawnerConfig(int spawnRange, float totalMobs, float simultaneousMobs, float totalMobsAddedPerPlayer, float simultaneousMobsAddedPerPlayer, int ticksBetweenSpawn, SimpleWeightedRandomList<SpawnData> spawnPotentialsDefinition, SimpleWeightedRandomList<ResourceKey<LootTable>> lootTablesToEject, ResourceKey<LootTable> itemsToDropWhenOminous)
      Creates an instance of a TrialSpawnerConfig record class.
      Parameters:
      spawnRange - the value for the spawnRange record component
      totalMobs - the value for the totalMobs record component
      simultaneousMobs - the value for the simultaneousMobs record component
      totalMobsAddedPerPlayer - the value for the totalMobsAddedPerPlayer record component
      simultaneousMobsAddedPerPlayer - the value for the simultaneousMobsAddedPerPlayer record component
      ticksBetweenSpawn - the value for the ticksBetweenSpawn record component
      spawnPotentialsDefinition - the value for the spawnPotentialsDefinition record component
      lootTablesToEject - the value for the lootTablesToEject record component
      itemsToDropWhenOminous - the value for the itemsToDropWhenOminous record component
  • Method Details

    • calculateTargetTotalMobs

      public int calculateTargetTotalMobs(int p_312026_)
    • calculateTargetSimultaneousMobs

      public int calculateTargetSimultaneousMobs(int p_312885_)
    • ticksBetweenItemSpawners

      public long ticksBetweenItemSpawners()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • spawnRange

      public int spawnRange()
      Returns the value of the spawnRange record component.
      Returns:
      the value of the spawnRange record component
    • totalMobs

      public float totalMobs()
      Returns the value of the totalMobs record component.
      Returns:
      the value of the totalMobs record component
    • simultaneousMobs

      public float simultaneousMobs()
      Returns the value of the simultaneousMobs record component.
      Returns:
      the value of the simultaneousMobs record component
    • totalMobsAddedPerPlayer

      public float totalMobsAddedPerPlayer()
      Returns the value of the totalMobsAddedPerPlayer record component.
      Returns:
      the value of the totalMobsAddedPerPlayer record component
    • simultaneousMobsAddedPerPlayer

      public float simultaneousMobsAddedPerPlayer()
      Returns the value of the simultaneousMobsAddedPerPlayer record component.
      Returns:
      the value of the simultaneousMobsAddedPerPlayer record component
    • ticksBetweenSpawn

      public int ticksBetweenSpawn()
      Returns the value of the ticksBetweenSpawn record component.
      Returns:
      the value of the ticksBetweenSpawn record component
    • spawnPotentialsDefinition

      public SimpleWeightedRandomList<SpawnData> spawnPotentialsDefinition()
      Returns the value of the spawnPotentialsDefinition record component.
      Returns:
      the value of the spawnPotentialsDefinition record component
    • lootTablesToEject

      public SimpleWeightedRandomList<ResourceKey<LootTable>> lootTablesToEject()
      Returns the value of the lootTablesToEject record component.
      Returns:
      the value of the lootTablesToEject record component
    • itemsToDropWhenOminous

      public ResourceKey<LootTable> itemsToDropWhenOminous()
      Returns the value of the itemsToDropWhenOminous record component.
      Returns:
      the value of the itemsToDropWhenOminous record component