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(){