Skip to content

Commit

Permalink
1.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyploszaj committed Aug 11, 2024
1 parent d990140 commit 9a17a91
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 10 deletions.
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
### Tweaks
* Re-enabled stack batching for 1.21
* Query creative group contents on thread. This may cause slight notable performance dips but will significantly improve compatibility
* Redundant JEI initialization will not be performed on mods with dedicated EMI integration, increasing performance in those situations
* Tweaked JEI/EMI compatibility disabling to not load plugins earlier than previously expected

### Fixes
* Various fixes to modern JEI compatibility
* Fix recipe filling behavior having incorrect behavior with edge case slot interactions
* Fixed invisible slots having rendered overlays when they should not #654
* Fixed handling for extra mouse button binds #645
* Fixed regression in item group querying causing errors to cascade outside of single groups
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,21 @@ protected List<String> getAllModAuthorsAgnos() {
.map(p -> p.getName()).distinct().toList();
}

@Override
protected List<String> getModsWithPluginsAgnos() {
List<String> list = Lists.newArrayList();
for (EntrypointContainer<EmiPlugin> container : FabricLoader.getInstance().getEntrypointContainers("emi", EmiPlugin.class)) {
try {
list.add(container.getProvider().getMetadata().getId());
} catch (Throwable t) {
EmiLog.error("Critical exception thrown when reading EMI Plugin from mod " + container.getProvider().getMetadata().getId());
EmiLog.error(t);
}
}
return list;
}


@Override
protected List<EmiPluginContainer> getPluginsAgnos() {
List<EmiPluginContainer> list = Lists.newArrayList();
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.21
enabled_platforms=fabric,neoforge

archives_base_name=emi
mod_version=1.1.11
mod_version=1.1.12
maven_group=dev.emi

architectury_version=4.9.83
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,25 @@ protected List<String> getAllModNamesAgnos() {
return ModList.get().getMods().stream().map(m -> m.getDisplayName()).toList();
}

@Override
protected List<String> getModsWithPluginsAgnos() {
List<String> mods = Lists.newArrayList();
Type entrypointType = Type.getType(EmiEntrypoint.class);
for (ModFileScanData data : ModList.get().getAllScanData()) {
for (ModFileScanData.AnnotationData annot : data.getAnnotations()) {
try {
if (entrypointType.equals(annot.annotationType())) {
mods.add(data.getIModInfoData().get(0).getMods().get(0).getModId());
}
} catch (Throwable t) {
EmiLog.error("Exception constructing entrypoint:");
t.printStackTrace();
}
}
}
return mods;
}

@Override
protected List<EmiPluginContainer> getPluginsAgnos() {
List<EmiPluginContainer> containers = Lists.newArrayList();
Expand Down
4 changes: 2 additions & 2 deletions xplat/src/main/java/dev/emi/emi/jemi/JemiUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public static IIngredientType getFluidType() {

public static Set<String> getHandledMods() {
Set<String> set = Sets.newHashSet();
for (EmiPluginContainer plugin : EmiAgnos.getPlugins()) {
set.add(plugin.id());
for (String mod : EmiAgnos.getModsWithPlugins()) {
set.add(mod);
}
return set;
}
Expand Down
6 changes: 6 additions & 0 deletions xplat/src/main/java/dev/emi/emi/platform/EmiAgnos.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ public static List<String> getAllModAuthors() {

protected abstract List<String> getAllModAuthorsAgnos();

public static List<String> getModsWithPlugins() {
return delegate.getModsWithPluginsAgnos();
}

protected abstract List<String> getModsWithPluginsAgnos();

public static List<EmiPluginContainer> getPlugins() {
return delegate.getPluginsAgnos();
}
Expand Down

0 comments on commit 9a17a91

Please sign in to comment.