Record Class OptionalChunk.ActualChunk<T>

java.lang.Object
java.lang.Record
net.minecraft.server.world.OptionalChunk.ActualChunk<T>
Record Components:
value -
All Implemented Interfaces:
OptionalChunk<T>
Enclosing interface:
OptionalChunk<T>

public static record OptionalChunk.ActualChunk<T>(T value) extends Record implements OptionalChunk<T>
Mappings:
Namespace Name
named net/minecraft/server/world/OptionalChunk$ActualChunk
intermediary net/minecraft/class_9259$class_9261
official arn$b
named value
intermediary comp_2368
official a
  • Field Details

    • value

      private final T value
      The field for the value record component.
  • Constructor Details

    • ActualChunk

      public ActualChunk(T t)
  • Method Details

    • isPresent

      public boolean isPresent()
      Specified by:
      isPresent in interface OptionalChunk<T>
      Mappings:
      Namespace Name Mixin selector
      named isPresent Lnet/minecraft/server/world/OptionalChunk;isPresent()Z
      intermediary method_57122 Lnet/minecraft/class_9259;method_57122()Z
      official a Larn;a()Z
    • orElse

      public T orElse(@Nullable T other)
      Specified by:
      orElse in interface OptionalChunk<T>
      Mappings:
      Namespace Name Mixin selector
      named orElse Lnet/minecraft/server/world/OptionalChunk;orElse(Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_57130 Lnet/minecraft/class_9259;method_57130(Ljava/lang/Object;)Ljava/lang/Object;
      official b Larn;b(Ljava/lang/Object;)Ljava/lang/Object;
    • getError

      @Nullable public @Nullable String getError()
      Specified by:
      getError in interface OptionalChunk<T>
      Mappings:
      Namespace Name Mixin selector
      named getError Lnet/minecraft/server/world/OptionalChunk;getError()Ljava/lang/String;
      intermediary method_57129 Lnet/minecraft/class_9259;method_57129()Ljava/lang/String;
      official b Larn;b()Ljava/lang/String;
    • ifPresent

      public OptionalChunk<T> ifPresent(Consumer<T> callback)
      Specified by:
      ifPresent in interface OptionalChunk<T>
      Mappings:
      Namespace Name Mixin selector
      named ifPresent Lnet/minecraft/server/world/OptionalChunk;ifPresent(Ljava/util/function/Consumer;)Lnet/minecraft/server/world/OptionalChunk;
      intermediary method_57126 Lnet/minecraft/class_9259;method_57126(Ljava/util/function/Consumer;)Lnet/minecraft/class_9259;
      official a Larn;a(Ljava/util/function/Consumer;)Larn;
    • map

      public <R> OptionalChunk<R> map(Function<T,R> mapper)
      Specified by:
      map in interface OptionalChunk<T>
      Mappings:
      Namespace Name Mixin selector
      named map Lnet/minecraft/server/world/OptionalChunk;map(Ljava/util/function/Function;)Lnet/minecraft/server/world/OptionalChunk;
      intermediary method_57127 Lnet/minecraft/class_9259;method_57127(Ljava/util/function/Function;)Lnet/minecraft/class_9259;
      official a Larn;a(Ljava/util/function/Function;)Larn;
    • orElseThrow

      public <E extends Throwable> T orElseThrow(Supplier<E> exceptionSupplier) throws E
      Specified by:
      orElseThrow in interface OptionalChunk<T>
      Throws:
      E
      Mappings:
      Namespace Name Mixin selector
      named orElseThrow Lnet/minecraft/server/world/OptionalChunk;orElseThrow(Ljava/util/function/Supplier;)Ljava/lang/Object;
      intermediary method_57132 Lnet/minecraft/class_9259;method_57132(Ljava/util/function/Supplier;)Ljava/lang/Object;
      official b Larn;b(Ljava/util/function/Supplier;)Ljava/lang/Object;
    • 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.
    • value

      public T value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component