aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/mixins/MixinFMLHandShake.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/rosegoldaddons/mixins/MixinFMLHandShake.java')
-rw-r--r--src/main/java/rosegoldaddons/mixins/MixinFMLHandShake.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/rosegoldaddons/mixins/MixinFMLHandShake.java b/src/main/java/rosegoldaddons/mixins/MixinFMLHandShake.java
new file mode 100644
index 0000000..6f00741
--- /dev/null
+++ b/src/main/java/rosegoldaddons/mixins/MixinFMLHandShake.java
@@ -0,0 +1,24 @@
+package rosegoldaddons.mixins;
+
+import net.minecraftforge.fml.common.ModContainer;
+import net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import rosegoldaddons.Main;
+
+import java.util.List;
+import java.util.Map;
+
+@Mixin(value = FMLHandshakeMessage.ModList.class, remap = false)
+public class MixinFMLHandShake {
+ @Shadow
+ private Map<String, String> modTags;
+
+ @Inject(method = "<init>(Ljava/util/List;)V", at = @At("RETURN"))
+ private void removeRGA(List<ModContainer> modList, CallbackInfo ci) {
+ if(!Main.mc.isIntegratedServerRunning()) modTags.remove(Main.MOD_ID);
+ }
+}