Skip to content

Commit

Permalink
Merge pull request #70 from nvb-uy/1.20.1
Browse files Browse the repository at this point in the history
Backport of 1.21.1 Features
  • Loading branch information
ZsoltMolnarrr authored Jan 16, 2025
2 parents 9153497 + 2ee4fa9 commit c7dd766
Show file tree
Hide file tree
Showing 47 changed files with 509 additions and 55 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.4.0

- Added Netherite Tier Armors, by ElocinDev (@nvb-uy)
- Wizard Set now gives +20% of each element instead of +1, by ElocinDev (@nvb-uy)
- Backported default attribute values for wands and staves, by ElocinDev (@nvb-uy)

# 1.3.0

- Increased velocity for tier 1 projectile spells
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ group = project.maven_group

repositories {
maven { url 'https://jitpack.io' }
maven { url 'https://libs.azuredoom.com:4443/mods' }
maven { url 'https://maven.azuredoom.com/mods' }
maven { url 'https://maven.terraformersmc.com/' }
maven {
name = 'Modrinth'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fabric_api_version=0.87.0+1.20.1
# Mod
maven_group=net
archives_base_name=wizards
mod_version=1.3.0
mod_version=1.4.0

# Dependencies
trinkets_version=3.7.1
Expand Down
221 changes: 188 additions & 33 deletions src/main/java/net/wizards/item/Armors.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,100 @@ public class Armors {
Items.RED_WOOL,
Items.BLACK_WOOL);
};

private static final Supplier<Ingredient> NETHERITE_INGREDIENTS = () -> { return Ingredient.ofItems(Items.NETHERITE_INGOT); };

public static Armor.CustomMaterial material_wizard = new Armor.CustomMaterial(
"wizard_robe",
10,
9,
WizardArmor.equipSound,
WOOL_INGREDIENTS
);

public static Armor.CustomMaterial material_arcane = new Armor.CustomMaterial(
"arcane_robe",
20,
10,
WizardArmor.equipSound,
WOOL_INGREDIENTS
);

public static Armor.CustomMaterial material_fire = new Armor.CustomMaterial(
"fire_robe",
20,
10,
WizardArmor.equipSound,
WOOL_INGREDIENTS
);

public static Armor.CustomMaterial material_frost = new Armor.CustomMaterial(
"frost_robe",
20,
10,
WizardArmor.equipSound,
WOOL_INGREDIENTS
);

public static Armor.CustomMaterial material_netherite_frost = new Armor.CustomMaterial(
"netherite_frost_robe",
30,
15,
WizardArmor.equipSound,
NETHERITE_INGREDIENTS
);

public static Armor.CustomMaterial material_netherite_arcane = new Armor.CustomMaterial(
"netherite_arcane_robe",
30,
15,
WizardArmor.equipSound,
NETHERITE_INGREDIENTS
);

public static Armor.CustomMaterial material_netherite_fire = new Armor.CustomMaterial(
"netherite_fire_robe",
30,
15,
WizardArmor.equipSound,
NETHERITE_INGREDIENTS
);

public static final ArrayList<Armor.Entry> entries = new ArrayList<>();
private static Armor.Entry create(Armor.CustomMaterial material, ItemConfig.ArmorSet defaults) {
return new Armor.Entry(material, null, defaults);
}

public static float wizardRobeSpellPower = 0.20F;

public static final Armor.Set wizardRobeSet =
create(
new Armor.CustomMaterial(
"wizard_robe",
10,
9,
WizardArmor.equipSound,
WOOL_INGREDIENTS
),
material_wizard,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(ItemConfig.Attribute.bonuses(List.of(SpellSchools.ARCANE.id, SpellSchools.FIRE.id, SpellSchools.FROST.id), 1)),
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, wizardRobeSpellPower)
)),
new ItemConfig.ArmorSet.Piece(3)
.addAll(ItemConfig.Attribute.bonuses(List.of(SpellSchools.ARCANE.id, SpellSchools.FIRE.id, SpellSchools.FROST.id), 1)),
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, wizardRobeSpellPower)
)),
new ItemConfig.ArmorSet.Piece(2)
.addAll(ItemConfig.Attribute.bonuses(List.of(SpellSchools.ARCANE.id, SpellSchools.FIRE.id, SpellSchools.FROST.id), 1)),
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, wizardRobeSpellPower)
)),
new ItemConfig.ArmorSet.Piece(1)
.addAll(ItemConfig.Attribute.bonuses(List.of(SpellSchools.ARCANE.id, SpellSchools.FIRE.id, SpellSchools.FROST.id), 1))
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, wizardRobeSpellPower),
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, wizardRobeSpellPower)
))
))
.bundle(material -> new Armor.Set(WizardsMod.ID,
new WizardArmor(material, ArmorItem.Type.HELMET, new Item.Settings()),
Expand All @@ -70,19 +140,14 @@ private static Armor.Entry create(Armor.CustomMaterial material, ItemConfig.Armo


private static final float specializedRobeSpellPower = 0.25F;
private static final float specializedNetheriteRobeSpellPower = 0.30F;
private static final float specializedRobeCritDamage = 0.1F;
private static final float specializedRobeCritChance = 0.02F;
private static final float specializedRobeHaste = 0.03F;

public static final Armor.Set arcaneRobeSet =
create(
new Armor.CustomMaterial(
"arcane_robe",
20,
10,
WizardArmor.equipSound,
WOOL_INGREDIENTS
),
material_arcane,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
Expand Down Expand Up @@ -116,13 +181,7 @@ private static Armor.Entry create(Armor.CustomMaterial material, ItemConfig.Armo

public static final Armor.Set fireRobeSet =
create(
new Armor.CustomMaterial(
"fire_robe",
20,
10,
WizardArmor.equipSound,
WOOL_INGREDIENTS
),
material_fire,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
Expand Down Expand Up @@ -156,13 +215,7 @@ private static Armor.Entry create(Armor.CustomMaterial material, ItemConfig.Armo

public static final Armor.Set frostRobeSet =
create(
new Armor.CustomMaterial(
"frost_robe",
20,
10,
WizardArmor.equipSound,
WOOL_INGREDIENTS
),
material_frost,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
Expand Down Expand Up @@ -192,7 +245,109 @@ private static Armor.Entry create(Armor.CustomMaterial material, ItemConfig.Armo
new WizardArmor(material, ArmorItem.Type.BOOTS, new Item.Settings())
))
.put(entries)
.armorSet();
.armorSet();

public static final Armor.Set netherite_arcaneRobeSet =
create(
material_netherite_arcane,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.HASTE.id, specializedRobeHaste)
)),
new ItemConfig.ArmorSet.Piece(3)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.HASTE.id, specializedRobeHaste)
)),
new ItemConfig.ArmorSet.Piece(2)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.HASTE.id, specializedRobeHaste)
)),
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.ARCANE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.HASTE.id, specializedRobeHaste)
))
))
.bundle(material -> new Armor.Set(WizardsMod.ID,
new WizardArmor(material, ArmorItem.Type.HELMET, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.CHESTPLATE, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.LEGGINGS, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.BOOTS, new Item.Settings())
))
.put(entries)
.armorSet();

public static final Armor.Set netherite_fireRobeSet =
create(
material_netherite_fire,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_CHANCE.id, specializedRobeCritChance)
)),
new ItemConfig.ArmorSet.Piece(3)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_CHANCE.id, specializedRobeCritChance)
)),
new ItemConfig.ArmorSet.Piece(2)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_CHANCE.id, specializedRobeCritChance)
)),
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FIRE.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_CHANCE.id, specializedRobeCritChance)
))
))
.bundle(material -> new Armor.Set(WizardsMod.ID,
new WizardArmor(material, ArmorItem.Type.HELMET, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.CHESTPLATE, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.LEGGINGS, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.BOOTS, new Item.Settings())
))
.put(entries)
.armorSet();

public static final Armor.Set netherite_frostRobeSet =
create(
material_netherite_frost,
ItemConfig.ArmorSet.with(
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_DAMAGE.id, specializedRobeCritDamage)
)),
new ItemConfig.ArmorSet.Piece(3)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_DAMAGE.id, specializedRobeCritDamage)
)),
new ItemConfig.ArmorSet.Piece(2)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_DAMAGE.id, specializedRobeCritDamage)
)),
new ItemConfig.ArmorSet.Piece(1)
.addAll(List.of(
ItemConfig.Attribute.multiply(SpellSchools.FROST.id, specializedNetheriteRobeSpellPower),
ItemConfig.Attribute.multiply(SpellPowerMechanics.CRITICAL_DAMAGE.id, specializedRobeCritDamage)
))
))
.bundle(material -> new Armor.Set(WizardsMod.ID,
new WizardArmor(material, ArmorItem.Type.HELMET, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.CHESTPLATE, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.LEGGINGS, new Item.Settings()),
new WizardArmor(material, ArmorItem.Type.BOOTS, new Item.Settings())
))
.put(entries)
.armorSet();

public static void register(Map<String, ItemConfig.ArmorSet> configs) {
Armor.register(configs, entries, Group.KEY);
Expand Down
38 changes: 19 additions & 19 deletions src/main/java/net/wizards/item/Weapons.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,26 @@ private static Weapon.Entry wand(String name, Weapon.CustomMaterial material) {

public static final Weapon.Entry noviceWand = wand("wand_novice",
Weapon.CustomMaterial.matching(ToolMaterials.WOOD, () -> Ingredient.ofItems(Items.STICK)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 1));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 3));
public static final Weapon.Entry arcaneWand = wand("wand_arcane",
Weapon.CustomMaterial.matching(ToolMaterials.IRON, () -> Ingredient.ofItems(Items.GOLD_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 2));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 4));
public static final Weapon.Entry fireWand = wand("wand_fire",
Weapon.CustomMaterial.matching(ToolMaterials.IRON, () -> Ingredient.ofItems(Items.GOLD_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 2));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 4));
public static final Weapon.Entry frostWand = wand("wand_frost",
Weapon.CustomMaterial.matching(ToolMaterials.IRON, () -> Ingredient.ofItems(Items.IRON_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 2));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 4));

public static final Weapon.Entry netheriteArcaneWand = wand("wand_netherite_arcane",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 3));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 4.5F));
public static final Weapon.Entry netheriteFireWand = wand("wand_netherite_fire",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 3));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 4.5F));
public static final Weapon.Entry netheriteFrostWand = wand("wand_netherite_frost",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 3));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 4.5F));


// MARK: Staves
Expand All @@ -101,28 +101,28 @@ private static Weapon.Entry staff(String requiredMod, String name, Weapon.Custom

public static final Weapon.Entry wizardStaff = staff("staff_wizard",
Weapon.CustomMaterial.matching(ToolMaterials.IRON, () -> Ingredient.ofItems(Items.STICK)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 3))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 3))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 3));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 4))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 4))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 4));
public static final Weapon.Entry arcaneStaff = staff("staff_arcane",
Weapon.CustomMaterial.matching(ToolMaterials.DIAMOND, () -> Ingredient.ofItems(Items.GOLD_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 4));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 5));
public static final Weapon.Entry fireStaff = staff("staff_fire",
Weapon.CustomMaterial.matching(ToolMaterials.DIAMOND, () -> Ingredient.ofItems(Items.GOLD_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 4));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 5));
public static final Weapon.Entry frostStaff = staff("staff_frost",
Weapon.CustomMaterial.matching(ToolMaterials.DIAMOND, () -> Ingredient.ofItems(Items.IRON_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 4));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 5));

public static final Weapon.Entry netheriteArcaneStaff = staff("staff_netherite_arcane",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 5));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 6));
public static final Weapon.Entry netheriteFireStaff = staff("staff_netherite_fire",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 5));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 6));
public static final Weapon.Entry netheriteFrostStaff = staff("staff_netherite_frost",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 5));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 6));

// MARK: Register

Expand All @@ -131,16 +131,16 @@ public static void register(Map<String, ItemConfig.Weapon> configs) {
var repair = ingredient("betternether:nether_ruby", FabricLoader.getInstance().isModLoaded(BETTER_NETHER), Items.NETHERITE_INGOT);
staff("staff_ruby_fire",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, repair))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 6));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FIRE.id, 7));
}
if (WizardsMod.tweaksConfig.value.ignore_items_required_mods || FabricLoader.getInstance().isModLoaded(BETTER_END)) {
var repair = ingredient("betterend:aeternium_ingot", FabricLoader.getInstance().isModLoaded(BETTER_END), Items.NETHERITE_INGOT);
staff("staff_crystal_arcane",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, repair))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 6));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.ARCANE.id, 7));
staff("staff_smaragdant_frost",
Weapon.CustomMaterial.matching(ToolMaterials.NETHERITE, repair))
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 6));
.attribute(ItemConfig.Attribute.bonus(SpellSchools.FROST.id, 7));
}

Weapon.register(configs, entries, Group.KEY);
Expand Down
Loading

0 comments on commit c7dd766

Please sign in to comment.