Skip to content

Commit

Permalink
fix telekinesis not enchantable in et
Browse files Browse the repository at this point in the history
  • Loading branch information
btwonion committed Aug 15, 2024
1 parent 3a6169e commit 4e0673f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

val beta: Int? = null // Pattern is '1.0.0-beta1-1.20.6-pre.2'
val featureVersion = "3.0.2${if (beta != null) "-beta$beta" else ""}"
val featureVersion = "3.0.3${if (beta != null) "-beta$beta" else ""}"
val mcVersion = property("mcVersion")!!.toString()
val mcVersionRange = property("mcVersionRange")!!.toString()
version = "$featureVersion-$mcVersion"
Expand Down
3 changes: 1 addition & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
- fix enchantment not tradeable in >=1.20.6
- use yacl 3.5.x for config creation
- fix enchantment not enchantable in enchanting table in >=1.20.6
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ private class TelekinesisEnchantmentTagProvider(
) : EnchantmentTagProvider(output, completableFuture) {
override fun addTags(registries: HolderLookup.Provider) {
fun minecraftTagKey(value: String): TagKey<Enchantment> = TagKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath("minecraft", value))
val enchantmentResourceKey = ResourceKey.create(Registries.ENCHANTMENT, telekinesisEnchantmentId)
listOf(
getOrCreateTagBuilder(telekinesisEffectId),
getOrCreateTagBuilder(minecraftTagKey("tradeable")),
getOrCreateTagBuilder(minecraftTagKey("treasure")),
getOrCreateTagBuilder(minecraftTagKey("in_enchanting_table"))
getOrCreateTagBuilder(minecraftTagKey("non_treasure"))
).forEach {
it.add(telekinesisEnchantmentId)
it.addOptional(enchantmentResourceKey)
}
}
}
Expand Down

0 comments on commit 4e0673f

Please sign in to comment.