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 SummaryFieldsModifier and TypeFieldDescriptionstatic TrialSpawnerConfigprivate final SimpleWeightedRandomList<ResourceLocation>The field for thelootTablesToEjectrecord component.static com.mojang.serialization.MapCodec<TrialSpawnerConfig>private final intThe field for therequiredPlayerRangerecord component.private final floatThe field for thesimultaneousMobsrecord component.private final floatThe field for thesimultaneousMobsAddedPerPlayerrecord component.private final SimpleWeightedRandomList<SpawnData>The field for thespawnPotentialsDefinitionrecord component.private final intThe field for thespawnRangerecord component.private final intThe field for thetargetCooldownLengthrecord component.private final intThe field for theticksBetweenSpawnrecord component.private final floatThe field for thetotalMobsrecord component.private final floatThe field for thetotalMobsAddedPerPlayerrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionTrialSpawnerConfig(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 aTrialSpawnerConfigrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionintcalculateTargetSimultaneousMobs(int p_312885_) intcalculateTargetTotalMobs(int p_312026_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelootTablesToEjectrecord component.intReturns the value of therequiredPlayerRangerecord component.floatReturns the value of thesimultaneousMobsrecord component.floatReturns the value of thesimultaneousMobsAddedPerPlayerrecord component.Returns the value of thespawnPotentialsDefinitionrecord component.intReturns the value of thespawnRangerecord component.intReturns the value of thetargetCooldownLengthrecord component.intReturns the value of theticksBetweenSpawnrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thetotalMobsrecord component.floatReturns the value of thetotalMobsAddedPerPlayerrecord component.
- 
Field Details- 
requiredPlayerRangeprivate final int requiredPlayerRangeThe field for therequiredPlayerRangerecord component.
- 
spawnRangeprivate final int spawnRangeThe field for thespawnRangerecord component.
- 
totalMobsprivate final float totalMobsThe field for thetotalMobsrecord component.
- 
simultaneousMobsprivate final float simultaneousMobsThe field for thesimultaneousMobsrecord component.
- 
totalMobsAddedPerPlayerprivate final float totalMobsAddedPerPlayerThe field for thetotalMobsAddedPerPlayerrecord component.
- 
simultaneousMobsAddedPerPlayerprivate final float simultaneousMobsAddedPerPlayerThe field for thesimultaneousMobsAddedPerPlayerrecord component.
- 
ticksBetweenSpawnprivate final int ticksBetweenSpawnThe field for theticksBetweenSpawnrecord component.
- 
targetCooldownLengthprivate final int targetCooldownLengthThe field for thetargetCooldownLengthrecord component.
- 
spawnPotentialsDefinitionThe field for thespawnPotentialsDefinitionrecord component.
- 
lootTablesToEjectThe field for thelootTablesToEjectrecord component.
- 
DEFAULT
- 
MAP_CODEC
 
- 
- 
Constructor Details- 
TrialSpawnerConfigpublic 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 aTrialSpawnerConfigrecord class.- Parameters:
- requiredPlayerRange- the value for the- requiredPlayerRangerecord component
- spawnRange- the value for the- spawnRangerecord component
- totalMobs- the value for the- totalMobsrecord component
- simultaneousMobs- the value for the- simultaneousMobsrecord component
- totalMobsAddedPerPlayer- the value for the- totalMobsAddedPerPlayerrecord component
- simultaneousMobsAddedPerPlayer- the value for the- simultaneousMobsAddedPerPlayerrecord component
- ticksBetweenSpawn- the value for the- ticksBetweenSpawnrecord component
- targetCooldownLength- the value for the- targetCooldownLengthrecord component
- spawnPotentialsDefinition- the value for the- spawnPotentialsDefinitionrecord component
- lootTablesToEject- the value for the- lootTablesToEjectrecord component
 
 
- 
- 
Method Details- 
calculateTargetTotalMobspublic int calculateTargetTotalMobs(int p_312026_) 
- 
calculateTargetSimultaneousMobspublic int calculateTargetSimultaneousMobs(int p_312885_) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
requiredPlayerRangepublic int requiredPlayerRange()Returns the value of therequiredPlayerRangerecord component.- Returns:
- the value of the requiredPlayerRangerecord component
 
- 
spawnRangepublic int spawnRange()Returns the value of thespawnRangerecord component.- Returns:
- the value of the spawnRangerecord component
 
- 
totalMobspublic float totalMobs()Returns the value of thetotalMobsrecord component.- Returns:
- the value of the totalMobsrecord component
 
- 
simultaneousMobspublic float simultaneousMobs()Returns the value of thesimultaneousMobsrecord component.- Returns:
- the value of the simultaneousMobsrecord component
 
- 
totalMobsAddedPerPlayerpublic float totalMobsAddedPerPlayer()Returns the value of thetotalMobsAddedPerPlayerrecord component.- Returns:
- the value of the totalMobsAddedPerPlayerrecord component
 
- 
simultaneousMobsAddedPerPlayerpublic float simultaneousMobsAddedPerPlayer()Returns the value of thesimultaneousMobsAddedPerPlayerrecord component.- Returns:
- the value of the simultaneousMobsAddedPerPlayerrecord component
 
- 
ticksBetweenSpawnpublic int ticksBetweenSpawn()Returns the value of theticksBetweenSpawnrecord component.- Returns:
- the value of the ticksBetweenSpawnrecord component
 
- 
targetCooldownLengthpublic int targetCooldownLength()Returns the value of thetargetCooldownLengthrecord component.- Returns:
- the value of the targetCooldownLengthrecord component
 
- 
spawnPotentialsDefinitionReturns the value of thespawnPotentialsDefinitionrecord component.- Returns:
- the value of the spawnPotentialsDefinitionrecord component
 
- 
lootTablesToEjectReturns the value of thelootTablesToEjectrecord component.- Returns:
- the value of the lootTablesToEjectrecord component
 
 
-