diff --git a/emi-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/emibridge/mixin/EmiAgnosForgeMixin.java b/emi-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/emibridge/mixin/EmiAgnosForgeMixin.java index bc69703..f8213a7 100644 --- a/emi-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/emibridge/mixin/EmiAgnosForgeMixin.java +++ b/emi-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/emibridge/mixin/EmiAgnosForgeMixin.java @@ -9,14 +9,18 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable; import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; @Mixin(EmiAgnosForge.class) public class EmiAgnosForgeMixin { @ModifyVariable(method = "getPluginsAgnos", at = @At("RETURN"), remap = false) private List connectorextras_emi_bridge$addFabricPlugins(List orig) { + Set ids = orig.stream().map(EmiPluginContainer::id).collect(Collectors.toSet()); orig.addAll(FabricLoader.getInstance() .getEntrypointContainers("emi", EmiPlugin.class) .stream() + .filter(plugin -> !ids.contains(plugin.getProvider().getMetadata().getId())) .map(p -> new EmiPluginContainer(p.getEntrypoint(), p.getProvider().getMetadata().getId())) .toList()); return orig; diff --git a/gradle.properties b/gradle.properties index 3a6d3af..0daf9e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ loom.platform=forge # Versions versionMc=1.20.1 versionForge=47.1.3 -versionConnectorExtras=1.3.0 +versionConnectorExtras=1.3.1 # Publishing curseForgeId=913445