@MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault public abstract class StringSerializableTrigger<T> extends CriterionTriggerBase<StringSerializableTrigger.Instance<T>>
| Modifier and Type | Class and Description |
|---|---|
static class |
StringSerializableTrigger.Instance<T> |
listeners| Modifier | Constructor and Description |
|---|---|
protected |
StringSerializableTrigger(java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
ITriggerable |
constructTriggerFor(T entry) |
StringSerializableTrigger.Instance<T> |
createInstance(com.google.gson.JsonObject json,
net.minecraft.loot.ConditionArrayParser context) |
StringSerializableTrigger.Instance<T> |
forEntries(T... entries) |
protected java.lang.String |
getJsonKey() |
protected abstract java.lang.String |
getKey(T value) |
protected abstract T |
getValue(java.lang.String key) |
void |
trigger(net.minecraft.entity.player.ServerPlayerEntity player,
T registryEntry) |
addPlayerListener, getId, removePlayerListener, removePlayerListeners, triggerprotected StringSerializableTrigger(java.lang.String id)
protected java.lang.String getJsonKey()
@SafeVarargs public final StringSerializableTrigger.Instance<T> forEntries(@Nullable T... entries)
public void trigger(net.minecraft.entity.player.ServerPlayerEntity player,
@Nullable
T registryEntry)
public ITriggerable constructTriggerFor(@Nullable T entry)
public StringSerializableTrigger.Instance<T> createInstance(com.google.gson.JsonObject json, net.minecraft.loot.ConditionArrayParser context)
@Nullable protected abstract T getValue(java.lang.String key)
@Nullable protected abstract java.lang.String getKey(T value)