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
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<RaidSpawn>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a RaidSpawn record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome>
    Returns the value of the biomes record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    Returns the value of the lootTable record component.
    Returns the value of the spec record component.
    net.minecraft.util.valueproviders.IntProvider
    Returns the value of the stars record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the weight record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<RaidSpawn> 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 a RaidSpawn record class.
      Parameters:
      biomes - the value for the biomes record component
      weight - the value for the weight record component
      spec - the value for the spec record component
      lootTable - the value for the lootTable record component
      stars - the value for the stars record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • biomes

      public net.minecraft.core.HolderSet<net.minecraft.world.level.biome.Biome> biomes()
      Returns the value of the biomes record component.
      Returns:
      the value of the biomes record component
    • weight

      public double weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component
    • spec

      public PokemonSpecification spec()
      Returns the value of the spec record component.
      Returns:
      the value of the spec record component
    • lootTable

      public net.minecraft.resources.ResourceLocation lootTable()
      Returns the value of the lootTable record component.
      Returns:
      the value of the lootTable record component
    • stars

      public net.minecraft.util.valueproviders.IntProvider stars()
      Returns the value of the stars record component.
      Returns:
      the value of the stars record component