Skip to content

Commit

Permalink
v4.1.4.1 b76
Browse files Browse the repository at this point in the history
* fix error relating to horses on Minecraft versions 1.20.1 - 1.20.4
  • Loading branch information
stumper66 committed Nov 9, 2024
1 parent c23bf7b commit 74e8cbd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 4.1.4 b75
version = 4.1.4.1 b76
description = The Ultimate RPG Mob Levelling Solution
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(){
Expand Down

0 comments on commit 74e8cbd

Please sign in to comment.