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 aRaidSpawnrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes()Returns the value of thebiomesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationReturns the value of thelootTablerecord component.spec()Returns the value of thespecrecord component.net.minecraft.util.valueproviders.IntProviderstars()Returns the value of thestarsrecord component.final StringtoString()Returns a string representation of this record class.doubleweight()Returns the value of theweightrecord 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 aRaidSpawnrecord 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 thebiomesrecord component.- Returns:
- the value of the
biomesrecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
spec
Returns the value of thespecrecord component.- Returns:
- the value of the
specrecord component
-
lootTable
public net.minecraft.resources.ResourceLocation lootTable()Returns the value of thelootTablerecord component.- Returns:
- the value of the
lootTablerecord component
-
stars
public net.minecraft.util.valueproviders.IntProvider stars()Returns the value of thestarsrecord component.- Returns:
- the value of the
starsrecord component
-