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 Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TrialSpawnerConfig> static final TrialSpawnerConfigprivate final ResourceKey<LootTable> The field for theitemsToDropWhenOminousrecord component.private final SimpleWeightedRandomList<ResourceKey<LootTable>> The field for thelootTablesToEjectrecord 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 theticksBetweenSpawnrecord component.private final floatThe field for thetotalMobsrecord component.private final floatThe field for thetotalMobsAddedPerPlayerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTrialSpawnerConfig(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 aTrialSpawnerConfigrecord class. -
Method Summary
Modifier 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 theitemsToDropWhenOminousrecord component.Returns the value of thelootTablesToEjectrecord 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.longintReturns 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
-
spawnRange
private final int spawnRangeThe field for thespawnRangerecord component. -
totalMobs
private final float totalMobsThe field for thetotalMobsrecord component. -
simultaneousMobs
private final float simultaneousMobsThe field for thesimultaneousMobsrecord component. -
totalMobsAddedPerPlayer
private final float totalMobsAddedPerPlayerThe field for thetotalMobsAddedPerPlayerrecord component. -
simultaneousMobsAddedPerPlayer
private final float simultaneousMobsAddedPerPlayerThe field for thesimultaneousMobsAddedPerPlayerrecord component. -
ticksBetweenSpawn
private final int ticksBetweenSpawnThe field for theticksBetweenSpawnrecord component. -
spawnPotentialsDefinition
The field for thespawnPotentialsDefinitionrecord component. -
lootTablesToEject
The field for thelootTablesToEjectrecord component. -
itemsToDropWhenOminous
The field for theitemsToDropWhenOminousrecord component. -
DEFAULT
-
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 aTrialSpawnerConfigrecord class.- Parameters:
spawnRange- the value for thespawnRangerecord componenttotalMobs- the value for thetotalMobsrecord componentsimultaneousMobs- the value for thesimultaneousMobsrecord componenttotalMobsAddedPerPlayer- the value for thetotalMobsAddedPerPlayerrecord componentsimultaneousMobsAddedPerPlayer- the value for thesimultaneousMobsAddedPerPlayerrecord componentticksBetweenSpawn- the value for theticksBetweenSpawnrecord componentspawnPotentialsDefinition- the value for thespawnPotentialsDefinitionrecord componentlootTablesToEject- the value for thelootTablesToEjectrecord componentitemsToDropWhenOminous- the value for theitemsToDropWhenOminousrecord component
-
-
Method Details
-
calculateTargetTotalMobs
public int calculateTargetTotalMobs(int p_312026_) -
calculateTargetSimultaneousMobs
public int calculateTargetSimultaneousMobs(int p_312885_) -
ticksBetweenItemSpawners
public long ticksBetweenItemSpawners() -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
spawnRange
public int spawnRange()Returns the value of thespawnRangerecord component.- Returns:
- the value of the
spawnRangerecord component
-
totalMobs
public float totalMobs()Returns the value of thetotalMobsrecord component.- Returns:
- the value of the
totalMobsrecord component
-
simultaneousMobs
public float simultaneousMobs()Returns the value of thesimultaneousMobsrecord component.- Returns:
- the value of the
simultaneousMobsrecord component
-
totalMobsAddedPerPlayer
public float totalMobsAddedPerPlayer()Returns the value of thetotalMobsAddedPerPlayerrecord component.- Returns:
- the value of the
totalMobsAddedPerPlayerrecord component
-
simultaneousMobsAddedPerPlayer
public float simultaneousMobsAddedPerPlayer()Returns the value of thesimultaneousMobsAddedPerPlayerrecord component.- Returns:
- the value of the
simultaneousMobsAddedPerPlayerrecord component
-
ticksBetweenSpawn
public int ticksBetweenSpawn()Returns the value of theticksBetweenSpawnrecord component.- Returns:
- the value of the
ticksBetweenSpawnrecord component
-
spawnPotentialsDefinition
Returns the value of thespawnPotentialsDefinitionrecord component.- Returns:
- the value of the
spawnPotentialsDefinitionrecord component
-
lootTablesToEject
Returns the value of thelootTablesToEjectrecord component.- Returns:
- the value of the
lootTablesToEjectrecord component
-
itemsToDropWhenOminous
Returns the value of theitemsToDropWhenOminousrecord component.- Returns:
- the value of the
itemsToDropWhenOminousrecord component
-