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 aqc$b
named value
intermediary comp_2368
official a
  • Field Details Link icon

    • value Link icon

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

    • ActualChunk Link icon

      public ActualChunk(T t)
  • Method Details Link icon

    • isPresent Link icon

      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 Laqc;a()Z
    • orElse Link icon

      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 Laqc;b(Ljava/lang/Object;)Ljava/lang/Object;
    • getError Link icon

      @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 Laqc;b()Ljava/lang/String;
    • ifPresent Link icon

      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 Laqc;a(Ljava/util/function/Consumer;)Laqc;
    • map Link icon

      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 Laqc;a(Ljava/util/function/Function;)Laqc;
    • orElseThrow Link icon

      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 Laqc;b(Ljava/util/function/Supplier;)Ljava/lang/Object;
    • toString Link icon

      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 Link icon

      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 Link icon

      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 Link icon

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