Record Class OptionalChunk.LoadFailure<T>

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

public static record OptionalChunk.LoadFailure<T>(Supplier<String> error) extends Record implements OptionalChunk<T>
Mappings:
Namespace Name
named net/minecraft/server/world/OptionalChunk$LoadFailure
intermediary net/minecraft/class_9259$class_9260
official arn$a
named error
intermediary comp_2367
official a
  • Field Details

  • Constructor Details

  • 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

      @Nullable 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

      public 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.
    • error

      public Supplier<String> error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component