Record Class ListOperation.ReplaceSection

java.lang.Object
java.lang.Record
net.minecraft.util.collection.ListOperation.ReplaceSection
Record Components:
offset -
size -
All Implemented Interfaces:
ListOperation
Enclosing interface:
ListOperation

public static record ListOperation.ReplaceSection(int offset, Optional<Integer> size) extends Record implements ListOperation
Mappings:
Namespace Name
named net/minecraft/util/collection/ListOperation$ReplaceSection
intermediary net/minecraft/class_9368$class_9372
official erv$d
named offset
intermediary comp_2464
official c
named size
intermediary comp_2465
official d
  • Field Details

    • offset

      private final int offset
      The field for the offset record component.
    • size

      private final Optional<Integer> size
      The field for the size record component.
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/util/collection/ListOperation$ReplaceSection;LOGGER:Lorg/slf4j/Logger;
      intermediary field_49855 Lnet/minecraft/class_9368$class_9372;field_49855:Lorg/slf4j/Logger;
      official e Lerv$d;e:Lorg/slf4j/Logger;
    • CODEC

      public static final com.mojang.serialization.MapCodec<ListOperation.ReplaceSection> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/util/collection/ListOperation$ReplaceSection;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_49854 Lnet/minecraft/class_9368$class_9372;field_49854:Lcom/mojang/serialization/MapCodec;
      official b Lerv$d;b:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • ReplaceSection

      public ReplaceSection(int offset)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/collection/ListOperation$ReplaceSection;<init>(I)V
      intermediary <init> Lnet/minecraft/class_9368$class_9372;<init>(I)V
      official <init> Lerv$d;<init>(I)V
    • ReplaceSection

      public ReplaceSection(int int2, Optional<Integer> optional)
  • Method Details

    • getMode

      public ListOperation.Mode getMode()
      Specified by:
      getMode in interface ListOperation
      Mappings:
      Namespace Name Mixin selector
      named getMode Lnet/minecraft/util/collection/ListOperation;getMode()Lnet/minecraft/util/collection/ListOperation$Mode;
      intermediary method_58191 Lnet/minecraft/class_9368;method_58191()Lnet/minecraft/class_9368$class_9373;
      official a Lerv;a()Lerv$f;
    • apply

      public <T> List<T> apply(List<T> current, List<T> values, int maxSize)
      Specified by:
      apply in interface ListOperation
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/util/collection/ListOperation;apply(Ljava/util/List;Ljava/util/List;I)Ljava/util/List;
      intermediary method_58192 Lnet/minecraft/class_9368;method_58192(Ljava/util/List;Ljava/util/List;I)Ljava/util/List;
      official a Lerv;a(Ljava/util/List;Ljava/util/List;I)Ljava/util/List;
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • offset

      public int offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • size

      public Optional<Integer> size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component