Skip to content

Commit 47375b6

Browse files
authored
Merge pull request #226 from mahjerion/1.20-Forge
small fixes/changes
2 parents f1f29ef + b09f2bf commit 47375b6

8 files changed

Lines changed: 30 additions & 13 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ publish_plugin_version=0.8.3
2828
# --- COMMON GRADLE END ---
2929
# -- Mod Specific --
3030
player_animator_version=1.0.2-rc1+1.20
31-
dungeon_realm_version=1.1.1
31+
dungeon_realm_version=1.1.2
3232
the_harvest_version=1.1.0

src/main/java/com/robertx22/mine_and_slash/capability/player/data/PlayerConfigData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public enum Config {
3333
AGGRESSIVE_SUMMONS("aggressive_summons", true, Words.TITLE_FEATURE_AGGRO_SUMMONS, Words.AGGRESIVE_SUMMONS, false),
3434
STAT_ORDER_TEST("stat_order_test", false, Words.TITLE_FEATURE_STAT_ORDER_DEBUG, Words.STAT_ORDER_TEST, true),
3535
DAMAGE_CONFLICT_MSG("damage_conflict_check", false, Words.TITLE_FEATURE_DMG_CONFLICT_DEBUG, Words.DMG_CONFLICT_CHECK, true),
36-
EVERYONE_IS_ALLY("everyone_is_ally", false, Words.TITLE_FEATURE_EVERYONE_ALLY, Words.EVERYONE_IS_ALLY, false),
36+
//EVERYONE_IS_ALLY("everyone_is_ally", false, Words.TITLE_FEATURE_EVERYONE_ALLY, Words.EVERYONE_IS_ALLY, false),
3737
//DROP_MAP_CHEST_CONTENTS_ON_GROUND("drop_map_chest_contents_on_ground", false, Words.TITLE_FEATURE_DROP_MAP_CHEST_ITEMS, Words.DROP_MAP_CHEST_CONTENTS_ON_GROUND, false)
3838
;
3939

src/main/java/com/robertx22/mine_and_slash/config/forge/ServerContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public static ServerContainer get() {
7777
COMBAT_TO_PROFESSION_RESTED_XP_GENERATION = b.defineInRange("COMBAT_TO_PROFESSION_RESTED_XP_GENERATION", 0.25, 0, 1);
7878
PROFESSION_TO_COMBAT_RESTED_XP_GENERATION = b.defineInRange("PROFESSION_TO_COMBAT_RESTED_XP_GENERATION", 0.1, 0, 1);
7979
RESTED_XP_DEATH_PENALTY = b.defineInRange("RESTED_XP_DEATH_PENALTY", 0.5F, 0, 1);
80+
PARTY_EXP_BONUS = b.comment("Additional exp before splitting between players.").defineInRange("PARTY_EXP_BONUS", 0.2F, 0, 1);
8081

8182
FAVOR_DEATH_LOSS = b.defineInRange("favor_death_loss", 50D, 0, 10000);
8283
MAX_POSSIBLE_FAVOR = b.defineInRange("MAX_POSSIBLE_FAVOR", 10000000, 0, 10000000);
@@ -258,6 +259,7 @@ public boolean isEntitySummonBlacklisted(LivingEntity entity) {
258259
public ForgeConfigSpec.DoubleValue COMBAT_TO_PROFESSION_RESTED_XP_GENERATION;
259260
public ForgeConfigSpec.DoubleValue PROFESSION_TO_COMBAT_RESTED_XP_GENERATION;
260261
public ForgeConfigSpec.DoubleValue RESTED_XP_DEATH_PENALTY;
262+
public ForgeConfigSpec.DoubleValue PARTY_EXP_BONUS;
261263

262264
public ForgeConfigSpec.DoubleValue UNARMED_ENERGY_COST;
263265

src/main/java/com/robertx22/mine_and_slash/event_hooks/my_events/OnMobDeathDrops.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private static void GiveExp(LivingEntity victim, Player killer, EntityData kille
151151
members = 4;
152152
}
153153

154-
float teamMulti = 1 + (0.2F * members);
154+
float teamMulti = (float) (1 + (ServerContainer.get().PARTY_EXP_BONUS.get() * members));
155155

156156
exp *= teamMulti;
157157

src/main/java/com/robertx22/mine_and_slash/loot/blueprints/bases/UniqueGearPart.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ protected UniqueGear generateIfNull() {
1818
.getWrapped()
1919
.of(x -> x.rarity.equals(blueprint.rarity.get().GUID()))
2020
.of(x -> blueprint.info.map_tier >= x.min_tier)
21+
.of(x -> blueprint.info.level >= x.min_drop_lvl)
2122
.of(x -> x.canSpawnInLeague(blueprint.info.league))
2223
.of(x -> x.getBaseGear().GUID().equals(blueprint.gearItemSlot.get().GUID()));
2324

src/main/java/com/robertx22/mine_and_slash/maps/MapItemData.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,29 @@ public List<ItemStack> getSalvageResult(ExileStack stack) {
317317
return Arrays.asList();
318318
}
319319
int amount = 1;
320-
return Arrays.asList(new ItemStack(RarityItems.RARITY_STONE.getOrDefault(getRarity().GUID(), RarityItems.RARITY_STONE.get(IRarity.COMMON_ID)).get(), amount));
320+
321+
GearRarity mapRarity = getRarity();
322+
323+
// Find the rarity to use for the stone, capping at tier 2 (Rare)
324+
// Find the rarity with item_tier == 2 (Rare)
325+
Optional<GearRarity> rareRarityOpt = ExileDB.GearRarities()
326+
.getList()
327+
.stream()
328+
.filter(r -> r.item_tier == 2)
329+
.findFirst();
330+
331+
GearRarity stoneRarity;
332+
if (mapRarity.item_tier < 2) {
333+
stoneRarity = mapRarity;
334+
} else {
335+
// If map is Rare or above, use Rare
336+
stoneRarity = rareRarityOpt.orElse(mapRarity); // fallback to mapRarity if not found
337+
}
338+
339+
return Arrays.asList(new ItemStack(
340+
RarityItems.RARITY_STONE.getOrDefault(stoneRarity.GUID(), RarityItems.RARITY_STONE.get(IRarity.COMMON_ID)).get(),
341+
amount
342+
));
321343
}
322344

323345
@Override

src/main/java/com/robertx22/mine_and_slash/uncommon/localization/Words.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public enum Words implements IAutoLocName {
144144
STAT_ORDER_TEST("Stat Order Test [Debug Option]\nThis runs a few tests when you attack something to be sure the stats are working in correct order and sends warning message if they don't. Only use when debugging stats. For example, crit chance should work before crit damage stat"),
145145
DMG_CONFLICT_CHECK("Mod Conflict Check [Debug Option]\n\nChecks if Mine and Slash damage has been overrided by another mod.\nSends a message to player if there's a problem.\n THIS IS A DEBUG OPTION"),
146146
AGGRESIVE_SUMMONS("Your summons will now attack anything they guess is an enemy, and no longer need guidance from you.\n\nYou need to Re-Summon your minions for this to take effect"),
147-
EVERYONE_IS_ALLY("By default your spells only target your MNS team members and yourself.\n\nWith this enabled, your heals, buffs etc will target everyone, including possible enemies!"),
147+
EVERYONE_IS_ALLY("By default your spells only target your MNS team members and yourself.\n\nWith this enabled, your heals, buffs etc will target even un-teamed players!"),
148148
DROP_MAP_CHEST_CONTENTS_ON_GROUND("When you loot chests in maps, should they drop their contents on the ground automatically? \n\nThis is helpful if you use the Master Backpack or other loot filtering mods like Sophisticated Backpacks."),
149149

150150
WHILE_UNDER_AURA("While Under Effect of %1$s:"),

src/main/java/com/robertx22/mine_and_slash/uncommon/utilityclasses/EntityFinder.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,6 @@ public Setup<T> predicate(Predicate<T> p) {
187187

188188
public Setup<T> searchFor(AllyOrEnemy f) {
189189
this.entityPredicate = f;
190-
191-
if (f == AllyOrEnemy.allies) {
192-
if (this.caster instanceof Player p) {
193-
if (Load.player(p).config.isConfigEnabled(PlayerConfigData.Config.EVERYONE_IS_ALLY)) {
194-
this.entityPredicate = AllyOrEnemy.all;
195-
}
196-
}
197-
}
198190
return this;
199191
}
200192

0 commit comments

Comments
 (0)