Search in sources :

Example 1 with Instance

use of mods.railcraft.common.advancements.criterion.SpikeMaulUseTrigger.Instance in project Railcraft by Railcraft.

the class SpikeMaulUseTrigger method deserializeInstance.

@Override
public Instance deserializeInstance(JsonObject json, JsonDeserializationContext context) {
    NBTPredicate nbt = JsonTools.whenPresent(json, "nbt", NBTPredicate::deserialize, NBTPredicate.ANY);
    ItemPredicate tool = JsonTools.whenPresent(json, "tool", ItemPredicate::deserialize, ItemPredicate.ANY);
    LocationPredicate locationPredicate = JsonTools.whenPresent(json, "location", LocationPredicate::deserialize, LocationPredicate.ANY);
    return new Instance(nbt, tool, locationPredicate);
}
Also used : ItemPredicate(net.minecraft.advancements.critereon.ItemPredicate) Instance(mods.railcraft.common.advancements.criterion.SpikeMaulUseTrigger.Instance) ICriterionInstance(net.minecraft.advancements.ICriterionInstance) NBTPredicate(net.minecraft.advancements.critereon.NBTPredicate) LocationPredicate(net.minecraft.advancements.critereon.LocationPredicate)

Aggregations

Instance (mods.railcraft.common.advancements.criterion.SpikeMaulUseTrigger.Instance)1 ICriterionInstance (net.minecraft.advancements.ICriterionInstance)1 ItemPredicate (net.minecraft.advancements.critereon.ItemPredicate)1 LocationPredicate (net.minecraft.advancements.critereon.LocationPredicate)1 NBTPredicate (net.minecraft.advancements.critereon.NBTPredicate)1