public class Criterion
extends java.lang.Object
| Constructor and Description |
|---|
Criterion() |
Criterion(ICriterionInstance p_i47470_1_) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,Criterion> |
criteriaFromJson(JsonObject json,
JsonDeserializationContext context)
Read criteria from
json. |
static java.util.Map<java.lang.String,Criterion> |
criteriaFromNetwork(PacketBuffer bus)
Read criteria from
buf. |
static Criterion |
criterionFromJson(JsonObject json,
JsonDeserializationContext context)
Deserialize a single
Criterion from json. |
static Criterion |
criterionFromNetwork(PacketBuffer p_192146_0_) |
ICriterionInstance |
getCriterionInstance() |
static void |
serializeToNetwork(java.util.Map<java.lang.String,Criterion> criteria,
PacketBuffer buf)
Write
criteria to buf. |
void |
serializeToNetwork(PacketBuffer p_192140_1_) |
public Criterion(ICriterionInstance p_i47470_1_)
public Criterion()
public void serializeToNetwork(PacketBuffer p_192140_1_)
public static Criterion criterionFromJson(JsonObject json, JsonDeserializationContext context)
Criterion from json. The ICriterionTrigger is chosen by the
"trigger" property of the object, which can then handle the optional "conditions" in the object.
The "conditions", if present, must be a JsonObject. The resulting ICriterionInstance is
wrapped in a Criterion.json - the JsonObject to deserialize fromcontext - the JsonDeserializationContext to deserialize inCriterion.ICriterionTrigger.deserializeInstance(JsonObject, JsonDeserializationContext)public static Criterion criterionFromNetwork(PacketBuffer p_192146_0_)
public static java.util.Map<java.lang.String,Criterion> criteriaFromJson(JsonObject json, JsonDeserializationContext context)
json. The keys of the object name the criteria, and the values (which must be objects)
are the criteria themselves.json - the JsonObject to deserialize fromcontext - the JsonDeserializationContext to deserialize inCriterion and its name.criterionFromJson(JsonObject, JsonDeserializationContext)public static java.util.Map<java.lang.String,Criterion> criteriaFromNetwork(PacketBuffer bus)
buf.bus - the PacketBuffer to read fromCriterion and its name.serializeToNetwork(Map, PacketBuffer)public static void serializeToNetwork(java.util.Map<java.lang.String,Criterion> criteria, PacketBuffer buf)
criteria to buf.criteria - the criteria to write to buf. Each key-value pair consists of a Criterion and its
name.buf - the PacketBuffer to write tocriteriaFromNetwork(PacketBuffer)public ICriterionInstance getCriterionInstance()