use of net.silentchaos512.gear.gear.trait.condition.GearTypeTraitCondition in project Silent-Gear by SilentChaos512.
the class TraitBuilder method withGearTypeCondition.
public TraitBuilder withGearTypeCondition(GearType first, GearType... rest) {
if (rest.length > 0) {
Collection<GearType> types = new ArrayList<>(rest.length + 1);
types.add(first);
Collections.addAll(types, rest);
GearTypeTraitCondition[] values = types.stream().map(GearTypeTraitCondition::new).toArray(GearTypeTraitCondition[]::new);
return withConditions(new OrTraitCondition(values));
}
return withConditions(new GearTypeTraitCondition(first));
}
use of net.silentchaos512.gear.gear.trait.condition.GearTypeTraitCondition in project Silent-Gear by SilentChaos512.
the class MaterialsProvider method addClothLikes.
private void addClothLikes(Collection<MaterialBuilder> ret) {
// Phantom Membrane
ret.add(new MaterialBuilder(modId("phantom_membrane"), 2, Items.PHANTOM_MEMBRANE).categories(MaterialCategories.ORGANIC, MaterialCategories.CLOTH).mainStatsCommon(0, 12, 10, 35, 0.7f).stat(PartType.MAIN, ItemStats.ARMOR_DURABILITY, GearType.ELYTRA, 17).mainStatsArmor(1, 2, 2, 1, 0, // 6
8).trait(PartType.MAIN, Const.Traits.RENEW, 2, new MaterialRatioTraitCondition(0.5f)).stat(PartType.GRIP, ItemStats.REPAIR_EFFICIENCY, 0.15f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.HARVEST_SPEED, 0.1f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.ATTACK_SPEED, 0.2f, StatInstance.Operation.ADD).stat(PartType.GRIP, ItemStats.RARITY, 8, StatInstance.Operation.ADD).trait(PartType.GRIP, Const.Traits.ANCIENT, 2).stat(PartType.LINING, ItemStats.ARMOR_DURABILITY, 4, StatInstance.Operation.ADD).trait(PartType.LINING, Const.Traits.LIGHT, 2).displayAll(PartTextureSet.LOW_CONTRAST, 0xC3B9A1).displayFragment(PartTextures.CLOTH, 0xC3B9A1));
// Fine Silk Cloth
ret.add(new MaterialBuilder(modId("fine_silk_cloth"), 2, CraftingItems.FINE_SILK_CLOTH).categories(MaterialCategories.ORGANIC, MaterialCategories.CLOTH).mainStatsCommon(0, 14, 14, 40, 0.9f).stat(PartType.MAIN, ItemStats.ARMOR_DURABILITY, GearType.ELYTRA, 18).mainStatsArmor(1, 2, 2, 1, 0, // 6
14).trait(PartType.MAIN, Const.Traits.SNOW_WALKER, 1, new GearTypeTraitCondition(GearType.BOOTS)).stat(PartType.GRIP, ItemStats.REPAIR_EFFICIENCY, 0.1f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.HARVEST_SPEED, 0.15f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.RARITY, 10, StatInstance.Operation.ADD).trait(PartType.GRIP, Const.Traits.ACCELERATE, 1).stat(PartType.LINING, ItemStats.ARMOR_DURABILITY, 5, StatInstance.Operation.ADD).stat(PartType.LINING, ItemStats.MAGIC_ARMOR, 2, StatInstance.Operation.ADD).trait(PartType.LINING, Const.Traits.FLEXIBLE, 3).displayAll(PartTextureSet.LOW_CONTRAST, 0xC3B9A1).displayFragment(PartTextures.CLOTH, 0xC3B9A1));
// Leather
ret.add(new MaterialBuilder(modId("leather"), 0, Tags.Items.LEATHER).categories(MaterialCategories.ORGANIC, MaterialCategories.CLOTH).mainStatsCommon(0, 5, 15, 11, 0.8f).mainStatsArmor(1, 3, 2, 1, 0, // 7
8).trait(PartType.MAIN, Const.Traits.SNOW_WALKER, 1, new GearTypeTraitCondition(GearType.BOOTS)).stat(PartType.GRIP, ItemStats.DURABILITY, 0.05f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.REPAIR_EFFICIENCY, 0.1f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.HARVEST_SPEED, 0.15f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.ATTACK_SPEED, 0.15f, StatInstance.Operation.ADD).stat(PartType.GRIP, ItemStats.RARITY, 5, StatInstance.Operation.ADD).trait(PartType.GRIP, Const.Traits.FLEXIBLE, 3).stat(PartType.LINING, ItemStats.ARMOR_DURABILITY, 1f, StatInstance.Operation.ADD).trait(PartType.LINING, Const.Traits.FLEXIBLE, 2).displayAll(PartTextureSet.LOW_CONTRAST, 0x805133).displayFragment(PartTextures.CLOTH, 0x805133));
// Wool
ExclusionIngredient woolIngredient = ExclusionIngredient.of(ItemTags.WOOL, Items.BLACK_WOOL, Items.BLUE_WOOL, Items.BROWN_WOOL, Items.CYAN_WOOL, Items.GRAY_WOOL, Items.GREEN_WOOL, Items.LIGHT_BLUE_WOOL, Items.LIGHT_GRAY_WOOL, Items.LIME_WOOL, Items.MAGENTA_WOOL, Items.ORANGE_WOOL, Items.PINK_WOOL, Items.PURPLE_WOOL, Items.RED_WOOL, Items.WHITE_WOOL, Items.YELLOW_WOOL);
ret.add(new MaterialBuilder(Const.Materials.WOOL.getId(), 0, woolIngredient).categories(MaterialCategories.ORGANIC, MaterialCategories.CLOTH).mainStatsCommon(0, 4, 7, 7, 0.7f).mainStatsArmor(0.5f, 2f, 1.0f, 0.5f, 0, // 4
4).trait(PartType.MAIN, Const.Traits.SNOW_WALKER, 1, new GearTypeTraitCondition(GearType.BOOTS)).stat(PartType.GRIP, ItemStats.REPAIR_EFFICIENCY, 0.2f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.HARVEST_SPEED, 0.1f, StatInstance.Operation.MUL1).stat(PartType.GRIP, ItemStats.ATTACK_SPEED, 0.2f, StatInstance.Operation.ADD).stat(PartType.GRIP, ItemStats.RARITY, 4, StatInstance.Operation.ADD).trait(PartType.GRIP, Const.Traits.FLEXIBLE, 1).stat(PartType.LINING, ItemStats.KNOCKBACK_RESISTANCE, 0.1f, StatInstance.Operation.ADD).trait(PartType.LINING, Const.Traits.FLEXIBLE, 1).displayAll(PartTextureSet.LOW_CONTRAST, Color.VALUE_WHITE).displayFragment(PartTextures.CLOTH, Color.VALUE_WHITE));
ret.add(wool("black", Items.BLACK_WOOL, 0x141519));
ret.add(wool("blue", Items.BLUE_WOOL, 0x35399D));
ret.add(wool("brown", Items.BROWN_WOOL, 0x724728));
ret.add(wool("cyan", Items.CYAN_WOOL, 0x158991));
ret.add(wool("gray", Items.GRAY_WOOL, 0x3E4447));
ret.add(wool("green", Items.GREEN_WOOL, 0x546D1B));
ret.add(wool("light_blue", Items.LIGHT_BLUE_WOOL, 0x3AAFD9));
ret.add(wool("light_gray", Items.LIGHT_GRAY_WOOL, 0x8E8E86));
ret.add(wool("lime", Items.LIME_WOOL, 0x70B919));
ret.add(wool("magenta", Items.MAGENTA_WOOL, 0xBD44B3));
ret.add(wool("orange", Items.ORANGE_WOOL, 0xF07613));
ret.add(wool("pink", Items.PINK_WOOL, 0xED8DAC));
ret.add(wool("purple", Items.PURPLE_WOOL, 0x792AAC));
ret.add(wool("red", Items.RED_WOOL, 0xA12722));
ret.add(wool("white", Items.WHITE_WOOL, 0xE9ECEC));
ret.add(wool("yellow", Items.YELLOW_WOOL, 0xF8C627));
}
Aggregations