From 74e8cbd51e283283f549638faf0a5957087dcfad Mon Sep 17 00:00:00 2001 From: Penal Buffalo Date: Sat, 9 Nov 2024 15:12:43 -0600 Subject: [PATCH 1/3] v4.1.4.1 b76 * fix error relating to horses on Minecraft versions 1.20.1 - 1.20.4 --- gradle.properties | 2 +- .../arcaneplugins/levelledmobs/managers/LevelManager.kt | 2 +- .../arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index c196ba8d..c3c72903 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 4.1.4 b75 +version = 4.1.4.1 b76 description = The Ultimate RPG Mob Levelling Solution \ No newline at end of file diff --git a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt index f249867f..40c3a0ee 100644 --- a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt +++ b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt @@ -2022,7 +2022,7 @@ class LevelManager : LevelInterface2 { if (lmEntity.livingEntity is Zombie) attribs.add(Addition.ATTRIBUTE_ZOMBIE_SPAWN_REINFORCEMENTS) - else if (main.ver.minorVersion >= 20 && lmEntity.livingEntity is Horse) + else if (main.ver.useHorseJumpAttrib && lmEntity.livingEntity is Horse) attribs.add(Addition.ATTRIBUTE_HORSE_JUMP_STRENGTH) main.levelManager.applyLevelledAttributes(lmEntity, attribs, nbtDatas) diff --git a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt index 84aa6f25..52b13995 100644 --- a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt +++ b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt @@ -32,6 +32,8 @@ class ServerVersionInfo { private var isOneTwentyFiveOrNewer = false var useOldEnums = false private set + var useHorseJumpAttrib = false + private set // preliminary fabric support. not entirely there yet private var _isRunningFabric: Boolean? = null @@ -55,6 +57,8 @@ class ServerVersionInfo { // 1.21.3 changed various enums to interfaces useOldEnums = minorVersion < 21 || minorVersion == 21 && revision < 3 + + useHorseJumpAttrib = minorVersion >= 21 || (minorVersion == 20 && revision >= 6) } private fun parsePaperVersion(){ From 5c50d03fd62a1f7a7e02c22f70e56a706ffd71a2 Mon Sep 17 00:00:00 2001 From: Penal Buffalo Date: Wed, 13 Nov 2024 12:26:57 -0600 Subject: [PATCH 2/3] v4.1.4.1 b77 * fix potential error related to `generic_jump_strength` --- gradle.properties | 2 +- .../arcaneplugins/levelledmobs/managers/LevelManager.kt | 9 +++++++-- .../levelledmobs/nametag/ServerVersionInfo.kt | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index c3c72903..872235d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 4.1.4.1 b76 +version = 4.1.4.1 b77 description = The Ultimate RPG Mob Levelling Solution \ No newline at end of file diff --git a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt index 40c3a0ee..a3565c8f 100644 --- a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt +++ b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt @@ -1481,7 +1481,12 @@ class LevelManager : LevelInterface2 { Addition.ATTRIBUTE_MAX_HEALTH -> attribute = Attribute.GENERIC_MAX_HEALTH Addition.ATTRIBUTE_ATTACK_DAMAGE -> attribute = Attribute.GENERIC_ATTACK_DAMAGE Addition.ATTRIBUTE_MOVEMENT_SPEED -> attribute = Attribute.GENERIC_MOVEMENT_SPEED - Addition.ATTRIBUTE_HORSE_JUMP_STRENGTH -> attribute = Attribute.GENERIC_JUMP_STRENGTH + Addition.ATTRIBUTE_HORSE_JUMP_STRENGTH -> { + attribute = if (LevelledMobs.instance.ver.useNewHorseJumpAttrib) + Attribute.GENERIC_JUMP_STRENGTH + else + Attribute.valueOf("HORSE_JUMP_STRENGTH") + } Addition.ATTRIBUTE_ARMOR_BONUS -> attribute = Attribute.GENERIC_ARMOR Addition.ATTRIBUTE_ARMOR_TOUGHNESS -> attribute = Attribute.GENERIC_ARMOR_TOUGHNESS Addition.ATTRIBUTE_KNOCKBACK_RESISTANCE -> attribute = Attribute.GENERIC_KNOCKBACK_RESISTANCE @@ -2022,7 +2027,7 @@ class LevelManager : LevelInterface2 { if (lmEntity.livingEntity is Zombie) attribs.add(Addition.ATTRIBUTE_ZOMBIE_SPAWN_REINFORCEMENTS) - else if (main.ver.useHorseJumpAttrib && lmEntity.livingEntity is Horse) + else if (main.ver.useNewHorseJumpAttrib && lmEntity.livingEntity is Horse) attribs.add(Addition.ATTRIBUTE_HORSE_JUMP_STRENGTH) main.levelManager.applyLevelledAttributes(lmEntity, attribs, nbtDatas) diff --git a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt index 52b13995..fa91bc9d 100644 --- a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt +++ b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/nametag/ServerVersionInfo.kt @@ -32,7 +32,7 @@ class ServerVersionInfo { private var isOneTwentyFiveOrNewer = false var useOldEnums = false private set - var useHorseJumpAttrib = false + var useNewHorseJumpAttrib = false private set // preliminary fabric support. not entirely there yet @@ -58,7 +58,7 @@ class ServerVersionInfo { // 1.21.3 changed various enums to interfaces useOldEnums = minorVersion < 21 || minorVersion == 21 && revision < 3 - useHorseJumpAttrib = minorVersion >= 21 || (minorVersion == 20 && revision >= 6) + useNewHorseJumpAttrib = minorVersion >= 21 || (minorVersion == 20 && revision >= 6) } private fun parsePaperVersion(){ From c6cc2a3807cbb6a3e12e77260a1db5c04ce84ef9 Mon Sep 17 00:00:00 2001 From: Penal Buffalo Date: Sun, 24 Nov 2024 09:57:13 -0600 Subject: [PATCH 3/3] v4.1.4.1 b78 * fix error when an incomplete `/lm spawner-egg` command is used * rename a few field descriptions when using `/lm rules show-rule` --- gradle.properties | 2 +- .../levelledmobs/commands/subcommands/SpawnerEggCommand.kt | 1 + .../io/github/arcaneplugins/levelledmobs/rules/RuleInfo.kt | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 872235d7..01363aa3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 4.1.4.1 b77 +version = 4.1.4.1 b78 description = The Ultimate RPG Mob Levelling Solution \ No newline at end of file diff --git a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/commands/subcommands/SpawnerEggCommand.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/commands/subcommands/SpawnerEggCommand.kt index d386da2f..3de66ef7 100644 --- a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/commands/subcommands/SpawnerEggCommand.kt +++ b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/commands/subcommands/SpawnerEggCommand.kt @@ -68,6 +68,7 @@ object SpawnerEggCommand : SpawnerBaseClass() { sender: CommandSender, input: String ){ + this.commandSender = sender val args = Utils.splitStringWithQuotes(input) var hasGivePlayer = false diff --git a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/rules/RuleInfo.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/rules/RuleInfo.kt index 8a493e66..7b2e885d 100644 --- a/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/rules/RuleInfo.kt +++ b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/rules/RuleInfo.kt @@ -134,11 +134,11 @@ class RuleInfo( var mobNBTData: MergeableStringList? = null @field:RuleFieldInfo("skylight level", RuleType.CONDITION) var conditionsSkyLightLevel: MinAndMax? = null - @field:RuleFieldInfo("allowed worlds", RuleType.CONDITION) + @field:RuleFieldInfo("worlds", RuleType.CONDITION) var conditionsWorlds: CachedModalList? = null - @field:RuleFieldInfo("allowed entities", RuleType.CONDITION) + @field:RuleFieldInfo("entities", RuleType.CONDITION) var conditionsEntities: CachedModalList? = null - @field:RuleFieldInfo("allowed biomes", RuleType.CONDITION) + @field:RuleFieldInfo("biomes", RuleType.CONDITION) var conditionsBiomes: CachedModalList? = null @field:RuleFieldInfo("external plugins", RuleType.CONDITION) var conditionsExternalPlugins: CachedModalList? = null