Skip to content

Commit

Permalink
Update default loot table configurations, add some enchanted loot
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsoltMolnarrr committed May 28, 2023
1 parent e9505c8 commit 937a8de
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 0.9.5

- Add smithing table upgrade recipes to upgrade to netherite weapons
-

# 0.9.4

Expand Down
34 changes: 28 additions & 6 deletions common/src/main/java/net/paladins/config/Default.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ public class Default {

lootConfig = new LootConfig();
final var weapons_tier_0 = "weapons_tier_0";
lootConfig.item_groups.put("weapons_tier_0", new LootConfig.ItemGroup(List.of(
lootConfig.item_groups.put(weapons_tier_0, new LootConfig.ItemGroup(List.of(
Weapons.acolyte_wand.id().toString(),
Weapons.wooden_great_hammer.id().toString(),
Weapons.stone_great_hammer.id().toString(),
Weapons.stone_claymore.id().toString()),
1
));

).chance(0.5F));
final var weapons_golden = "weapons_golden";
lootConfig.item_groups.put(weapons_golden, new LootConfig.ItemGroup(List.of(
Weapons.golden_mace.id().toString(),
Weapons.golden_claymore.id().toString(),
Weapons.golden_great_hammer.id().toString(),
Weapons.holy_wand.id().toString()),
1
).chance(0.4F).enchant());
final var weapons_one_handed_tier_1 = "weapons_one_handed_tier_1";
lootConfig.item_groups.put(weapons_one_handed_tier_1, new LootConfig.ItemGroup(List.of(
Weapons.holy_wand.id().toString(),
Expand Down Expand Up @@ -61,13 +68,26 @@ public class Default {
Weapons.diamond_great_hammer.id().toString()),
1
).chance(0.3F));
final var weapons_two_handed_tier_2_enchanted = "weapons_two_handed_tier_2_enchanted";
lootConfig.item_groups.put(weapons_two_handed_tier_2_enchanted, new LootConfig.ItemGroup(List.of(
Weapons.holy_staff.id().toString(),
Weapons.diamond_claymore.id().toString(),
Weapons.diamond_great_hammer.id().toString()),
1
).chance(0.3F).enchant());

final var armor_tier_1 = "armor_tier_1";
lootConfig.item_groups.put(armor_tier_1, new LootConfig.ItemGroup(joinLists(
Armors.paladinArmorSet_t1.idStrings(),
Armors.priestArmorSet_t1.idStrings()),
1
).chance(0.25F));
final var armor_tier_1_enchanted = "armor_tier_1_enchanted";
lootConfig.item_groups.put(armor_tier_1_enchanted, new LootConfig.ItemGroup(joinLists(
Armors.paladinArmorSet_t1.idStrings(),
Armors.priestArmorSet_t1.idStrings()),
1
).chance(0.25F).enchant());
final var armor_tier_2 = "armor_tier_2";
lootConfig.item_groups.put(armor_tier_2, new LootConfig.ItemGroup(joinLists(
Armors.paladinArmorSet_t2.idStrings(),
Expand All @@ -76,9 +96,11 @@ public class Default {
).chance(0.5F));


List.of("minecraft:chests/ruined_portal")
.forEach(id -> lootConfig.loot_tables.put(id, List.of(weapons_golden)));

List.of("minecraft:chests/spawn_bonus_chest",
"minecraft:chests/igloo_chest",
"minecraft:chests/ruined_portal",
"minecraft:chests/shipwreck_supply",
"minecraft:chests/jungle_temple")
.forEach(id -> lootConfig.loot_tables.put(id, List.of(weapons_tier_0)));
Expand All @@ -104,13 +126,13 @@ public class Default {
"minecraft:chests/woodland_mansion",
"minecraft:chests/simple_dungeon",
"minecraft:chests/underwater_ruin_big.json")
.forEach(id -> lootConfig.loot_tables.put(id, List.of(weapons_one_handed_tier_1, armor_tier_1)));
.forEach(id -> lootConfig.loot_tables.put(id, List.of(weapons_one_handed_tier_1, armor_tier_1_enchanted)));

List.of("minecraft:chests/end_city_treasure",
"minecraft:chests/bastion_treasure",
"minecraft:chests/ancient_city",
"minecraft:chests/stronghold_library")
.forEach(id -> lootConfig.loot_tables.put(id, List.of(weapons_two_handed_tier_2, armor_tier_2)));
.forEach(id -> lootConfig.loot_tables.put(id, List.of(weapons_two_handed_tier_2_enchanted, armor_tier_2)));


worldGenConfig = new WorldGenConfig();
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ gecko_mc_prefix=1.19:
gecko_lib_version_fabric=3.1.40
gecko_lib_version_forge=3.1.39
tiny_config_version=2.3.2
spell_engine_version=0.9.17+1.19
spell_engine_version=0.9.21+1.19
spell_power_version=0.9.12+1.19
runes_version=0.9.7+1.19

0 comments on commit 937a8de

Please sign in to comment.