diff --git a/gradle.properties b/gradle.properties index c196ba8d..01363aa3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 4.1.4 b75 +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/managers/LevelManager.kt b/levelledmobs-plugin/src/main/kotlin/io/github/arcaneplugins/levelledmobs/managers/LevelManager.kt index f249867f..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.minorVersion >= 20 && 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 84aa6f25..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,6 +32,8 @@ class ServerVersionInfo { private var isOneTwentyFiveOrNewer = false var useOldEnums = false private set + var useNewHorseJumpAttrib = 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 + + useNewHorseJumpAttrib = minorVersion >= 21 || (minorVersion == 20 && revision >= 6) } private fun parsePaperVersion(){ 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