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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<TrialSpawnerConfig> static final TrialSpawnerConfig
private final ResourceKey
<LootTable> The field for theitemsToDropWhenOminous
record component.private final SimpleWeightedRandomList
<ResourceKey<LootTable>> The field for thelootTablesToEject
record component.private final float
The field for thesimultaneousMobs
record component.private final float
The field for thesimultaneousMobsAddedPerPlayer
record component.private final SimpleWeightedRandomList
<SpawnData> The field for thespawnPotentialsDefinition
record component.private final int
The field for thespawnRange
record component.private final int
The field for theticksBetweenSpawn
record component.private final float
The field for thetotalMobs
record component.private final float
The field for thetotalMobsAddedPerPlayer
record component. -
Constructor Summary
ConstructorDescriptionTrialSpawnerConfig
(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 aTrialSpawnerConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
calculateTargetSimultaneousMobs
(int p_312677_) int
calculateTargetTotalMobs
(int p_309661_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theitemsToDropWhenOminous
record component.Returns the value of thelootTablesToEject
record component.float
Returns the value of thesimultaneousMobs
record component.float
Returns the value of thesimultaneousMobsAddedPerPlayer
record component.Returns the value of thespawnPotentialsDefinition
record component.int
Returns the value of thespawnRange
record component.long
int
Returns the value of theticksBetweenSpawn
record component.final String
toString()
Returns a string representation of this record class.float
Returns the value of thetotalMobs
record component.float
Returns the value of thetotalMobsAddedPerPlayer
record component.
-
Field Details
-
spawnRange
private final int spawnRangeThe field for thespawnRange
record component. -
totalMobs
private final float totalMobsThe field for thetotalMobs
record component. -
simultaneousMobs
private final float simultaneousMobsThe field for thesimultaneousMobs
record component. -
totalMobsAddedPerPlayer
private final float totalMobsAddedPerPlayerThe field for thetotalMobsAddedPerPlayer
record component. -
simultaneousMobsAddedPerPlayer
private final float simultaneousMobsAddedPerPlayerThe field for thesimultaneousMobsAddedPerPlayer
record component. -
ticksBetweenSpawn
private final int ticksBetweenSpawnThe field for theticksBetweenSpawn
record component. -
spawnPotentialsDefinition
The field for thespawnPotentialsDefinition
record component. -
lootTablesToEject
The field for thelootTablesToEject
record component. -
itemsToDropWhenOminous
The field for theitemsToDropWhenOminous
record 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 aTrialSpawnerConfig
record class.- Parameters:
spawnRange
- the value for thespawnRange
record componenttotalMobs
- the value for thetotalMobs
record componentsimultaneousMobs
- the value for thesimultaneousMobs
record componenttotalMobsAddedPerPlayer
- the value for thetotalMobsAddedPerPlayer
record componentsimultaneousMobsAddedPerPlayer
- the value for thesimultaneousMobsAddedPerPlayer
record componentticksBetweenSpawn
- the value for theticksBetweenSpawn
record componentspawnPotentialsDefinition
- the value for thespawnPotentialsDefinition
record componentlootTablesToEject
- the value for thelootTablesToEject
record componentitemsToDropWhenOminous
- the value for theitemsToDropWhenOminous
record component
-
-
Method Details
-
calculateTargetTotalMobs
public int calculateTargetTotalMobs(int p_309661_) -
calculateTargetSimultaneousMobs
public int calculateTargetSimultaneousMobs(int p_312677_) -
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 thespawnRange
record component.- Returns:
- the value of the
spawnRange
record component
-
totalMobs
public float totalMobs()Returns the value of thetotalMobs
record component.- Returns:
- the value of the
totalMobs
record component
-
simultaneousMobs
public float simultaneousMobs()Returns the value of thesimultaneousMobs
record component.- Returns:
- the value of the
simultaneousMobs
record component
-
totalMobsAddedPerPlayer
public float totalMobsAddedPerPlayer()Returns the value of thetotalMobsAddedPerPlayer
record component.- Returns:
- the value of the
totalMobsAddedPerPlayer
record component
-
simultaneousMobsAddedPerPlayer
public float simultaneousMobsAddedPerPlayer()Returns the value of thesimultaneousMobsAddedPerPlayer
record component.- Returns:
- the value of the
simultaneousMobsAddedPerPlayer
record component
-
ticksBetweenSpawn
public int ticksBetweenSpawn()Returns the value of theticksBetweenSpawn
record component.- Returns:
- the value of the
ticksBetweenSpawn
record component
-
spawnPotentialsDefinition
Returns the value of thespawnPotentialsDefinition
record component.- Returns:
- the value of the
spawnPotentialsDefinition
record component
-
lootTablesToEject
Returns the value of thelootTablesToEject
record component.- Returns:
- the value of the
lootTablesToEject
record component
-
itemsToDropWhenOminous
Returns the value of theitemsToDropWhenOminous
record component.- Returns:
- the value of the
itemsToDropWhenOminous
record component
-