Interface Dialog
- All Superinterfaces:
DialogLike, Holder<Dialog>, Holder.Direct<Dialog>
- All Known Implementing Classes:
Dialog.Confirmation, Dialog.DialogList, Dialog.MultiAction, Dialog.Notice, Dialog.ServerLinks
public sealed interface Dialog
extends Holder.Direct<Dialog>, DialogLike
permits Dialog.Notice, Dialog.ServerLinks, Dialog.DialogList, Dialog.MultiAction, Dialog.Confirmation
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface Holder
Holder.Direct<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NetworkBuffer.Type<Holder<Dialog>> static final Registry<StructCodec<? extends Dialog>> static final NetworkBuffer.Type<Dialog> -
Method Summary
Modifier and TypeMethodDescriptionStructCodec<? extends Dialog> codec()static DynamicRegistry<Dialog> createDefaultRegistry(Registries registries) Creates a new registry for dialogs, loading the vanilla dialogs.static DialogLikeforKey(RegistryKey<Dialog> key) Creates a new adventureDialogLikefor the dialog at the given key.metadata()unwrap(DialogLike dialog) static DialogLike
-
Field Details
-
REGISTRY
-
REGISTRY_CODEC
-
REGISTRY_NETWORK_TYPE
-
NETWORK_TYPE
-
CODEC
-
-
Method Details
-
forKey
Creates a new adventure
DialogLikefor the dialog at the given key.Useful for sending a dialog which has been pre-sent to the client in the Dialog registry.
- Parameters:
key- the key of the dialog (must be registered)- Returns:
- a new
DialogLikefor the dialog at the given key
-
wrap
-
unwrap
-
createDefaultRegistry
Creates a new registry for dialogs, loading the vanilla dialogs.
- See Also:
-
metadata
DialogMetadata metadata() -
codec
StructCodec<? extends Dialog> codec()
-