Fix overenchanting (#36)

This commit is contained in:
Caedis authored and GitHub committed 2025-09-06 20:23:10 +00:00
1 parent f1c5c9fa28
commit e60a880efb
3 files changed
+8 -7

No files matched your search

+5 -5
View File
@@ -3,14 +3,14 @@
dependencies {
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
api 'com.github.GTNewHorizons:Mantle:0.5.1:dev'
api 'com.github.GTNewHorizons:BloodMagic:1.7.48:dev'
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.13.46-GTNH:dev')
compileOnly('com.github.GTNewHorizons:AppleCore:3.3.5:dev')
api 'com.github.GTNewHorizons:BloodMagic:1.7.49:dev'
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.13.51-GTNH:dev')
compileOnly('com.github.GTNewHorizons:AppleCore:3.3.7:dev')
compileOnlyApi 'com.github.GTNewHorizons:Guide-API:1.1.0:dev'
compileOnlyApi 'com.github.GTNewHorizons:ForgeMultipart:1.6.7:dev'
compileOnlyApi 'com.github.GTNewHorizons:ForgeMultipart:1.6.8:dev'
compileOnlyApi 'com.github.GTNewHorizons:waila:1.8.12:api'
devOnlyNonPublishable 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
runtimeOnlyNonPublishable 'com.github.GTNewHorizons:NotEnoughItems:2.7.66-GTNH:dev'
runtimeOnlyNonPublishable 'com.github.GTNewHorizons:NotEnoughItems:2.7.80-GTNH:dev'
}
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.42'
}
@@ -164,7 +164,8 @@ public class RitualEffectEnchant extends RitualEffect {
if (stageTicks >= 100) {
for (EnchantmentData d : enchants) {
if (EnchantmentHelper.getEnchantmentLevel(d.enchant, enchantItem) == 0) {
enchantItem.addEnchantment(Enchantment.enchantmentsList[d.enchant], d.level);
var ench = Enchantment.enchantmentsList[d.enchant];
enchantItem.addEnchantment(ench, Math.min(d.level, ench.getMaxLevel()));
}
}