public class Choice
extends java.lang.Object
Choice.ChoiceBuilder because of its automatic use of the handleMap.| Modifier and Type | Class and Description |
|---|---|
static class |
Choice.ChoiceBuilder |
| Modifier and Type | Field and Description |
|---|---|
int |
choiceID
The runtime-unique ID for this choice.
|
java.util.function.Consumer<DialogueChoiceEvent> |
handle |
static java.util.HashMap<java.util.UUID,java.util.HashMap<java.lang.Integer,java.util.function.Consumer<DialogueChoiceEvent>>> |
handleMap
A server-held mapping from
choiceID to the handler of the event. |
java.lang.String |
text
The display text for the choice.
|
| Constructor and Description |
|---|
Choice(net.minecraft.network.PacketBuffer buffer) |
Choice(net.minecraft.network.PacketBuffer buffer,
boolean localized) |
Choice(net.minecraft.network.PacketBuffer buffer,
QuestProgressClient quest) |
Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle) |
Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle,
int choiceID) |
| Modifier and Type | Method and Description |
|---|---|
static Choice.ChoiceBuilder |
builder() |
void |
toBytes(net.minecraft.network.PacketBuffer buffer) |
public static final java.util.HashMap<java.util.UUID,java.util.HashMap<java.lang.Integer,java.util.function.Consumer<DialogueChoiceEvent>>> handleMap
choiceID to the handler of the event. This is used implicitly through
the Choice.ChoiceBuilder, and as such modifying this directly is not recommended.public final int choiceID
public final java.lang.String text
public final java.util.function.Consumer<DialogueChoiceEvent> handle
public Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle)
public Choice(java.lang.String text,
java.util.function.Consumer<DialogueChoiceEvent> handle,
int choiceID)
public Choice(net.minecraft.network.PacketBuffer buffer)
public Choice(net.minecraft.network.PacketBuffer buffer,
boolean localized)
public Choice(net.minecraft.network.PacketBuffer buffer,
QuestProgressClient quest)
public void toBytes(net.minecraft.network.PacketBuffer buffer)
public static Choice.ChoiceBuilder builder()