-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework AECapFix integration to not require AECF on the client side
also condense mixin configs into one
- Loading branch information
Showing
12 changed files
with
89 additions
and
56 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
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package gripe._90.appliede.mixin; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import org.objectweb.asm.tree.ClassNode; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
import net.minecraftforge.fml.loading.LoadingModList; | ||
import net.minecraftforge.fml.loading.moddiscovery.ModInfo; | ||
|
||
public class Plugin implements IMixinConfigPlugin { | ||
@Override | ||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { | ||
return !mixinClassName.contains("aecapfix") | ||
|| LoadingModList.get().getMods().stream() | ||
.map(ModInfo::getModId) | ||
.anyMatch("aecapfix"::equals); | ||
} | ||
|
||
@Override | ||
public void onLoad(String mixinPackage) {} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
return List.of(); | ||
} | ||
|
||
@Override | ||
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {} | ||
|
||
@Override | ||
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/gripe/_90/appliede/mixin/aecapfix/EMCInterfacePartMixin.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,26 @@ | ||
package gripe._90.appliede.mixin.aecapfix; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import appeng.api.parts.IPartItem; | ||
import appeng.parts.AEBasePart; | ||
|
||
import gripe._90.aecapfix.AECapFix; | ||
import gripe._90.appliede.me.misc.EMCInterfaceLogic; | ||
import gripe._90.appliede.part.EMCInterfacePart; | ||
|
||
@Mixin(value = EMCInterfacePart.class, remap = false) | ||
public abstract class EMCInterfacePartMixin extends AEBasePart implements AECapFix.Invalidator { | ||
public EMCInterfacePartMixin(IPartItem<?> partItem) { | ||
super(partItem); | ||
} | ||
|
||
@Shadow | ||
public abstract EMCInterfaceLogic getInterfaceLogic(); | ||
|
||
@Override | ||
public void aecapfix$invalidate() { | ||
getInterfaceLogic().invalidateCaps(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...de/mixin/P2PTunnelAttunementAccessor.java → ...xin/main/P2PTunnelAttunementAccessor.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package gripe._90.appliede.mixin; | ||
package gripe._90.appliede.mixin.main; | ||
|
||
import java.util.Map; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...e/mixin/TransmutationOfflineAccessor.java → ...in/main/TransmutationOfflineAccessor.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package gripe._90.appliede.mixin; | ||
package gripe._90.appliede.mixin.main; | ||
|
||
import java.util.UUID; | ||
|
||
|
16 changes: 0 additions & 16 deletions
16
src/main/java/gripe/_90/appliede/part/EMCInterfacePartAECF.java
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.