Record Class RaidSpawn
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.spawning.RaidSpawn
- Record Components:
biomes
- The biomes the Pokemon can spawn in.weight
- The weight of the spawn.spec
- The specification of the Pokemon.lootTable
- The loot table to use for the Pokemon if it is defeated.stars
- The number of stars the Pokemon has.
public record RaidSpawn(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, double weight, PokemonSpecification spec, net.minecraft.resources.ResourceLocation lootTable, net.minecraft.util.valueproviders.IntProvider stars)
extends Record
Represents a Pokemon that can spawn in a raid den.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRaidSpawn
(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, double weight, PokemonSpecification spec, net.minecraft.resources.ResourceLocation lootTable, net.minecraft.util.valueproviders.IntProvider stars) Creates an instance of aRaidSpawn
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderSet
<net.minecraft.world.level.biome.Biome> biomes()
Returns the value of thebiomes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.net.minecraft.resources.ResourceLocation
Returns the value of thelootTable
record component.spec()
Returns the value of thespec
record component.net.minecraft.util.valueproviders.IntProvider
stars()
Returns the value of thestars
record component.final String
toString()
Returns a string representation of this record class.double
weight()
Returns the value of theweight
record component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
RaidSpawn
public RaidSpawn(net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes, double weight, PokemonSpecification spec, net.minecraft.resources.ResourceLocation lootTable, net.minecraft.util.valueproviders.IntProvider stars) Creates an instance of aRaidSpawn
record class.
-
-
Method Details
-
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 '=='. -
biomes
public net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes()Returns the value of thebiomes
record component.- Returns:
- the value of the
biomes
record component
-
weight
public double weight()Returns the value of theweight
record component.- Returns:
- the value of the
weight
record component
-
spec
Returns the value of thespec
record component.- Returns:
- the value of the
spec
record component
-
lootTable
public net.minecraft.resources.ResourceLocation lootTable()Returns the value of thelootTable
record component.- Returns:
- the value of the
lootTable
record component
-
stars
public net.minecraft.util.valueproviders.IntProvider stars()Returns the value of thestars
record component.- Returns:
- the value of the
stars
record component
-