Skip to content

Commit

Permalink
3.4.0 b623
Browse files Browse the repository at this point in the history
* chunk kill count tweaks
* invalid rules.yml message change
* rules.yml changes
  • Loading branch information
stumper66 committed Mar 29, 2022
1 parent 8249a09 commit 888feaf
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 71 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>me.lokka30</groupId>
<artifactId>LevelledMobs</artifactId>
<version>3.4.0 b622</version>
<version>3.4.0 b623</version>
<packaging>jar</packaging>

<name>LevelledMobs</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void onDeath(@NotNull final EntityDeathEvent event) {
if (lmEntity.getLivingEntity().getKiller() != null && main.placeholderApiIntegration != null)
main.placeholderApiIntegration.putPlayerOrMobDeath(lmEntity.getLivingEntity().getKiller(), lmEntity);

if (lmEntity.isLevelled() && lmEntity.getLivingEntity().getKiller() != null) {
if (lmEntity.isLevelled() && lmEntity.getLivingEntity().getKiller() != null && main.rulesManager.getMaximumDeathInChunkThreshold(lmEntity) > 0) {

// Only counts if mob is killed by player
if (hasReachedEntityDeathChunkMax(lmEntity, lmEntity.getLivingEntity().getKiller()) && main.rulesManager.disableVanillaDropsOnChunkMax(lmEntity))
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/me/lokka30/levelledmobs/misc/FileLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ public static YamlConfiguration loadFile(@NotNull final Plugin plugin, String cf
try (final FileInputStream fs = new FileInputStream(file)) {
new Yaml().load(fs);
} catch (final Exception e) {
final String parseErrorMessage = "Unable to parse file &b%s&r due to a user-caused YAML syntax error. Please copy the contents of this file into a Yaml Parser website (https://tinyurl.com/yamlp) to help diagnose which line you caused the error on. The parsing error is available below. It indicates line numbers around where the error occurred.\n" +
final String parseErrorMessage = "LevelledMobs was unable to read file &b%s&r due to a user-caused YAML syntax error.\n" +
"Please copy the contents of your file into a YAML Parser website, such as &b(https://tinyurl.com/yamlp)&r to help locate the line of the mistake.\n" +
"Failure to resolve this issue will cause LevelledMobs to function improperly, or likely not at all.\n" +
"Below represents where LevelledMobs became confused while attempting to read your file:\n" +
"&b---- START ERROR ----&r\n" +
"&4%s&r\n" +
"&b---- END ERROR ----&r\n" +
"If you have gone through unsuccessful efforts to fix this issue, you may contact our support team: &bhttps://discord.io/arcaneplugins";
"If you have attempted to resolve this issue yourself, and are unable to, then please &b#create-a-ticket&r in the Official Arcane Plugins Support Discord:\n" +
"&bhttps://discord.io/arcaneplugins";

Utils.logger.error(String.format(parseErrorMessage, cfgName, e));
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ private void parseApplySettings(final ConfigurationSection cs){
parsingInfo.disableVanillaDropsOnChunkMax = ymlHelper.getBoolean2(cs, "disable-vanilla-drops-on-chunk-max", parsingInfo.disableVanillaDropsOnChunkMax);
parsingInfo.spawnerParticlesCount = ymlHelper.getInt2(cs, "spawner-particles-count", parsingInfo.spawnerParticlesCount);
parsingInfo.maxAdjacentChunks = ymlHelper.getInt2(cs, "max-adjacent-chunks", parsingInfo.maxAdjacentChunks);
if (parsingInfo.maxAdjacentChunks != null && parsingInfo.maxAdjacentChunks > 10)
parsingInfo.maxAdjacentChunks = 10;
parseSpawnerPartile(ymlHelper.getString(cs, "spawner-particles"));

final Set<String> nametagVisibility = ymlHelper.getStringSet(cs, "nametag-visibility-method");
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/customdrops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# +-------------------------------------------------------------------------------------------LM3
defaults:
chance: 0.2
use-chunk-kill-max: false
use-chunk-kill-max: true
amount: 1
minLevel: -1
maxLevel: -1
Expand Down
140 changes: 74 additions & 66 deletions src/main/resources/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ presets:
random: true
lower-mob-level-bias-factor: 5

weighted_random_basic_difficulty:
weighted_random_basic:
# This Strategy Preset controls Weighted Random Bias.
name: 'LVLling Strategy - Weighted Random Bias BASIC CHALLENGE'
name: 'LVLling Strategy - Weighted Random Bias BASIC Challenge'
strategies:
weighted-random:
1-2: 5
Expand All @@ -117,9 +117,9 @@ presets:
7-8: 2
9-10: 1

weighted_random_average_difficulty:
weighted_random_average:
# This Strategy Preset controls Weighted Random Bias.
name: 'LVLling Strategy - Weighted Random Bias AVERAGE CHALLENGE'
name: 'LVLling Strategy - Weighted Random Bias AVERAGE Challenge'
strategies:
weighted-random:
1-5: 5
Expand All @@ -128,16 +128,27 @@ presets:
16-20: 2
21-25: 1

weighted_random_advanced_difficulty:
weighted_random_advanced:
# This Strategy Preset controls Weighted Random Bias.
name: 'LVLling Strategy - Weighted Random Bias ADVANCED CHALLENGE'
name: 'LVLling Strategy - Weighted Random Bias ADVANCED Challenge'
strategies:
weighted-random:
1-10: 5
11-20: 4
21-30: 3
31-40: 2
41-50: 1
1-9: 5
10-19: 4
20-29: 3
30-39: 2
40-50: 1

weighted_random_extreme:
# This Strategy Preset controls Weighted Random Bias.
name: 'LVLling Strategy - Weighted Random Bias EXTREME Challenge'
strategies:
weighted-random:
1-19: 5
20-39: 4
40-59: 3
60-79: 2
80-100: 1

player_Levelling:
# This Strategy Preset controls the player-stat based levelling system.
Expand Down Expand Up @@ -189,19 +200,18 @@ presets:
ranged-attack-damage: 1.0
item-drop: 3
xp-drop: 5
horse-jump-strength: 0.0

tiered-coloring:
1-2: '&#22E76B' #Green
3-4: '&#528CFF' #Blue
5-6: '&#FFCD56' #Yellow
7-8: '&#F2003D' #Red
9-10: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 2
max: 5
merge: true

tiered-coloring:
1-2: '&#22E76B' #Green
3-4: '&#528CFF' #Blue
5-6: '&#FFCD56' #Yellow
7-8: '&#F2003D' #Red
9-10: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 2
max: 5
merge: true

average_challenge:
name: 'Average-Challenge Multipliers'
Expand All @@ -219,19 +229,18 @@ presets:
# Special Multipliers (0.0 Min - 1.0 Max)
armor-bonus: 0.2
armor-toughness: 0.15
horse-jump-strength: 0.0

tiered-coloring:
1-5: '&#22E76B' #Green
6-10: '&#528CFF' #Blue
11-15: '&#FFCD56' #Yellow
16-20: '&#F2003D' #Red
21-25: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 4
max: 5
merge: true

tiered-coloring:
1-5: '&#22E76B' #Green
6-10: '&#528CFF' #Blue
11-15: '&#FFCD56' #Yellow
16-20: '&#F2003D' #Red
21-25: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 4
max: 5
merge: true

advanced_challenge:
name: 'Advanced-Challenge Multipliers'
Expand All @@ -252,19 +261,18 @@ presets:
armor-toughness: 0.3
attack-knockback: 0.5
knockback-resistance: 0.5
horse-jump-strength: 0.0

tiered-coloring:
1-9: '&#22E76B' #Green
10-19: '&#528CFF' #Blue
20-29: '&#FFCD56' #Yellow
30-39: '&#F2003D' #Red
40-50: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 8
max: 5
merge: true

tiered-coloring:
1-9: '&#22E76B' #Green
10-19: '&#528CFF' #Blue
20-29: '&#FFCD56' #Yellow
30-39: '&#F2003D' #Red
40-50: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 8
max: 5
merge: true

extreme_challenge:
name: 'Extreme-Challenge Multipliers'
Expand All @@ -286,19 +294,18 @@ presets:
attack-knockback: 0.5
knockback-resistance: 0.5
zombie-spawn-reinforcements: 0.15
horse-jump-strength: 0.0

tiered-coloring:
1-9: '&#22E76B' #Green
10-19: '&#528CFF' #Blue
20-29: '&#FFCD56' #Yellow
30-39: '&#F2003D' #Red
40-50: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 8
max: 5
merge: true

tiered-coloring:
1-19: '&#22E76B' #Green
20-39: '&#528CFF' #Blue
40-59: '&#FFCD56' #Yellow
60-79: '&#F2003D' #Red
80-100: '&#B447FF' #Purple
default: '&#FFFFFF' #White
health-indicator:
scale: 16
max: 5
merge: true

nametag_using_indicator:
# This controls the nametag, where the health is displayed using %health-indicator%
Expand Down Expand Up @@ -347,9 +354,10 @@ default-rule:
# - advanced_challenge
# - extreme_challenge
# - apply_LevellingVariance
# - weighted_random_basic_difficulty
- weighted_random_average_difficulty
# - weighted_random_advanced_difficulty
# - weighted_random_basic
- weighted_random_average
# - weighted_random_advanced
# - weighted_random_extreme
# - spawn_Levelling
# - blended_Levelling
# - ycoord_Levelling
Expand Down

0 comments on commit 888feaf

Please sign in to comment.