diff options
author | nea <nea@nea.moe> | 2023-06-08 00:11:46 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-06-08 00:11:46 +0200 |
commit | f98a1f5d53792c026c3688fa89dea3e69910cb3a (patch) | |
tree | 873ee14abe51b1d229149c62f4958252026505fa /src/main/java/moe/nea/firmament/init | |
parent | b65382a7b74836e13d8d9c9104971737288d1496 (diff) | |
download | firmament-f98a1f5d53792c026c3688fa89dea3e69910cb3a.tar.gz firmament-f98a1f5d53792c026c3688fa89dea3e69910cb3a.tar.bz2 firmament-f98a1f5d53792c026c3688fa89dea3e69910cb3a.zip |
Update to 1.20
- Remove some devenv mods that are not updated yet
- Replace lib39 with fletchingtable for automixins
- Use non kotlin entrypoints
- Make use of DrawContext in a bunch of places
Diffstat (limited to 'src/main/java/moe/nea/firmament/init')
-rw-r--r-- | src/main/java/moe/nea/firmament/init/MixinPlugin.java | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/main/java/moe/nea/firmament/init/MixinPlugin.java b/src/main/java/moe/nea/firmament/init/MixinPlugin.java index 79a1789..663c9d9 100644 --- a/src/main/java/moe/nea/firmament/init/MixinPlugin.java +++ b/src/main/java/moe/nea/firmament/init/MixinPlugin.java @@ -18,25 +18,49 @@ package moe.nea.firmament.init; -import com.unascribed.lib39.core.api.AutoMixin; +import org.objectweb.asm.tree.ClassNode; +import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; +import org.spongepowered.asm.mixin.extensibility.IMixinInfo; import java.util.List; +import java.util.Set; -// TODO: replace AutoMixin with KSP plugin? -public class MixinPlugin extends AutoMixin { +public class MixinPlugin implements IMixinConfigPlugin { + + @Override + public void onLoad(String mixinPackage) { + } + + @Override + public String getRefMapperConfig() { + return null; + } @Override public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { if (!Boolean.getBoolean("firmament.debug") && mixinClassName.contains("devenv.")) { return false; } - return super.shouldApplyMixin(targetClassName, mixinClassName); + return true; + } + + @Override + public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) { + } @Override public List<String> getMixins() { - var autoDiscoveredMixins = super.getMixins(); - autoDiscoveredMixins.removeIf(it -> !shouldApplyMixin(null, it)); - return autoDiscoveredMixins; + return null; + } + + @Override + public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { + + } + + @Override + public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { + } } |