Record Class TrialSpawnerConfig

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

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

    • requiredPlayerRange

      private final int requiredPlayerRange
      The field for the requiredPlayerRange record component.
    • 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.
    • targetCooldownLength

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

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

      private final SimpleWeightedRandomList<ResourceLocation> lootTablesToEject
      The field for the lootTablesToEject record component.
    • DEFAULT

      public static TrialSpawnerConfig DEFAULT
    • MAP_CODEC

      public static com.mojang.serialization.MapCodec<TrialSpawnerConfig> MAP_CODEC
  • Constructor Details

    • TrialSpawnerConfig

      public TrialSpawnerConfig(int requiredPlayerRange, int spawnRange, float totalMobs, float simultaneousMobs, float totalMobsAddedPerPlayer, float simultaneousMobsAddedPerPlayer, int ticksBetweenSpawn, int targetCooldownLength, SimpleWeightedRandomList<SpawnData> spawnPotentialsDefinition, SimpleWeightedRandomList<ResourceLocation> lootTablesToEject)
      Creates an instance of a TrialSpawnerConfig record class.
      Parameters:
      requiredPlayerRange - the value for the requiredPlayerRange record component
      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
      targetCooldownLength - the value for the targetCooldownLength record component
      spawnPotentialsDefinition - the value for the spawnPotentialsDefinition record component
      lootTablesToEject - the value for the lootTablesToEject record component
  • Method Details

    • calculateTargetTotalMobs

      public int calculateTargetTotalMobs(int p_312026_)
    • calculateTargetSimultaneousMobs

      public int calculateTargetSimultaneousMobs(int p_312885_)
    • 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.
    • requiredPlayerRange

      public int requiredPlayerRange()
      Returns the value of the requiredPlayerRange record component.
      Returns:
      the value of the requiredPlayerRange record component
    • 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
    • targetCooldownLength

      public int targetCooldownLength()
      Returns the value of the targetCooldownLength record component.
      Returns:
      the value of the targetCooldownLength 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<ResourceLocation> lootTablesToEject()
      Returns the value of the lootTablesToEject record component.
      Returns:
      the value of the lootTablesToEject record component