From e6c49583eb5ac85a5d9eedcf7c35c7207056c272 Mon Sep 17 00:00:00 2001 From: Anton <79146501+btwonion@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:13:19 +0100 Subject: [PATCH] rebrand (#21) * rebrand to "magnetic" * also rename media * rename config screen class * do not register enchantment under some circumstances * use different approach * rename data loader mixin --- .github/workflows/readme-modrinth-sync.yml | 2 +- README.md | 23 +++++----- build.gradle.kts | 12 ++--- changelog.md | 5 +-- ...se-cave.gif => magnetic-showcase-cave.gif} | Bin ....gif => magnetic-showcase-cow-cropped.gif} | Bin ...case-cow.gif => magnetic-showcase-cow.gif} | Bin settings.gradle.kts | 2 +- .../mixins/AbstractChestedHorseMixin.java | 4 +- .../mixins/AbstractHorseMixin.java | 4 +- .../mixins/AbstractMinecartMixin.java | 4 +- .../mixins/AllayMixin.java | 4 +- .../mixins/BlockMixin.java | 6 +-- .../mixins/BoatMixin.java | 4 +- .../mixins/ChestBoatMixin.java | 4 +- .../mixins/EnchantmentsMixin.java | 19 ++++---- .../mixins/EnderManMixin.java | 4 +- .../mixins/FishingHookMixin.java | 4 +- .../mixins/LivingEntityMixin.java | 8 ++-- .../mixins/MinecartTNTMixin.java | 4 +- .../mixins/MobMixin.java | 4 +- .../mixins/PigMixin.java | 4 +- .../mixins/PiglinMixin.java | 4 +- .../mixins/PlayerMixin.java | 4 +- .../mixins/RegistryDataLoaderMixin.java | 41 ++++++++++++++++++ .../mixins/SheepMixin.java | 8 ++-- .../mixins/SnowGolemMixin.java | 6 +-- .../mixins/SpawnerBlockMixin.java | 6 +-- .../mixins/StriderMixin.java | 4 +- .../mixins/SweetBerryBushBlockMixin.java | 4 +- .../mixins/VehicleEntityMixin.java | 6 +-- .../mixins/WitherBossMixin.java | 4 +- .../mixins/invokers/ExperienceOrbInvoker.java | 4 +- .../utils/MixinHelper.java | 8 ++-- .../{telekinesis => magnetic}/DropEvent.kt | 8 ++-- .../MagneticEnchantment.kt} | 14 +++--- .../MagneticEnchantmentGenerator.kt} | 18 ++++---- src/main/kotlin/dev/nyon/magnetic/Main.kt | 10 +++++ .../kotlin/dev/nyon/magnetic/config/Config.kt | 19 ++++++++ .../config/MagneticConfigScreen.kt} | 4 +- .../config/ModMenuImpl.kt | 2 +- src/main/kotlin/dev/nyon/telekinesis/Main.kt | 18 -------- .../dev/nyon/telekinesis/config/Config.kt | 13 ------ .../assets/{telekinesis => magnetic}/icon.png | Bin .../resources/assets/magnetic/lang/de_de.json | 13 ++++++ .../resources/assets/magnetic/lang/en_us.json | 13 ++++++ .../assets/telekinesis/lang/de_de.json | 13 ------ .../assets/telekinesis/lang/en_us.json | 13 ------ src/main/resources/fabric.mod.json | 16 +++---- ...s.accesswidener => magnetic.accesswidener} | 0 ...nesis.mixins.json => magnetic.mixins.json} | 3 +- stonecutter.gradle.kts | 6 +-- versions/1.21.2/gradle.properties | 4 +- .../enchantment/magnetic.json} | 2 +- .../tags/enchantment/auto_move.json | 2 +- .../tags/enchantment/in_enchanting_table.json | 2 +- .../minecraft/tags/enchantment/tradeable.json | 2 +- .../minecraft/tags/enchantment/treasure.json | 2 +- .../enchantment/magnetic.json} | 2 +- .../tags/enchantment/auto_move.json | 2 +- .../tags/enchantment/in_enchanting_table.json | 2 +- .../minecraft/tags/enchantment/tradeable.json | 2 +- .../minecraft/tags/enchantment/treasure.json | 2 +- 63 files changed, 232 insertions(+), 195 deletions(-) rename media/{telekinesis-showcase-cave.gif => magnetic-showcase-cave.gif} (100%) rename media/{telekinesis-showcase-cow-cropped.gif => magnetic-showcase-cow-cropped.gif} (100%) rename media/{telekinesis-showcase-cow.gif => magnetic-showcase-cow.gif} (100%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/AbstractChestedHorseMixin.java (93%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/AbstractHorseMixin.java (95%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/AbstractMinecartMixin.java (91%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/AllayMixin.java (95%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/BlockMixin.java (96%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/BoatMixin.java (91%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/ChestBoatMixin.java (92%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/EnchantmentsMixin.java (64%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/EnderManMixin.java (94%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/FishingHookMixin.java (95%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/LivingEntityMixin.java (96%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/MinecartTNTMixin.java (92%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/MobMixin.java (96%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/PigMixin.java (92%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/PiglinMixin.java (92%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/PlayerMixin.java (94%) create mode 100644 src/main/java/dev/nyon/magnetic/mixins/RegistryDataLoaderMixin.java rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/SheepMixin.java (94%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/SnowGolemMixin.java (91%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/SpawnerBlockMixin.java (91%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/StriderMixin.java (93%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/SweetBerryBushBlockMixin.java (94%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/VehicleEntityMixin.java (94%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/WitherBossMixin.java (94%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/mixins/invokers/ExperienceOrbInvoker.java (86%) rename src/main/java/dev/nyon/{telekinesis => magnetic}/utils/MixinHelper.java (97%) rename src/main/kotlin/dev/nyon/{telekinesis => magnetic}/DropEvent.kt (83%) rename src/main/kotlin/dev/nyon/{telekinesis/TelekinesisEnchantment.kt => magnetic/MagneticEnchantment.kt} (72%) rename src/main/kotlin/dev/nyon/{telekinesis/TelekinesisEnchantmentGenerator.kt => magnetic/MagneticEnchantmentGenerator.kt} (82%) create mode 100644 src/main/kotlin/dev/nyon/magnetic/Main.kt create mode 100644 src/main/kotlin/dev/nyon/magnetic/config/Config.kt rename src/main/kotlin/dev/nyon/{telekinesis/config/TelekinesisConfigScreen.kt => magnetic/config/MagneticConfigScreen.kt} (95%) rename src/main/kotlin/dev/nyon/{telekinesis => magnetic}/config/ModMenuImpl.kt (90%) delete mode 100644 src/main/kotlin/dev/nyon/telekinesis/Main.kt delete mode 100644 src/main/kotlin/dev/nyon/telekinesis/config/Config.kt rename src/main/resources/assets/{telekinesis => magnetic}/icon.png (100%) create mode 100644 src/main/resources/assets/magnetic/lang/de_de.json create mode 100644 src/main/resources/assets/magnetic/lang/en_us.json delete mode 100644 src/main/resources/assets/telekinesis/lang/de_de.json delete mode 100644 src/main/resources/assets/telekinesis/lang/en_us.json rename src/main/resources/{telekinesis.accesswidener => magnetic.accesswidener} (100%) rename src/main/resources/{telekinesis.mixins.json => magnetic.mixins.json} (91%) rename versions/1.21.2/src/main/generated/data/{telekinesis/enchantment/telekinesis.json => magnetic/enchantment/magnetic.json} (82%) rename versions/1.21.2/src/main/generated/data/{telekinesis => magnetic}/tags/enchantment/auto_move.json (59%) rename versions/1.21/src/main/generated/data/{telekinesis/enchantment/telekinesis.json => magnetic/enchantment/magnetic.json} (82%) rename versions/1.21/src/main/generated/data/{telekinesis => magnetic}/tags/enchantment/auto_move.json (59%) diff --git a/.github/workflows/readme-modrinth-sync.yml b/.github/workflows/readme-modrinth-sync.yml index e8862e2..73dabe1 100644 --- a/.github/workflows/readme-modrinth-sync.yml +++ b/.github/workflows/readme-modrinth-sync.yml @@ -17,4 +17,4 @@ jobs: - uses: funnyboy-roks/modrinth-auto-desc@v1.6 with: auth-token: ${{ secrets.MODRINTH_API_KEY }} - slug: 'telekinesis' \ No newline at end of file + slug: 'magnetic' \ No newline at end of file diff --git a/README.md b/README.md index 9bce0d5..02a2dd1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# telekinesis +# magnetic (pka. telekinesis) -> Adds auto-pickup functionality to the player. Also know as telekinesis from Hypixel Skyblock. +> Magnetically moves items and experience into your inventory. Also known as telekinesis from Hypixel Skyblock. ## Functionality -Check out the [Gallery](https://modrinth.com/plugin/telekinesis/gallery) for a preview. +Check out the [Gallery](https://modrinth.com/plugin/magnetic/gallery) for a preview. -With this mod you can automatically pickup drops, including experience, from mobs, blocks and entities. +With this mod you can automatically pick up drops, including experience, from mobs, blocks and other entities. ## Can I use the functionality without the enchantment? @@ -21,19 +21,19 @@ enchanted on tools. ## Configuration The configuration file can be found in the client/server directory. --> `/config/telekinesis.json` +-> `/config/magnetic.json`
-telekinesis.json +magnetic.json ```json5 { "version": 1, // For migration purposes only, just ignore this. "config": { - "needEnchantment": true, // Defines, whether telekinesis should without or with the enchantment on the tool. - "needSneak": false, // Defines. whether the player should have to sneak in order to use telekinesis. - "expAllowed": true, // Enables the use of telekinesis for exp drops. - "itemsAllowed": true // Enables the use of telekinesis for item drops. + "needEnchantment": true, // Defines, whether Magnetic should without or with the enchantment on the tool. + "needSneak": false, // Defines. whether the player should have to sneak in order to use Magnetic. + "expAllowed": true, // Enables the use of Magnetic for exp drops. + "itemsAllowed": true // Enables the use of Magnetic for item drops. } } ``` @@ -46,5 +46,4 @@ If you need help with any of my mods, join my [discord server](https://nyon.dev/ #### Paper Compatibility -The paper module of telekinesis is as of Minecraft version 1.20.2 discontinued cause of the lack of ability to -register the enchantment. +The paper module of magnetic is as of Minecraft version 1.20.2 discontinued cause of my lack of time to implement it. \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 6eba28b..f14d36b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,7 +22,7 @@ val mcVersionName = property("versionName")!!.toString() version = "$featureVersion-$mcVersionName" group = "dev.nyon" -val githubRepo = "btwonion/telekinesis" +val githubRepo = "btwonion/magnetic" base { archivesName.set(rootProject.name) @@ -36,7 +36,7 @@ loom { } } - accessWidenerPath = rootDir.resolve("src/main/resources/telekinesis.accesswidener") + accessWidenerPath = rootDir.resolve("src/main/resources/magnetic.accesswidener") mixin { useLegacyMixinAp = false } } @@ -74,9 +74,9 @@ dependencies { val javaVersion = if (stonecutter.eval(mcVersion, ">=1.20.6")) 21 else 17 tasks { processResources { - val modId = "telekinesis" - val modName = "telekinesis" - val modDescription = "Adds auto-pickup functionality to the player. Also know as telekinesis from Hypixel Skyblock." + val modId = "magnetic" + val modName = "magnetic" + val modDescription = "Magnetically moves items and experience into your inventory. Also known as telekinesis from Hypixel Skyblock." val props = mapOf( "id" to modId, @@ -163,7 +163,7 @@ publishing { publications { create("maven") { groupId = "dev.nyon" - artifactId = "telekinesis" + artifactId = "magnetic" version = project.version.toString() from(components["java"]) } diff --git a/changelog.md b/changelog.md index 9a64aab..7b2354a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,2 @@ -- change icon -- re-require yacl -- rename doubled function name in MobMixin \ No newline at end of file +- rebrand mod to "magnetic" +- do not register telekinesis enchantment if "needEnchantment" is false \ No newline at end of file diff --git a/media/telekinesis-showcase-cave.gif b/media/magnetic-showcase-cave.gif similarity index 100% rename from media/telekinesis-showcase-cave.gif rename to media/magnetic-showcase-cave.gif diff --git a/media/telekinesis-showcase-cow-cropped.gif b/media/magnetic-showcase-cow-cropped.gif similarity index 100% rename from media/telekinesis-showcase-cow-cropped.gif rename to media/magnetic-showcase-cow-cropped.gif diff --git a/media/telekinesis-showcase-cow.gif b/media/magnetic-showcase-cow.gif similarity index 100% rename from media/telekinesis-showcase-cow.gif rename to media/magnetic-showcase-cow.gif diff --git a/settings.gradle.kts b/settings.gradle.kts index 8a08558..8b408aa 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -rootProject.name = "telekinesis" +rootProject.name = "magnetic" pluginManagement { repositories { diff --git a/src/main/java/dev/nyon/telekinesis/mixins/AbstractChestedHorseMixin.java b/src/main/java/dev/nyon/magnetic/mixins/AbstractChestedHorseMixin.java similarity index 93% rename from src/main/java/dev/nyon/telekinesis/mixins/AbstractChestedHorseMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/AbstractChestedHorseMixin.java index a5f20a7..84cac7f 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/AbstractChestedHorseMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/AbstractChestedHorseMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.animal.horse.AbstractChestedHorse; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/AbstractHorseMixin.java b/src/main/java/dev/nyon/magnetic/mixins/AbstractHorseMixin.java similarity index 95% rename from src/main/java/dev/nyon/telekinesis/mixins/AbstractHorseMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/AbstractHorseMixin.java index 3345009..9b75eae 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/AbstractHorseMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/AbstractHorseMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.animal.horse.AbstractHorse; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/AbstractMinecartMixin.java b/src/main/java/dev/nyon/magnetic/mixins/AbstractMinecartMixin.java similarity index 91% rename from src/main/java/dev/nyon/telekinesis/mixins/AbstractMinecartMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/AbstractMinecartMixin.java index f15c07c..9d5d02a 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/AbstractMinecartMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/AbstractMinecartMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.item.Item; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/AllayMixin.java b/src/main/java/dev/nyon/magnetic/mixins/AllayMixin.java similarity index 95% rename from src/main/java/dev/nyon/telekinesis/mixins/AllayMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/AllayMixin.java index 6279b72..d036334 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/AllayMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/AllayMixin.java @@ -1,8 +1,8 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.animal.allay.Allay; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java b/src/main/java/dev/nyon/magnetic/mixins/BlockMixin.java similarity index 96% rename from src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/BlockMixin.java index 3b0899b..1eb9186 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/BlockMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/BlockMixin.java @@ -1,9 +1,9 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import dev.nyon.telekinesis.DropEvent; +import dev.nyon.magnetic.DropEvent; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.List; -import static dev.nyon.telekinesis.utils.MixinHelper.threadLocal; +import static dev.nyon.magnetic.utils.MixinHelper.threadLocal; @Mixin(Block.class) public abstract class BlockMixin { diff --git a/src/main/java/dev/nyon/telekinesis/mixins/BoatMixin.java b/src/main/java/dev/nyon/magnetic/mixins/BoatMixin.java similarity index 91% rename from src/main/java/dev/nyon/telekinesis/mixins/BoatMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/BoatMixin.java index 7cc83bd..9f9087d 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/BoatMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/BoatMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.item.Item; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java b/src/main/java/dev/nyon/magnetic/mixins/ChestBoatMixin.java similarity index 92% rename from src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/ChestBoatMixin.java index f486a11..d0f248a 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/ChestBoatMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/ChestBoatMixin.java @@ -1,9 +1,9 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import net.minecraft.world.entity.vehicle.ChestBoat; import org.spongepowered.asm.mixin.Mixin; /*? if >1.20.2 && <1.21.2 {*/ -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import net.minecraft.world.damagesource.DamageSource; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/EnchantmentsMixin.java b/src/main/java/dev/nyon/magnetic/mixins/EnchantmentsMixin.java similarity index 64% rename from src/main/java/dev/nyon/telekinesis/mixins/EnchantmentsMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/EnchantmentsMixin.java index 0b77e9c..6da6906 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/EnchantmentsMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/EnchantmentsMixin.java @@ -1,8 +1,9 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; /*? if <1.21 {*/ -/*import dev.nyon.telekinesis.MainKt; -import dev.nyon.telekinesis.TelekinesisEnchantment; +/*import dev.nyon.magnetic.MainKt; +import dev.nyon.magnetic.MagneticEnchantment; +import dev.nyon.magnetic.config.ConfigKt; import net.minecraft.core.Registry; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; @@ -20,21 +21,21 @@ public abstract class EnchantmentsMixin { /*? if <1.21 {*/ /*@Unique - private static boolean isTelekinesisRegistered = false; + private static boolean isEnchantmentRegistered = false; @Inject( method = "register", at = @At("RETURN") ) - private static void registerTelekinesis( + private static void registerEnchantment( String identifier, Enchantment enchantment, CallbackInfoReturnable cir ) { - if (!isTelekinesisRegistered) { - MainKt.setTelekinesis(new TelekinesisEnchantment()); - isTelekinesisRegistered = true; - Registry.register(BuiltInRegistries.ENCHANTMENT, new ResourceLocation("telekinesis", "telekinesis"), MainKt.getTelekinesis()); + if (!isEnchantmentRegistered && ConfigKt.getConfig().getNeedEnchantment()) { + MainKt.setMagnetic(new MagneticEnchantment()); + isEnchantmentRegistered = true; + Registry.register(BuiltInRegistries.ENCHANTMENT, new ResourceLocation("magnetic", "magnetic"), MainKt.getMagnetic()); } } *//*?}*/ diff --git a/src/main/java/dev/nyon/telekinesis/mixins/EnderManMixin.java b/src/main/java/dev/nyon/magnetic/mixins/EnderManMixin.java similarity index 94% rename from src/main/java/dev/nyon/telekinesis/mixins/EnderManMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/EnderManMixin.java index 856d4b2..637aae4 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/EnderManMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/EnderManMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.monster.EnderMan; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/FishingHookMixin.java b/src/main/java/dev/nyon/magnetic/mixins/FishingHookMixin.java similarity index 95% rename from src/main/java/dev/nyon/telekinesis/mixins/FishingHookMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/FishingHookMixin.java index 26738e4..a10cdac 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/FishingHookMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/FishingHookMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyReceiver; -import dev.nyon.telekinesis.DropEvent; +import dev.nyon.magnetic.DropEvent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.player.Player; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/LivingEntityMixin.java b/src/main/java/dev/nyon/magnetic/mixins/LivingEntityMixin.java similarity index 96% rename from src/main/java/dev/nyon/telekinesis/mixins/LivingEntityMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/LivingEntityMixin.java index 50d0a2d..c81b9f7 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/LivingEntityMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/LivingEntityMixin.java @@ -1,11 +1,11 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.sugar.Local; -import dev.nyon.telekinesis.DropEvent; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.DropEvent; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.damagesource.DamageSource; @@ -24,7 +24,7 @@ import java.util.List; import java.util.function.Consumer; -import static dev.nyon.telekinesis.utils.MixinHelper.threadLocal; +import static dev.nyon.magnetic.utils.MixinHelper.threadLocal; @Mixin(LivingEntity.class) public abstract class LivingEntityMixin { diff --git a/src/main/java/dev/nyon/telekinesis/mixins/MinecartTNTMixin.java b/src/main/java/dev/nyon/magnetic/mixins/MinecartTNTMixin.java similarity index 92% rename from src/main/java/dev/nyon/telekinesis/mixins/MinecartTNTMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/MinecartTNTMixin.java index 5033f75..9a4ba0e 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/MinecartTNTMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/MinecartTNTMixin.java @@ -1,4 +1,4 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import net.minecraft.world.entity.vehicle.MinecartTNT; import org.spongepowered.asm.mixin.Mixin; @@ -6,7 +6,7 @@ /*? if >1.20.2 && <1.21.2 {*/ import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.item.Item; import org.spongepowered.asm.mixin.injection.At; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/MobMixin.java b/src/main/java/dev/nyon/magnetic/mixins/MobMixin.java similarity index 96% rename from src/main/java/dev/nyon/telekinesis/mixins/MobMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/MobMixin.java index 18ffff6..df8bbce 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/MobMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/MobMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Mob; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/PigMixin.java b/src/main/java/dev/nyon/magnetic/mixins/PigMixin.java similarity index 92% rename from src/main/java/dev/nyon/telekinesis/mixins/PigMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/PigMixin.java index dd3b8a6..e09b535 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/PigMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/PigMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.animal.Pig; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/PiglinMixin.java b/src/main/java/dev/nyon/magnetic/mixins/PiglinMixin.java similarity index 92% rename from src/main/java/dev/nyon/telekinesis/mixins/PiglinMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/PiglinMixin.java index 1800f3c..ba158e4 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/PiglinMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/PiglinMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.monster.piglin.Piglin; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/PlayerMixin.java b/src/main/java/dev/nyon/magnetic/mixins/PlayerMixin.java similarity index 94% rename from src/main/java/dev/nyon/telekinesis/mixins/PlayerMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/PlayerMixin.java index 786ee20..728d19e 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/PlayerMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/PlayerMixin.java @@ -1,8 +1,8 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/dev/nyon/magnetic/mixins/RegistryDataLoaderMixin.java b/src/main/java/dev/nyon/magnetic/mixins/RegistryDataLoaderMixin.java new file mode 100644 index 0000000..a6746ee --- /dev/null +++ b/src/main/java/dev/nyon/magnetic/mixins/RegistryDataLoaderMixin.java @@ -0,0 +1,41 @@ +package dev.nyon.magnetic.mixins; + +import net.minecraft.resources.RegistryDataLoader; +import org.spongepowered.asm.mixin.Mixin; +/*? if >=1.21 {*/ +import com.google.gson.JsonElement; +import com.mojang.serialization.Decoder; +import dev.nyon.magnetic.MagneticEnchantmentKt; +import dev.nyon.magnetic.config.ConfigKt; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import net.minecraft.core.RegistrationInfo; +import net.minecraft.core.WritableRegistry; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.RegistryOps; +import net.minecraft.server.packs.resources.Resource; +/*?}*/ + +@Mixin(RegistryDataLoader.class) +public class RegistryDataLoaderMixin { + + /*? if >=1.21 {*/ + @Inject( + method = "loadElementFromResource", + at = @At("HEAD"), + cancellable = true + ) + private static void cancelMagneticEnchantmentRegister( + WritableRegistry registry, + Decoder decoder, + RegistryOps ops, + ResourceKey registryKey, + Resource resource, + RegistrationInfo info, + CallbackInfo ci + ) { + if (!ConfigKt.getConfig().getNeedEnchantment() && registryKey.location().equals(MagneticEnchantmentKt.getMagneticEnchantmentId())) ci.cancel(); + } + /*?}*/ +} diff --git a/src/main/java/dev/nyon/telekinesis/mixins/SheepMixin.java b/src/main/java/dev/nyon/magnetic/mixins/SheepMixin.java similarity index 94% rename from src/main/java/dev/nyon/telekinesis/mixins/SheepMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/SheepMixin.java index 5e1a469..6154a60 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/SheepMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/SheepMixin.java @@ -1,8 +1,8 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; @@ -15,9 +15,9 @@ /*? if <1.21.2 {*/ import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import net.minecraft.world.level.block.Block; -import static dev.nyon.telekinesis.utils.MixinHelper.threadLocal; +import static dev.nyon.magnetic.utils.MixinHelper.threadLocal; /*?} else {*/ -/*import dev.nyon.telekinesis.DropEvent; +/*import dev.nyon.magnetic.DropEvent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.damagesource.DamageSource; import org.apache.commons.lang3.mutable.MutableInt; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java b/src/main/java/dev/nyon/magnetic/mixins/SnowGolemMixin.java similarity index 91% rename from src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/SnowGolemMixin.java index 3092ede..1d7fd75 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/SnowGolemMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/SnowGolemMixin.java @@ -1,9 +1,9 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; /*? if <1.21.2 {*/ import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundSource; import net.minecraft.world.entity.player.Player; @@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArg; -import static dev.nyon.telekinesis.utils.MixinHelper.threadLocal; +import static dev.nyon.magnetic.utils.MixinHelper.threadLocal; /*?}*/ import net.minecraft.world.entity.animal.SnowGolem; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java b/src/main/java/dev/nyon/magnetic/mixins/SpawnerBlockMixin.java similarity index 91% rename from src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/SpawnerBlockMixin.java index 5e74861..83bb5ad 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/SpawnerBlockMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/SpawnerBlockMixin.java @@ -1,6 +1,6 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; -import dev.nyon.telekinesis.DropEvent; +import dev.nyon.magnetic.DropEvent; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -15,7 +15,7 @@ import java.util.ArrayList; -import static dev.nyon.telekinesis.utils.MixinHelper.threadLocal; +import static dev.nyon.magnetic.utils.MixinHelper.threadLocal; @Mixin(SpawnerBlock.class) public class SpawnerBlockMixin { diff --git a/src/main/java/dev/nyon/telekinesis/mixins/StriderMixin.java b/src/main/java/dev/nyon/magnetic/mixins/StriderMixin.java similarity index 93% rename from src/main/java/dev/nyon/telekinesis/mixins/StriderMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/StriderMixin.java index 89d7aad..36032fd 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/StriderMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/StriderMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.monster.Strider; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/SweetBerryBushBlockMixin.java b/src/main/java/dev/nyon/magnetic/mixins/SweetBerryBushBlockMixin.java similarity index 94% rename from src/main/java/dev/nyon/telekinesis/mixins/SweetBerryBushBlockMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/SweetBerryBushBlockMixin.java index f9904c1..37227d3 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/SweetBerryBushBlockMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/SweetBerryBushBlockMixin.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/VehicleEntityMixin.java b/src/main/java/dev/nyon/magnetic/mixins/VehicleEntityMixin.java similarity index 94% rename from src/main/java/dev/nyon/telekinesis/mixins/VehicleEntityMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/VehicleEntityMixin.java index acbdc45..409254b 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/VehicleEntityMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/VehicleEntityMixin.java @@ -1,9 +1,9 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.damagesource.DamageSource; @@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; -import static dev.nyon.telekinesis.utils.MixinHelper.threadLocal; +import static dev.nyon.magnetic.utils.MixinHelper.threadLocal; @Pseudo @Mixin(targets = "net.minecraft.world.entity.vehicle.VehicleEntity") diff --git a/src/main/java/dev/nyon/telekinesis/mixins/WitherBossMixin.java b/src/main/java/dev/nyon/magnetic/mixins/WitherBossMixin.java similarity index 94% rename from src/main/java/dev/nyon/telekinesis/mixins/WitherBossMixin.java rename to src/main/java/dev/nyon/magnetic/mixins/WitherBossMixin.java index 49fbb56..48991bd 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/WitherBossMixin.java +++ b/src/main/java/dev/nyon/magnetic/mixins/WitherBossMixin.java @@ -1,6 +1,6 @@ -package dev.nyon.telekinesis.mixins; +package dev.nyon.magnetic.mixins; -import dev.nyon.telekinesis.utils.MixinHelper; +import dev.nyon.magnetic.utils.MixinHelper; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.boss.wither.WitherBoss; diff --git a/src/main/java/dev/nyon/telekinesis/mixins/invokers/ExperienceOrbInvoker.java b/src/main/java/dev/nyon/magnetic/mixins/invokers/ExperienceOrbInvoker.java similarity index 86% rename from src/main/java/dev/nyon/telekinesis/mixins/invokers/ExperienceOrbInvoker.java rename to src/main/java/dev/nyon/magnetic/mixins/invokers/ExperienceOrbInvoker.java index 4250c19..a308a1e 100644 --- a/src/main/java/dev/nyon/telekinesis/mixins/invokers/ExperienceOrbInvoker.java +++ b/src/main/java/dev/nyon/magnetic/mixins/invokers/ExperienceOrbInvoker.java @@ -1,4 +1,4 @@ -package dev.nyon.telekinesis.mixins.invokers; +package dev.nyon.magnetic.mixins.invokers; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.ExperienceOrb; @@ -11,7 +11,7 @@ public interface ExperienceOrbInvoker { @Invoker("repairPlayerItems") int invokeRepairPlayerItems( - /*? if >=1.21 {*/ ServerPlayer serverPlayer /*?} else {*/ /*Player player *//*?}*/, + /*? if >=1.21 {*/ ServerPlayer serverPlayer /*?} else {*/ /*Player player*//*?}*/, int i ); } diff --git a/src/main/java/dev/nyon/telekinesis/utils/MixinHelper.java b/src/main/java/dev/nyon/magnetic/utils/MixinHelper.java similarity index 97% rename from src/main/java/dev/nyon/telekinesis/utils/MixinHelper.java rename to src/main/java/dev/nyon/magnetic/utils/MixinHelper.java index 73df291..9cbedd7 100644 --- a/src/main/java/dev/nyon/telekinesis/utils/MixinHelper.java +++ b/src/main/java/dev/nyon/magnetic/utils/MixinHelper.java @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis.utils; +package dev.nyon.magnetic.utils; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import dev.nyon.telekinesis.DropEvent; +import dev.nyon.magnetic.DropEvent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundSource; import net.minecraft.world.damagesource.DamageSource; @@ -9,11 +9,9 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.Shearable; import net.minecraft.world.entity.player.Player; -/*? if >=1.20.4 {*/ +//? if >=1.20.4 import net.minecraft.world.entity.vehicle.VehicleEntity; import net.minecraft.world.item.Item; -/*?}*/ -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import org.apache.commons.lang3.mutable.MutableInt; diff --git a/src/main/kotlin/dev/nyon/telekinesis/DropEvent.kt b/src/main/kotlin/dev/nyon/magnetic/DropEvent.kt similarity index 83% rename from src/main/kotlin/dev/nyon/telekinesis/DropEvent.kt rename to src/main/kotlin/dev/nyon/magnetic/DropEvent.kt index d4b68e4..59ecb24 100644 --- a/src/main/kotlin/dev/nyon/telekinesis/DropEvent.kt +++ b/src/main/kotlin/dev/nyon/magnetic/DropEvent.kt @@ -1,7 +1,7 @@ -package dev.nyon.telekinesis +package dev.nyon.magnetic -import dev.nyon.telekinesis.config.config -import dev.nyon.telekinesis.mixins.invokers.ExperienceOrbInvoker +import dev.nyon.magnetic.config.config +import dev.nyon.magnetic.mixins.invokers.ExperienceOrbInvoker import net.fabricmc.fabric.api.event.Event import net.fabricmc.fabric.api.event.EventFactory import net.minecraft.server.level.ServerPlayer @@ -22,7 +22,7 @@ object DropEvent { @Suppress("unused", "KotlinConstantConditions") private val listener = event.register { items, exp, player, tool -> if (config.needSneak && !player.isCrouching) return@register - if (config.needEnchantment && /*? if >=1.21 {*/ !EnchantmentHelper.hasTag(tool, telekinesisEffectId)/*?} else {*/ /*EnchantmentHelper.getItemEnchantmentLevel(telekinesis, tool) == 0 *//*?}*/) return@register + if (config.needEnchantment && /*? if >=1.21 {*/ !EnchantmentHelper.hasTag(tool, magneticEffectId)/*?} else {*/ /*EnchantmentHelper.getItemEnchantmentLevel(magnetic, tool) == 0 *//*?}*/) return@register if (config.itemsAllowed) items.removeIf(player::addItem) if (config.expAllowed) { diff --git a/src/main/kotlin/dev/nyon/telekinesis/TelekinesisEnchantment.kt b/src/main/kotlin/dev/nyon/magnetic/MagneticEnchantment.kt similarity index 72% rename from src/main/kotlin/dev/nyon/telekinesis/TelekinesisEnchantment.kt rename to src/main/kotlin/dev/nyon/magnetic/MagneticEnchantment.kt index 9b94a8e..1b0816f 100644 --- a/src/main/kotlin/dev/nyon/telekinesis/TelekinesisEnchantment.kt +++ b/src/main/kotlin/dev/nyon/magnetic/MagneticEnchantment.kt @@ -1,4 +1,4 @@ -package dev.nyon.telekinesis +package dev.nyon.magnetic import net.minecraft.world.item.enchantment.Enchantment /*? if >=1.21 {*/ @@ -6,8 +6,8 @@ import net.minecraft.core.registries.Registries import net.minecraft.resources.ResourceLocation import net.minecraft.tags.TagKey -val telekinesisEffectId: TagKey = TagKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath("telekinesis", "auto_move")) -val telekinesisEnchantmentId: ResourceLocation = ResourceLocation.fromNamespaceAndPath("telekinesis", "telekinesis") +val magneticEffectId: TagKey = TagKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath("magnetic", "auto_move")) +val magneticEnchantmentId: ResourceLocation = ResourceLocation.fromNamespaceAndPath("magnetic", "magnetic") /*?} elif <1.21 && >=1.20.5 {*/ /*import net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags import net.minecraft.ChatFormatting @@ -23,7 +23,7 @@ import net.minecraft.world.entity.EquipmentSlot *//*?}*/ /*? if =1.20.6 {*/ -/*class TelekinesisEnchantment : Enchantment( +/*class MagneticEnchantment : Enchantment( definition( ConventionalItemTags.TOOLS, 2, @@ -35,10 +35,10 @@ import net.minecraft.world.entity.EquipmentSlot ) ) { override fun getFullname(i: Int): Component = - Component.translatable("enchantment.telekinesis.telekinesis.name").withStyle(ChatFormatting.GRAY) + Component.translatable("enchantment.magnetic.magnetic.name").withStyle(ChatFormatting.GRAY) } *//*?} elif <1.20.5 {*/ -/*class TelekinesisEnchantment : Enchantment( +/*class MagneticEnchantment : Enchantment( Rarity.RARE, EnchantmentCategory.BREAKABLE, listOf(EquipmentSlot.OFFHAND, EquipmentSlot.MAINHAND).toTypedArray() ) { override fun getMinLevel(): Int = 1 @@ -51,6 +51,6 @@ import net.minecraft.world.entity.EquipmentSlot override fun getDamageBonus(i: Int, mobType: MobType): Float = 0F override fun getFullname(i: Int): Component = - Component.translatable("enchantment.telekinesis.telekinesis.name").withStyle(ChatFormatting.GRAY) + Component.translatable("enchantment.magnetic.magnetic.name").withStyle(ChatFormatting.GRAY) } *//*?}*/ \ No newline at end of file diff --git a/src/main/kotlin/dev/nyon/telekinesis/TelekinesisEnchantmentGenerator.kt b/src/main/kotlin/dev/nyon/magnetic/MagneticEnchantmentGenerator.kt similarity index 82% rename from src/main/kotlin/dev/nyon/telekinesis/TelekinesisEnchantmentGenerator.kt rename to src/main/kotlin/dev/nyon/magnetic/MagneticEnchantmentGenerator.kt index 24b08b6..7b8e7b8 100644 --- a/src/main/kotlin/dev/nyon/telekinesis/TelekinesisEnchantmentGenerator.kt +++ b/src/main/kotlin/dev/nyon/magnetic/MagneticEnchantmentGenerator.kt @@ -1,4 +1,4 @@ -package dev.nyon.telekinesis +package dev.nyon.magnetic import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator @@ -19,25 +19,25 @@ import net.minecraft.world.item.enchantment.Enchantment.dynamicCost import java.util.concurrent.CompletableFuture /*?}*/ -class TelekinesisEnchantmentGenerator : DataGeneratorEntrypoint { +class MagneticEnchantmentGenerator : DataGeneratorEntrypoint { override fun onInitializeDataGenerator(generator: FabricDataGenerator) { /*? if >=1.21 {*/ val pack = generator.createPack() pack.addProvider(::EnchantmentProvider) - pack.addProvider(::TelekinesisEnchantmentTagProvider) + pack.addProvider(::MagneticEnchantmentTagProvider) /*?}*/ } } /*? if >=1.21 {*/ -private class TelekinesisEnchantmentTagProvider( +private class MagneticEnchantmentTagProvider( output: FabricDataOutput, completableFuture: CompletableFuture ) : EnchantmentTagProvider(output, completableFuture) { override fun addTags(registries: HolderLookup.Provider) { - val enchantmentResourceKey = ResourceKey.create(Registries.ENCHANTMENT, telekinesisEnchantmentId) + val enchantmentResourceKey = ResourceKey.create(Registries.ENCHANTMENT, magneticEnchantmentId) listOf( - getOrCreateTagBuilder(telekinesisEffectId), + getOrCreateTagBuilder(magneticEffectId), getOrCreateTagBuilder(EnchantmentTags.TRADEABLE), getOrCreateTagBuilder(EnchantmentTags.IN_ENCHANTING_TABLE), getOrCreateTagBuilder(EnchantmentTags.TREASURE) @@ -51,7 +51,7 @@ private class EnchantmentProvider( output: FabricDataOutput, registriesFuture: CompletableFuture ) : FabricDynamicRegistryProvider(output, registriesFuture) { override fun getName(): String { - return "Telekinesis Enchantment Generation" + return "Magnetic Enchantment Generation" } override fun configure(registries: HolderLookup.Provider, entries: Entries) { @@ -66,9 +66,9 @@ private class EnchantmentProvider( ) val enchantment = Enchantment.enchantment(enchantmentDefinition).build( - ResourceLocation.fromNamespaceAndPath("telekinesis", "telekinesis.name") + ResourceLocation.fromNamespaceAndPath("magnetic", "magnetic.name") ) - entries.add(ResourceKey.create(Registries.ENCHANTMENT, telekinesisEnchantmentId), enchantment) + entries.add(ResourceKey.create(Registries.ENCHANTMENT, magneticEnchantmentId), enchantment) } } /*?}*/ \ No newline at end of file diff --git a/src/main/kotlin/dev/nyon/magnetic/Main.kt b/src/main/kotlin/dev/nyon/magnetic/Main.kt new file mode 100644 index 0000000..917b5ca --- /dev/null +++ b/src/main/kotlin/dev/nyon/magnetic/Main.kt @@ -0,0 +1,10 @@ +@file:Suppress("unused") + +package dev.nyon.magnetic + +//? if <=1.20.6 +/*lateinit var magnetic: MagneticEnchantment*/ + +fun init() { + DropEvent +} diff --git a/src/main/kotlin/dev/nyon/magnetic/config/Config.kt b/src/main/kotlin/dev/nyon/magnetic/config/Config.kt new file mode 100644 index 0000000..bf12bdc --- /dev/null +++ b/src/main/kotlin/dev/nyon/magnetic/config/Config.kt @@ -0,0 +1,19 @@ +package dev.nyon.magnetic.config + +import dev.nyon.konfig.config.config +import dev.nyon.konfig.config.loadConfig +import kotlinx.serialization.Serializable +import net.fabricmc.loader.api.FabricLoader + +val config: Config by lazy { + config(FabricLoader.getInstance().configDir.resolve("magnetic.json"), 1, Config()) { _, _ -> null } + loadConfig() +} + +@Serializable +data class Config( + var needEnchantment: Boolean = true, + var needSneak: Boolean = false, + var expAllowed: Boolean = true, + var itemsAllowed: Boolean = true +) \ No newline at end of file diff --git a/src/main/kotlin/dev/nyon/telekinesis/config/TelekinesisConfigScreen.kt b/src/main/kotlin/dev/nyon/magnetic/config/MagneticConfigScreen.kt similarity index 95% rename from src/main/kotlin/dev/nyon/telekinesis/config/TelekinesisConfigScreen.kt rename to src/main/kotlin/dev/nyon/magnetic/config/MagneticConfigScreen.kt index 7c54daf..409c7d8 100644 --- a/src/main/kotlin/dev/nyon/telekinesis/config/TelekinesisConfigScreen.kt +++ b/src/main/kotlin/dev/nyon/magnetic/config/MagneticConfigScreen.kt @@ -1,4 +1,4 @@ -package dev.nyon.telekinesis.config +package dev.nyon.magnetic.config import dev.isxander.yacl3.dsl.YetAnotherConfigLib import dev.isxander.yacl3.dsl.controller @@ -7,7 +7,7 @@ import dev.isxander.yacl3.dsl.tickBox import dev.nyon.konfig.config.saveConfig import net.minecraft.client.gui.screens.Screen -fun generateConfigScreen(parent: Screen? = null): Screen = YetAnotherConfigLib("telekinesis") { +fun generateConfigScreen(parent: Screen? = null): Screen = YetAnotherConfigLib("magnetic") { val general by categories.registering { val needEnchantment by rootOptions.registering { binding(true, { config.needEnchantment }, { config.needEnchantment = it }) diff --git a/src/main/kotlin/dev/nyon/telekinesis/config/ModMenuImpl.kt b/src/main/kotlin/dev/nyon/magnetic/config/ModMenuImpl.kt similarity index 90% rename from src/main/kotlin/dev/nyon/telekinesis/config/ModMenuImpl.kt rename to src/main/kotlin/dev/nyon/magnetic/config/ModMenuImpl.kt index c8b6f1c..4e34d72 100644 --- a/src/main/kotlin/dev/nyon/telekinesis/config/ModMenuImpl.kt +++ b/src/main/kotlin/dev/nyon/magnetic/config/ModMenuImpl.kt @@ -1,4 +1,4 @@ -package dev.nyon.telekinesis.config +package dev.nyon.magnetic.config import com.terraformersmc.modmenu.api.ConfigScreenFactory import com.terraformersmc.modmenu.api.ModMenuApi diff --git a/src/main/kotlin/dev/nyon/telekinesis/Main.kt b/src/main/kotlin/dev/nyon/telekinesis/Main.kt deleted file mode 100644 index f02e0c5..0000000 --- a/src/main/kotlin/dev/nyon/telekinesis/Main.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") - -package dev.nyon.telekinesis - -import dev.nyon.konfig.config.config -import dev.nyon.konfig.config.loadConfig -import dev.nyon.telekinesis.config.Config -import net.fabricmc.loader.api.FabricLoader -import dev.nyon.telekinesis.config.config as internalConfig - -//? if <=1.20.6 -/*lateinit var telekinesis: TelekinesisEnchantment*/ - -fun init() { - config(FabricLoader.getInstance().configDir.resolve("telekinesis.json"), 1, Config()) { _, _ -> null } - internalConfig = loadConfig() - DropEvent -} diff --git a/src/main/kotlin/dev/nyon/telekinesis/config/Config.kt b/src/main/kotlin/dev/nyon/telekinesis/config/Config.kt deleted file mode 100644 index 20e1e65..0000000 --- a/src/main/kotlin/dev/nyon/telekinesis/config/Config.kt +++ /dev/null @@ -1,13 +0,0 @@ -package dev.nyon.telekinesis.config - -import kotlinx.serialization.Serializable - -lateinit var config: Config - -@Serializable -data class Config( - var needEnchantment: Boolean = true, - var needSneak: Boolean = false, - var expAllowed: Boolean = true, - var itemsAllowed: Boolean = true -) \ No newline at end of file diff --git a/src/main/resources/assets/telekinesis/icon.png b/src/main/resources/assets/magnetic/icon.png similarity index 100% rename from src/main/resources/assets/telekinesis/icon.png rename to src/main/resources/assets/magnetic/icon.png diff --git a/src/main/resources/assets/magnetic/lang/de_de.json b/src/main/resources/assets/magnetic/lang/de_de.json new file mode 100644 index 0000000..1deeff9 --- /dev/null +++ b/src/main/resources/assets/magnetic/lang/de_de.json @@ -0,0 +1,13 @@ +{ + "yacl3.config.magnetic.title": "magnetic", + "yacl3.config.magnetic.category.general": "Allgemein", + "yacl3.config.magnetic.category.general.root.option.needEnchantment": "Enchantment benötigt", + "yacl3.config.magnetic.category.general.root.option.needEnchantment.description": "Legt fest, ob Magnetic nur mit einem Magnetic verzauberten Werkzeug funktionieren soll.", + "yacl3.config.magnetic.category.general.root.option.needSneak": "Nur beim sneaken", + "yacl3.config.magnetic.category.general.root.option.needSneak.description": "Entscheidet, ob Magnetic nur funktionieren soll, wenn man sneakt.", + "yacl3.config.magnetic.category.general.root.option.expAllowed": "XP", + "yacl3.config.magnetic.category.general.root.option.expAllowed.description": "Entscheidet, ob Magnetic für auch für XP Drops funktionieren soll.", + "yacl3.config.magnetic.category.general.root.option.itemsAllowed": "Items", + "yacl3.config.magnetic.category.general.root.option.itemsAllowed.description": "Entscheidet, ob Magnetic für auch für Item Drops funktionieren soll.", + "enchantment.magnetic.magnetic.name": "Magnetic" +} \ No newline at end of file diff --git a/src/main/resources/assets/magnetic/lang/en_us.json b/src/main/resources/assets/magnetic/lang/en_us.json new file mode 100644 index 0000000..1480e41 --- /dev/null +++ b/src/main/resources/assets/magnetic/lang/en_us.json @@ -0,0 +1,13 @@ +{ + "yacl3.config.magnetic.title": "magnetic", + "yacl3.config.magnetic.category.general": "General", + "yacl3.config.magnetic.category.general.root.option.needEnchantment": "Need enchantment", + "yacl3.config.magnetic.category.general.root.option.needEnchantment.description": "Decides whether Magnetic should only work with the enchantment.", + "yacl3.config.magnetic.category.general.root.option.needSneak": "Only while sneaking", + "yacl3.config.magnetic.category.general.root.option.needSneak.description": "Decides whether players should have to sneak to use Magnetic.", + "yacl3.config.magnetic.category.general.root.option.expAllowed": "Exp drops", + "yacl3.config.magnetic.category.general.root.option.expAllowed.description": "Decides whether Magnetic should also work for exp drops.", + "yacl3.config.magnetic.category.general.root.option.itemsAllowed": "Items", + "yacl3.config.magnetic.category.general.root.option.itemsAllowed.description": "Decides whether Magnetic should also work for item drops.", + "enchantment.magnetic.magnetic.name": "Magnetic" +} \ No newline at end of file diff --git a/src/main/resources/assets/telekinesis/lang/de_de.json b/src/main/resources/assets/telekinesis/lang/de_de.json deleted file mode 100644 index c1e3fee..0000000 --- a/src/main/resources/assets/telekinesis/lang/de_de.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "yacl3.config.telekinesis.title": "telekinesis", - "yacl3.config.telekinesis.category.general": "Allgemein", - "yacl3.config.telekinesis.category.general.root.option.needEnchantment": "Enchantment benötigt", - "yacl3.config.telekinesis.category.general.root.option.needEnchantment.description": "Legt fest, ob Telekinesis nur mit einem Telekinesis verzauberten Werkzeug funktionieren soll.", - "yacl3.config.telekinesis.category.general.root.option.needSneak": "Nur beim sneaken", - "yacl3.config.telekinesis.category.general.root.option.needSneak.description": "Entscheidet, ob Telekinesis nur funktionieren soll, wenn man sneakt.", - "yacl3.config.telekinesis.category.general.root.option.expAllowed": "XP", - "yacl3.config.telekinesis.category.general.root.option.expAllowed.description": "Entscheidet, ob Telekinesis für auch für XP Drops funktionieren soll.", - "yacl3.config.telekinesis.category.general.root.option.itemsAllowed": "Items", - "yacl3.config.telekinesis.category.general.root.option.itemsAllowed.description": "Entscheidet, ob Telekinesis für auch für Item Drops funktionieren soll.", - "enchantment.telekinesis.telekinesis.name": "Telekinesis" -} \ No newline at end of file diff --git a/src/main/resources/assets/telekinesis/lang/en_us.json b/src/main/resources/assets/telekinesis/lang/en_us.json deleted file mode 100644 index 4c2bd44..0000000 --- a/src/main/resources/assets/telekinesis/lang/en_us.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "yacl3.config.telekinesis.title": "telekinesis", - "yacl3.config.telekinesis.category.general": "General", - "yacl3.config.telekinesis.category.general.root.option.needEnchantment": "Need enchantment", - "yacl3.config.telekinesis.category.general.root.option.needEnchantment.description": "Decides whether telekinesis should only work with the enchantment.", - "yacl3.config.telekinesis.category.general.root.option.needSneak": "Only while sneaking", - "yacl3.config.telekinesis.category.general.root.option.needSneak.description": "Decides whether players should have to sneak to use telekinesis.", - "yacl3.config.telekinesis.category.general.root.option.expAllowed": "Exp drops", - "yacl3.config.telekinesis.category.general.root.option.expAllowed.description": "Decides whether telekinesis should also work for exp drops.", - "yacl3.config.telekinesis.category.general.root.option.itemsAllowed": "Items", - "yacl3.config.telekinesis.category.general.root.option.itemsAllowed.description": "Decides whether telekinesis should also work for item drops.", - "enchantment.telekinesis.telekinesis.name": "Telekinesis" -} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 2f96b0c..8bd15b0 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -4,10 +4,10 @@ "name": "${name}", "description": "${description}", "contact": { - "issues": "https://github.com/btwonion/telekinesis/issues", - "sources": "https://github.com/btwonion/telekinesis" + "issues": "https://github.com/btwonion/magnetic/issues", + "sources": "https://github.com/btwonion/magnetic" }, - "icon": "assets/telekinesis/icon.png", + "icon": "assets/magnetic/icon.png", "authors": [ "btwonion" ], @@ -27,25 +27,25 @@ }, "entrypoints": { "fabric-datagen": [ - "dev.nyon.telekinesis.TelekinesisEnchantmentGenerator" + "dev.nyon.magnetic.MagneticEnchantmentGenerator" ], "main": [ { "adapter": "kotlin", - "value": "dev.nyon.telekinesis.MainKt::init" + "value": "dev.nyon.magnetic.MainKt::init" } ], "modmenu": [ { "adapter": "kotlin", - "value": "dev.nyon.telekinesis.config.ModMenuImpl" + "value": "dev.nyon.magnetic.config.ModMenuImpl" } ] }, "mixins": [ - "telekinesis.mixins.json" + "magnetic.mixins.json" ], - "accessWidener": "telekinesis.accesswidener", + "accessWidener": "magnetic.accesswidener", "custom": { "modmenu": { "links": { diff --git a/src/main/resources/telekinesis.accesswidener b/src/main/resources/magnetic.accesswidener similarity index 100% rename from src/main/resources/telekinesis.accesswidener rename to src/main/resources/magnetic.accesswidener diff --git a/src/main/resources/telekinesis.mixins.json b/src/main/resources/magnetic.mixins.json similarity index 91% rename from src/main/resources/telekinesis.mixins.json rename to src/main/resources/magnetic.mixins.json index 162a392..00e6760 100644 --- a/src/main/resources/telekinesis.mixins.json +++ b/src/main/resources/magnetic.mixins.json @@ -1,7 +1,7 @@ { "required": true, "minVersion": "0.8", - "package": "dev.nyon.telekinesis.mixins", + "package": "dev.nyon.magnetic.mixins", "compatibilityLevel": "JAVA_17", "mixins": [ "AbstractChestedHorseMixin", @@ -15,6 +15,7 @@ "EnderManMixin", "FishingHookMixin", "LivingEntityMixin", + "RegistryDataLoaderMixin", "MinecartTNTMixin", "MobMixin", "PiglinMixin", diff --git a/stonecutter.gradle.kts b/stonecutter.gradle.kts index 0069430..75eb109 100644 --- a/stonecutter.gradle.kts +++ b/stonecutter.gradle.kts @@ -63,7 +63,7 @@ tasks.register("postUpdate") { val changelogText = rootProject.file("changelog.md").readText() val webhook = DiscordWebhook( username = "${rootProject.name} Release Notifier", - avatarUrl = "https://raw.githubusercontent.com/btwonion/telekinesis/master/src/main/resources/assets/telekinesis/icon.png", + avatarUrl = "https://raw.githubusercontent.com/btwonion/magnetic/master/src/main/resources/assets/magnetic/icon.png", embeds = listOf( Embed( title = "v$featureVersion of ${rootProject.name} released!", @@ -77,8 +77,8 @@ tasks.register("postUpdate") { .flatten().toSet().joinToString(), false ), - Field("Modrinth", "https://modrinth.com/mod/telekinesis", true), - Field("GitHub", "https://github.com/btwonion/telekinesis", true) + Field("Modrinth", "https://modrinth.com/mod/magnetic", true), + Field("GitHub", "https://github.com/btwonion/magnetic", true) ), ) ) diff --git a/versions/1.21.2/gradle.properties b/versions/1.21.2/gradle.properties index 2ac8944..d2940b7 100644 --- a/versions/1.21.2/gradle.properties +++ b/versions/1.21.2/gradle.properties @@ -1,7 +1,7 @@ versionName=1.21.2 -mcVersion=1.21.2-rc1 +mcVersion=1.21.2 mcVersionRange=>1.20.6 -supportedMcVersions=1.21.2,1.21.3 +supportedMcVersions=1.21.2,1.21.3,1.21.4 deps.quiltmappings=1.21.2-pre5+build.1 deps.fapi=0.106.0+1.21.2 diff --git a/versions/1.21.2/src/main/generated/data/telekinesis/enchantment/telekinesis.json b/versions/1.21.2/src/main/generated/data/magnetic/enchantment/magnetic.json similarity index 82% rename from versions/1.21.2/src/main/generated/data/telekinesis/enchantment/telekinesis.json rename to versions/1.21.2/src/main/generated/data/magnetic/enchantment/magnetic.json index d589ea8..9cf1b10 100644 --- a/versions/1.21.2/src/main/generated/data/telekinesis/enchantment/telekinesis.json +++ b/versions/1.21.2/src/main/generated/data/magnetic/enchantment/magnetic.json @@ -1,7 +1,7 @@ { "anvil_cost": 7, "description": { - "translate": "enchantment.telekinesis.telekinesis.name" + "translate": "enchantment.magnetic.magnetic.name" }, "max_cost": { "base": 75, diff --git a/versions/1.21.2/src/main/generated/data/telekinesis/tags/enchantment/auto_move.json b/versions/1.21.2/src/main/generated/data/magnetic/tags/enchantment/auto_move.json similarity index 59% rename from versions/1.21.2/src/main/generated/data/telekinesis/tags/enchantment/auto_move.json rename to versions/1.21.2/src/main/generated/data/magnetic/tags/enchantment/auto_move.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21.2/src/main/generated/data/telekinesis/tags/enchantment/auto_move.json +++ b/versions/1.21.2/src/main/generated/data/magnetic/tags/enchantment/auto_move.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json b/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json +++ b/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/tradeable.json b/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/tradeable.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/tradeable.json +++ b/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/tradeable.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/treasure.json b/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/treasure.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/treasure.json +++ b/versions/1.21.2/src/main/generated/data/minecraft/tags/enchantment/treasure.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21/src/main/generated/data/telekinesis/enchantment/telekinesis.json b/versions/1.21/src/main/generated/data/magnetic/enchantment/magnetic.json similarity index 82% rename from versions/1.21/src/main/generated/data/telekinesis/enchantment/telekinesis.json rename to versions/1.21/src/main/generated/data/magnetic/enchantment/magnetic.json index d589ea8..9cf1b10 100644 --- a/versions/1.21/src/main/generated/data/telekinesis/enchantment/telekinesis.json +++ b/versions/1.21/src/main/generated/data/magnetic/enchantment/magnetic.json @@ -1,7 +1,7 @@ { "anvil_cost": 7, "description": { - "translate": "enchantment.telekinesis.telekinesis.name" + "translate": "enchantment.magnetic.magnetic.name" }, "max_cost": { "base": 75, diff --git a/versions/1.21/src/main/generated/data/telekinesis/tags/enchantment/auto_move.json b/versions/1.21/src/main/generated/data/magnetic/tags/enchantment/auto_move.json similarity index 59% rename from versions/1.21/src/main/generated/data/telekinesis/tags/enchantment/auto_move.json rename to versions/1.21/src/main/generated/data/magnetic/tags/enchantment/auto_move.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21/src/main/generated/data/telekinesis/tags/enchantment/auto_move.json +++ b/versions/1.21/src/main/generated/data/magnetic/tags/enchantment/auto_move.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json b/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json +++ b/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/in_enchanting_table.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/tradeable.json b/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/tradeable.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/tradeable.json +++ b/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/tradeable.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ] diff --git a/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/treasure.json b/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/treasure.json index 0d9aebf..0a653b6 100644 --- a/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/treasure.json +++ b/versions/1.21/src/main/generated/data/minecraft/tags/enchantment/treasure.json @@ -1,7 +1,7 @@ { "values": [ { - "id": "telekinesis:telekinesis", + "id": "magnetic:magnetic", "required": false } ]