-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rebrand to "magnetic" * also rename media * rename config screen class * do not register enchantment under some circumstances * use different approach * rename data loader mixin
- Loading branch information
Showing
63 changed files
with
232 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ jobs: | |
- uses: funnyboy-roks/[email protected] | ||
with: | ||
auth-token: ${{ secrets.MODRINTH_API_KEY }} | ||
slug: 'telekinesis' | ||
slug: 'magnetic' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
- change icon | ||
- re-require yacl | ||
- rename doubled function name in MobMixin | ||
- rebrand mod to "magnetic" | ||
- do not register telekinesis enchantment if "needEnchantment" is false |
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
rootProject.name = "telekinesis" | ||
rootProject.name = "magnetic" | ||
|
||
pluginManagement { | ||
repositories { | ||
|
4 changes: 2 additions & 2 deletions
4
...sis/mixins/AbstractChestedHorseMixin.java → ...tic/mixins/AbstractChestedHorseMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...elekinesis/mixins/AbstractHorseMixin.java → ...n/magnetic/mixins/AbstractHorseMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...kinesis/mixins/AbstractMinecartMixin.java → ...agnetic/mixins/AbstractMinecartMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...v/nyon/telekinesis/mixins/AllayMixin.java → .../dev/nyon/magnetic/mixins/AllayMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ev/nyon/telekinesis/mixins/BoatMixin.java → ...a/dev/nyon/magnetic/mixins/BoatMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...on/telekinesis/mixins/ChestBoatMixin.java → .../nyon/magnetic/mixins/ChestBoatMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...yon/telekinesis/mixins/EnderManMixin.java → ...v/nyon/magnetic/mixins/EnderManMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../telekinesis/mixins/FishingHookMixin.java → ...yon/magnetic/mixins/FishingHookMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../telekinesis/mixins/MinecartTNTMixin.java → ...yon/magnetic/mixins/MinecartTNTMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...dev/nyon/telekinesis/mixins/MobMixin.java → ...va/dev/nyon/magnetic/mixins/MobMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...dev/nyon/telekinesis/mixins/PigMixin.java → ...va/dev/nyon/magnetic/mixins/PigMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../nyon/telekinesis/mixins/PiglinMixin.java → ...dev/nyon/magnetic/mixins/PiglinMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../nyon/telekinesis/mixins/PlayerMixin.java → ...dev/nyon/magnetic/mixins/PlayerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/dev/nyon/magnetic/mixins/RegistryDataLoaderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <E> void cancelMagneticEnchantmentRegister( | ||
WritableRegistry<E> registry, | ||
Decoder<E> decoder, | ||
RegistryOps<JsonElement> ops, | ||
ResourceKey<E> registryKey, | ||
Resource resource, | ||
RegistrationInfo info, | ||
CallbackInfo ci | ||
) { | ||
if (!ConfigKt.getConfig().getNeedEnchantment() && registryKey.location().equals(MagneticEnchantmentKt.getMagneticEnchantmentId())) ci.cancel(); | ||
} | ||
/*?}*/ | ||
} |
Oops, something went wrong.