mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-11-14 19:25:13 -05:00
port 1.18 changes
This commit is contained in:
parent
85f89d6394
commit
ebc8b942dc
5 changed files with 17 additions and 4 deletions
|
@ -8,6 +8,7 @@ import com.almostreliable.unified.recipe.CRTLookup;
|
|||
import com.almostreliable.unified.recipe.ClientRecipeTracker.ClientRecipeLink;
|
||||
import com.almostreliable.unified.utils.Utils;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.client.entry.filtering.base.BasicFilteringRule;
|
||||
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
|
||||
|
@ -17,7 +18,6 @@ import me.shedaniel.rei.api.client.registry.category.CategoryRegistry;
|
|||
import me.shedaniel.rei.api.client.registry.category.extension.CategoryExtensionProvider;
|
||||
import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
||||
import me.shedaniel.rei.api.client.registry.display.DisplayCategoryView;
|
||||
import me.shedaniel.rei.api.client.registry.entry.EntryRegistry;
|
||||
import me.shedaniel.rei.api.common.display.Display;
|
||||
import me.shedaniel.rei.api.common.plugins.PluginManager;
|
||||
import me.shedaniel.rei.api.common.registry.ReloadStage;
|
||||
|
@ -31,14 +31,14 @@ import java.util.List;
|
|||
public class AlmostREI implements REIClientPlugin {
|
||||
|
||||
@Override
|
||||
public void registerEntries(EntryRegistry registry) {
|
||||
public void registerBasicEntryFiltering(BasicFilteringRule<?> rule) {
|
||||
// REI compat layer will automatically hide entries for Forge through JEI
|
||||
if (AlmostUnifiedPlatform.INSTANCE.getPlatform() == Platform.FORGE) return;
|
||||
|
||||
UnifyConfig config = Config.load(UnifyConfig.NAME, new UnifyConfig.Serializer());
|
||||
if (config.reiOrJeiDisabled()) return;
|
||||
|
||||
HideHelper.createHidingList(config).stream().map(EntryStacks::of).forEach(registry::removeEntry);
|
||||
HideHelper.createHidingList(config).stream().map(EntryStacks::of).forEach(rule::hide);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,5 +32,8 @@
|
|||
"fabric": "*",
|
||||
"minecraft": ">=${minecraftVersion}",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
"roughlyenoughitems": ">=${reiMinVersion}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,3 +24,10 @@ mandatory = true
|
|||
versionRange = "[1.19.2,1.20)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.${modId}]]
|
||||
modId = "roughlyenoughitems"
|
||||
mandatory = false
|
||||
versionRange = "[${reiMinVersion},)"
|
||||
ordering = "BEFORE"
|
||||
side = "BOTH"
|
||||
|
|
|
@ -10,6 +10,7 @@ val license: String by project
|
|||
val extraModsDirectory: String by project
|
||||
val minecraftVersion: String by project
|
||||
val forgeMinVersion: String by project
|
||||
val reiMinVersion: String by project
|
||||
val githubUser: String by project
|
||||
val githubRepo: String by project
|
||||
|
||||
|
@ -71,6 +72,7 @@ subprojects {
|
|||
"license" to license,
|
||||
"minecraftVersion" to minecraftVersion,
|
||||
"forgeMinVersion" to forgeMinVersion,
|
||||
"reiMinVersion" to reiMinVersion,
|
||||
"githubUser" to githubUser,
|
||||
"githubRepo" to githubRepo
|
||||
)
|
||||
|
|
|
@ -27,7 +27,8 @@ fabricVersion = 0.63.0+1.19.2
|
|||
fabricLoaderVersion = 0.14.9
|
||||
|
||||
# Dependencies
|
||||
reiVersion = 9+
|
||||
reiVersion = 9.1.558
|
||||
reiMinVersion = 9.1.558
|
||||
jeiVersion = 11+
|
||||
kubejsVersion = 1902.6.0-build.98
|
||||
|
||||
|
|
Loading…
Reference in a new issue