Record Class BatchDefinition

java.lang.Object
java.lang.Record
net.thomilist.dimensionalinventories.gametest.util.BatchDefinition
All Implemented Interfaces:
net.minecraft.test.TestEnvironmentDefinition

public record BatchDefinition(int batchNumber) extends Record implements net.minecraft.test.TestEnvironmentDefinition
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.test.TestEnvironmentDefinition

    net.minecraft.test.TestEnvironmentDefinition.AllOf, net.minecraft.test.TestEnvironmentDefinition.Function, net.minecraft.test.TestEnvironmentDefinition.GameRules, net.minecraft.test.TestEnvironmentDefinition.TimeOfDay, net.minecraft.test.TestEnvironmentDefinition.Weather
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<BatchDefinition>
     

    Fields inherited from interface net.minecraft.test.TestEnvironmentDefinition

    ENTRY_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    BatchDefinition(int batchNumber)
    Creates an instance of a BatchDefinition record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the batchNumber record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    com.mojang.serialization.MapCodec<BatchDefinition>
     
    final int
    Returns a hash code value for this object.
    void
    setup(net.minecraft.server.world.ServerWorld world)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.test.TestEnvironmentDefinition

    teardown
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<BatchDefinition> CODEC
  • Constructor Details

    • BatchDefinition

      public BatchDefinition(int batchNumber)
      Creates an instance of a BatchDefinition record class.
      Parameters:
      batchNumber - the value for the batchNumber record component
  • Method Details

    • setup

      public void setup(net.minecraft.server.world.ServerWorld world)
      Specified by:
      setup in interface net.minecraft.test.TestEnvironmentDefinition
    • getCodec

      public com.mojang.serialization.MapCodec<BatchDefinition> getCodec()
      Specified by:
      getCodec in interface net.minecraft.test.TestEnvironmentDefinition
    • 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. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      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.
    • batchNumber

      public int batchNumber()
      Returns the value of the batchNumber record component.
      Returns:
      the value of the batchNumber record component