Skip to content

Commit

Permalink
Merge pull request #507 from ArcanePlugins/4-dev
Browse files Browse the repository at this point in the history
4 dev
  • Loading branch information
stumper66 authored Dec 3, 2024
2 parents cd64ce4 + c6cc2a3 commit aa517c0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 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 b78
description = The Ultimate RPG Mob Levelling Solution
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ object SpawnerEggCommand : SpawnerBaseClass() {
sender: CommandSender,
input: String
){
this.commandSender = sender
val args = Utils.splitStringWithQuotes(input)

var hasGivePlayer = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
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 useNewHorseJumpAttrib = 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

useNewHorseJumpAttrib = minorVersion >= 21 || (minorVersion == 20 && revision >= 6)
}

private fun parsePaperVersion(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>? = null
@field:RuleFieldInfo("allowed entities", RuleType.CONDITION)
@field:RuleFieldInfo("entities", RuleType.CONDITION)
var conditionsEntities: CachedModalList<String>? = null
@field:RuleFieldInfo("allowed biomes", RuleType.CONDITION)
@field:RuleFieldInfo("biomes", RuleType.CONDITION)
var conditionsBiomes: CachedModalList<Biome>? = null
@field:RuleFieldInfo("external plugins", RuleType.CONDITION)
var conditionsExternalPlugins: CachedModalList<String>? = null
Expand Down

0 comments on commit aa517c0

Please sign in to comment.