Search in sources :

Example 1 with CriterionTriggerInstance

use of net.minecraft.advancements.CriterionTriggerInstance in project SpongeCommon by SpongePowered.

the class SpongeCriterionBuilder method build0.

@SuppressWarnings("ConstantConditions")
@Override
AdvancementCriterion build0() {
    CriterionTriggerInstance trigger = (CriterionTriggerInstance) this.trigger;
    if (this.trigger == null) {
        trigger = SpongeDummyTrigger.Instance.dummy();
    }
    final Criterion criterion = new Criterion(trigger);
    ((CriterionBridge) criterion).bridge$setName(this.name);
    return (AdvancementCriterion) criterion;
}
Also used : CriterionTriggerInstance(net.minecraft.advancements.CriterionTriggerInstance) Criterion(net.minecraft.advancements.Criterion) AdvancementCriterion(org.spongepowered.api.advancement.criteria.AdvancementCriterion) AdvancementCriterion(org.spongepowered.api.advancement.criteria.AdvancementCriterion) CriterionBridge(org.spongepowered.common.bridge.advancements.CriterionBridge)

Aggregations

Criterion (net.minecraft.advancements.Criterion)1 CriterionTriggerInstance (net.minecraft.advancements.CriterionTriggerInstance)1 AdvancementCriterion (org.spongepowered.api.advancement.criteria.AdvancementCriterion)1 CriterionBridge (org.spongepowered.common.bridge.advancements.CriterionBridge)1