Search in sources :

Example 1 with ITraitInstance

use of net.silentchaos512.gear.api.traits.ITraitInstance in project Silent-Gear by SilentChaos512.

the class MaterialBuilder method trait.

@Deprecated
public MaterialBuilder trait(PartType partType, ResourceLocation traitId, int level, ITraitCondition... conditions) {
    ITraitInstance inst = TraitInstance.lazy(traitId, level, conditions);
    List<ITraitInstance> list = traits.computeIfAbsent(partType, pt -> new ArrayList<>());
    list.add(inst);
    return this;
}
Also used : ITraitInstance(net.silentchaos512.gear.api.traits.ITraitInstance)

Example 2 with ITraitInstance

use of net.silentchaos512.gear.api.traits.ITraitInstance in project Silent-Gear by SilentChaos512.

the class PartBuilder method trait.

public PartBuilder trait(DataResource<ITrait> trait, int level, ITraitCondition... conditions) {
    ITraitInstance inst = TraitInstance.of(trait, level, conditions);
    this.traits.add(inst);
    return this;
}
Also used : ITraitInstance(net.silentchaos512.gear.api.traits.ITraitInstance)

Example 3 with ITraitInstance

use of net.silentchaos512.gear.api.traits.ITraitInstance in project Silent-Gear by SilentChaos512.

the class MaterialBuilder method trait.

public MaterialBuilder trait(PartType partType, DataResource<ITrait> trait, int level, ITraitCondition... conditions) {
    ITraitInstance inst = TraitInstance.of(trait, level, conditions);
    List<ITraitInstance> list = traits.computeIfAbsent(partType, pt -> new ArrayList<>());
    list.add(inst);
    return this;
}
Also used : ITraitInstance(net.silentchaos512.gear.api.traits.ITraitInstance)

Aggregations

ITraitInstance (net.silentchaos512.gear.api.traits.ITraitInstance)3