Skip to content

Commit

Permalink
fix: entry provider does not use parent macros
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jun 16, 2024
1 parent 9308677 commit 1393c09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import net.minecraft.world.phys.Vec2;

import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public abstract class EntryProvider extends ModonomiconProviderBase {

Expand All @@ -27,6 +30,12 @@ public EntryProvider(CategoryProvider parent) {
this.entry = null;
}

@Override
protected Map<String, String> macros() {
return Stream.concat(super.macros().entrySet().stream(), this.parent.macros().entrySet().stream())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (v1, v2) -> v1));
}

/**
* Adds a page title for the current context to the underlying language provider.
*/
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ group=com.klikli_dev
mod_id=modonomicon
mod_name=Modonomicon
mod_license=MIT AND CC-BY-4.0
mod_version=1.78.2
mod_version=1.78.3
mod_authors=Kli Kli
mod_description=Data-driven minecraft in-game documentation with progress visualization.

Expand Down

0 comments on commit 1393c09

Please sign in to comment.