Record Class ChunkResult.Fail<T>
java.lang.Object
java.lang.Record
net.minecraft.server.level.ChunkResult.Fail<T>
- All Implemented Interfaces:
ChunkResult<T>
- Enclosing interface:
ChunkResult<T>
public static record ChunkResult.Fail<T>(Supplier<String> error)
extends Record
implements ChunkResult<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ChunkResult
ChunkResult.Fail<T>, ChunkResult.Success<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.getError()final inthashCode()Returns a hash code value for this object.boolean<R> ChunkResult<R> @Nullable TorElseThrow(Supplier<E> exceptionSupplier) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
error
-
-
Constructor Details
-
Fail
-
-
Method Details
-
isSuccess
public boolean isSuccess()- Specified by:
isSuccessin interfaceChunkResult<T>
-
orElse
- Specified by:
orElsein interfaceChunkResult<T>
-
getError
- Specified by:
getErrorin interfaceChunkResult<T>
-
ifSuccess
- Specified by:
ifSuccessin interfaceChunkResult<T>
-
map
- Specified by:
mapin interfaceChunkResult<T>
-
orElseThrow
- Specified by:
orElseThrowin interfaceChunkResult<T>- Throws:
E
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
error
-