Record Class TestEnvironmentDefinition.GameRules

java.lang.Object
java.lang.Record
net.minecraft.test.TestEnvironmentDefinition.GameRules
Record Components:
gameRulesMap -
All Implemented Interfaces:
TestEnvironmentDefinition
Enclosing interface:
TestEnvironmentDefinition

public static record TestEnvironmentDefinition.GameRules(ServerGameRules gameRulesMap) extends Record implements TestEnvironmentDefinition
Mappings:
Namespace Name
named net/minecraft/test/TestEnvironmentDefinition$GameRules
intermediary net/minecraft/class_10665$class_10668
official tv$c
named gameRulesMap
intermediary comp_5194
official d
  • Field Details

    • gameRulesMap

      private final ServerGameRules gameRulesMap
      The field for the gameRulesMap record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<TestEnvironmentDefinition.GameRules> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/test/TestEnvironmentDefinition$GameRules;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_56205 Lnet/minecraft/class_10665$class_10668;field_56205:Lcom/mojang/serialization/MapCodec;
      official c Ltv$c;c:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • GameRules

      public GameRules(ServerGameRules gameRulesMap)
      Creates an instance of a GameRules record class.
      Parameters:
      gameRulesMap - the value for the gameRulesMap record component
  • Method Details

    • setup

      public void setup(ServerWorld world)
      Specified by:
      setup in interface TestEnvironmentDefinition
      Mappings:
      Namespace Name Mixin selector
      named setup Lnet/minecraft/test/TestEnvironmentDefinition;setup(Lnet/minecraft/server/world/ServerWorld;)V
      intermediary method_67051 Lnet/minecraft/class_10665;method_67051(Lnet/minecraft/class_3218;)V
      official a Ltv;a(Laxf;)V
    • teardown

      public void teardown(ServerWorld world)
      Specified by:
      teardown in interface TestEnvironmentDefinition
      Mappings:
      Namespace Name Mixin selector
      named teardown Lnet/minecraft/test/TestEnvironmentDefinition;teardown(Lnet/minecraft/server/world/ServerWorld;)V
      intermediary method_67054 Lnet/minecraft/class_10665;method_67054(Lnet/minecraft/class_3218;)V
      official b Ltv;b(Laxf;)V
    • resetValue

      private <T> void resetValue(ServerWorld serverWorld, GameRule<T> rule)
      Mappings:
      Namespace Name Mixin selector
      named resetValue Lnet/minecraft/test/TestEnvironmentDefinition$GameRules;resetValue(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/rule/GameRule;)V
      intermediary method_76326 Lnet/minecraft/class_10665$class_10668;method_76326(Lnet/minecraft/class_3218;Lnet/minecraft/class_12279;)V
      official a Ltv$c;a(Laxf;Lesn;)V
    • getCodec

      public com.mojang.serialization.MapCodec<TestEnvironmentDefinition.GameRules> getCodec()
      Specified by:
      getCodec in interface TestEnvironmentDefinition
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/test/TestEnvironmentDefinition;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_67050 Lnet/minecraft/class_10665;method_67050()Lcom/mojang/serialization/MapCodec;
      official a Ltv;a()Lcom/mojang/serialization/MapCodec;
    • 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 object)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • gameRulesMap

      public ServerGameRules gameRulesMap()
      Returns the value of the gameRulesMap record component.
      Returns:
      the value of the gameRulesMap record component