diff --git a/CHANGELOG.md b/CHANGELOG.md index dcae6b5..0603e05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning]. ## [Unreleased] - / +## [2.12.0] - 2024-06-06 + +### Added + +- Added `randomTableBonus(enchantment, chances)` for vanillas `table_bonus` condition + ## [2.11.0] - 2023-02-11 ### Added - Added `LootEntry.of("#tag")`, `LootEntry.of("@modid")` to select a random entry from a tag or modid. diff --git a/Common/src/main/java/com/almostreliable/lootjs/kube/LootConditionsContainer.java b/Common/src/main/java/com/almostreliable/lootjs/kube/LootConditionsContainer.java index 22ebb69..7984b9a 100644 --- a/Common/src/main/java/com/almostreliable/lootjs/kube/LootConditionsContainer.java +++ b/Common/src/main/java/com/almostreliable/lootjs/kube/LootConditionsContainer.java @@ -94,6 +94,10 @@ default B randomChanceWithEnchantment(@Nullable Enchantment enchantment, float[] return addCondition(new MainHandTableBonus(enchantment, chances)); } + default B randomTableBonus(Enchantment enchantment, float[] chances) { + return addCondition(BonusLevelTableCondition.bonusLevelFlatChance(enchantment, chances)); + } + default B biome(Resolver... resolvers) { List> biomes = new ArrayList<>(); List> tagKeys = new ArrayList<>(); diff --git a/gradle.properties b/gradle.properties index 681a223..40b082c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ enableAccessWidener = true modPackage = com.almostreliable.lootjs modId = lootjs modName = LootJS -modVersion = 2.11.0 +modVersion = 2.12.0 modAuthor = AlmostReliable modDescription = Modify global loot drops through KubeJS. @@ -23,7 +23,7 @@ fabricLoaderVersion = 0.14.21 # Project Dependencies parchmentVersion = 2023.06.26 -kubejsVersion = 2001.6.4-build.109 +kubejsVersion = 2001.6.4-build.120 # Github