├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ └── feature-request.yaml └── workflows │ ├── gradle.yml │ └── curseforge.yml ├── forge ├── gradle.properties └── src │ ├── main │ ├── resources │ │ ├── META-INF │ │ │ ├── services │ │ │ │ ├── me.shedaniel.rei.impl.init.PluginDetector │ │ │ │ ├── me.shedaniel.rei.impl.init.PrimitivePlatformAdapter │ │ │ │ └── me.shedaniel.rei.impl.client.ErrorDisplayer$ErrorGuiInitializer │ │ │ └── mods.toml │ │ ├── icon.png │ │ ├── pack.mcmeta │ │ └── rei.mixins.json │ └── java │ │ └── me │ │ └── shedaniel │ │ └── rei │ │ ├── forge │ │ ├── REIPluginClient.java │ │ ├── REIPluginCommon.java │ │ ├── REIPluginLoaderClient.java │ │ ├── REIPluginLoaderCommon.java │ │ ├── REIPluginDedicatedServer.java │ │ ├── REIPluginLoaderDedicatedServer.java │ │ ├── REIPlugin.java │ │ └── REIPluginLoader.java │ │ ├── impl │ │ └── client │ │ │ └── gui │ │ │ └── credits │ │ │ └── forge │ │ │ └── CreditsScreenImpl.java │ │ └── plugin │ │ └── common │ │ └── displays │ │ └── crafting │ │ └── forge │ │ └── DefaultCraftingDisplayImpl.java │ └── serverComponent │ └── resources │ └── META-INF │ └── mods.toml ├── neoforge ├── gradle.properties └── src │ ├── main │ ├── resources │ │ ├── META-INF │ │ │ ├── services │ │ │ │ ├── me.shedaniel.rei.impl.init.PluginDetector │ │ │ │ ├── me.shedaniel.rei.impl.init.PlatformAdapter │ │ │ │ ├── me.shedaniel.rei.impl.init.PrimitivePlatformAdapter │ │ │ │ └── me.shedaniel.rei.impl.client.ErrorDisplayer$ErrorGuiInitializer │ │ │ └── neoforge.mods.toml │ │ ├── icon.png │ │ ├── pack.mcmeta │ │ └── rei.mixins.json │ └── java │ │ └── me │ │ └── shedaniel │ │ └── rei │ │ ├── forge │ │ ├── REIPluginClient.java │ │ ├── REIPluginCommon.java │ │ ├── REIPluginLoaderClient.java │ │ ├── REIPluginLoaderCommon.java │ │ ├── REIPluginDedicatedServer.java │ │ ├── REIPluginLoaderDedicatedServer.java │ │ ├── REIPlugin.java │ │ └── REIPluginLoader.java │ │ └── impl │ │ └── client │ │ └── gui │ │ └── credits │ │ └── forge │ │ └── CreditsScreenImpl.java │ └── serverComponent │ └── resources │ └── META-INF │ └── neoforge.mods.toml ├── runtime ├── src │ └── main │ │ ├── resources │ │ └── assets │ │ │ └── roughlyenoughitems │ │ │ ├── lang │ │ │ ├── en_7s.json │ │ │ └── nn_no.json │ │ │ └── textures │ │ │ └── gui │ │ │ ├── info.png │ │ │ ├── kirb.png │ │ │ ├── display.png │ │ │ ├── expand.png │ │ │ ├── pinyin.png │ │ │ ├── shrink.png │ │ │ ├── toasts.png │ │ │ ├── bopomofo.png │ │ │ ├── clipboard.png │ │ │ ├── jyutping.png │ │ │ ├── arrow_left.png │ │ │ ├── arrow_right.png │ │ │ ├── config │ │ │ ├── debug.png │ │ │ ├── flags.png │ │ │ ├── input.png │ │ │ ├── list.png │ │ │ ├── reset.png │ │ │ ├── cheats.png │ │ │ ├── layout.png │ │ │ ├── search.png │ │ │ ├── appearance.png │ │ │ ├── favorites.png │ │ │ ├── filtering.png │ │ │ ├── selector.png │ │ │ ├── performance.png │ │ │ ├── accessibility.png │ │ │ └── search_options.png │ │ │ ├── display_dark.png │ │ │ ├── arrow_left_small.png │ │ │ ├── arrow_right_small.png │ │ │ ├── recipecontainer.png │ │ │ ├── shapeless_icon_1x.png │ │ │ ├── shapeless_icon_2x.png │ │ │ ├── shapeless_icon_3x.png │ │ │ ├── shapeless_icon_4x.png │ │ │ ├── screenshot_default.png │ │ │ ├── recipecontainer_dark.png │ │ │ ├── screenshot_composite.png │ │ │ └── sprites │ │ │ └── widget │ │ │ ├── button_dark.png │ │ │ ├── panel_none.png │ │ │ ├── panel_slot.png │ │ │ ├── panel_default.png │ │ │ ├── panel_lighter.png │ │ │ ├── panel_none_dark.png │ │ │ ├── panel_slot_dark.png │ │ │ ├── panel_default_dark.png │ │ │ ├── panel_lighter_dark.png │ │ │ ├── button_disabled_dark.png │ │ │ ├── button_dark.png.mcmeta │ │ │ ├── button_highlighted_dark.png │ │ │ ├── panel_none.png.mcmeta │ │ │ ├── panel_slot.png.mcmeta │ │ │ ├── panel_default.png.mcmeta │ │ │ ├── panel_lighter.png.mcmeta │ │ │ ├── panel_none_dark.png.mcmeta │ │ │ ├── panel_slot_dark.png.mcmeta │ │ │ ├── button_disabled_dark.png.mcmeta │ │ │ ├── panel_default_dark.png.mcmeta │ │ │ ├── panel_lighter_dark.png.mcmeta │ │ │ └── button_highlighted_dark.png.mcmeta │ │ └── java │ │ └── me │ │ └── shedaniel │ │ └── rei │ │ ├── impl │ │ ├── client │ │ │ ├── gui │ │ │ │ ├── widget │ │ │ │ │ ├── basewidgets │ │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── LateRenderable.java │ │ │ │ │ ├── favorites │ │ │ │ │ │ └── panel │ │ │ │ │ │ │ └── rows │ │ │ │ │ │ │ ├── FavoritesPanelRow.java │ │ │ │ │ │ │ └── FavoritesPanelSeparatorRow.java │ │ │ │ │ └── NoOpWidget.java │ │ │ │ ├── config │ │ │ │ │ ├── options │ │ │ │ │ │ └── ConfigPreviewer.java │ │ │ │ │ └── ConfigAccess.java │ │ │ │ └── hints │ │ │ │ │ └── HintProvider.java │ │ │ ├── entry │ │ │ │ └── filtering │ │ │ │ │ └── FilteringContextType.java │ │ │ ├── util │ │ │ │ └── ClientTickCounter.java │ │ │ └── search │ │ │ │ ├── argument │ │ │ │ └── type │ │ │ │ │ └── MatchType.java │ │ │ │ └── SearchRuntime.java │ │ ├── init │ │ │ ├── PluginDetector.java │ │ │ ├── PlatformAdapter.java │ │ │ └── PrimitivePlatformAdapter.java │ │ └── common │ │ │ ├── entry │ │ │ ├── EmptyEntryStack.java │ │ │ ├── type │ │ │ │ └── EntryRegistryListener.java │ │ │ └── EntryStackProviderImpl.java │ │ │ ├── registry │ │ │ └── displays │ │ │ │ └── DisplaysHolder.java │ │ │ └── logging │ │ │ └── Log4JLogger.java │ │ └── REIModMenuEntryPoint.java └── build.gradle ├── fake ├── REIPlugin.class ├── REIPluginClient.class ├── REIPluginCommon.class ├── REIPluginLoader.class ├── REIPluginLoaderClient.class ├── REIPluginLoaderCommon.class ├── REIPluginDedicatedServer.class ├── fabric.mod.json ├── REIPluginLoaderDedicatedServer.class └── mods.toml ├── fabric └── src │ └── main │ ├── resources │ ├── META-INF │ │ └── services │ │ │ ├── me.shedaniel.rei.impl.init.PluginDetector │ │ │ ├── me.shedaniel.rei.impl.init.PlatformAdapter │ │ │ ├── me.shedaniel.rei.impl.init.PrimitivePlatformAdapter │ │ │ └── me.shedaniel.rei.impl.client.ErrorDisplayer$ErrorGuiInitializer │ ├── icon.png │ ├── rei.mixins.json │ └── error_notifier.json │ └── java │ └── me │ └── shedaniel │ └── rei │ └── fabric │ └── RoughlyEnoughItemsFabric.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── crowdin.yml ├── JenkinsD ├── gradle.properties ├── .gitignore ├── settings.gradle ├── HEADER ├── LICENSE ├── api ├── src │ └── main │ │ └── java │ │ └── me │ │ └── shedaniel │ │ └── rei │ │ ├── api │ │ ├── common │ │ │ ├── registry │ │ │ │ ├── ReloadStage.java │ │ │ │ └── display │ │ │ │ │ └── ServerDisplayRegistry.java │ │ │ ├── util │ │ │ │ ├── Identifiable.java │ │ │ │ └── TextRepresentable.java │ │ │ ├── entry │ │ │ │ ├── type │ │ │ │ │ ├── BuiltinEntryTypes.java │ │ │ │ │ ├── VanillaEntryTypes.java │ │ │ │ │ └── EntryTypeBridge.java │ │ │ │ ├── EntrySerializer.java │ │ │ │ └── settings │ │ │ │ │ └── EntryIngredientSetting.java │ │ │ └── plugins │ │ │ │ └── REIPluginProvider.java │ │ └── client │ │ │ ├── favorites │ │ │ ├── package-info.java │ │ │ └── SystemFavoriteEntryProvider.java │ │ │ ├── entry │ │ │ ├── filtering │ │ │ │ ├── FilteringResultFactory.java │ │ │ │ └── FilteringResult.java │ │ │ └── type │ │ │ │ └── BuiltinClientEntryTypes.java │ │ │ ├── gui │ │ │ ├── widgets │ │ │ │ ├── WidgetHolder.java │ │ │ │ ├── CloseableScissors.java │ │ │ │ ├── TextField.java │ │ │ │ └── utils │ │ │ │ │ └── PanelTextures.java │ │ │ ├── config │ │ │ │ ├── PanelBoundary.java │ │ │ │ ├── FavoriteAddWidgetMode.java │ │ │ │ ├── ItemCheatingStyle.java │ │ │ │ ├── SearchMode.java │ │ │ │ ├── EntryPanelOrdering.java │ │ │ │ ├── DisplayScreenType.java │ │ │ │ ├── AppearanceTheme.java │ │ │ │ ├── SyntaxHighlightingMode.java │ │ │ │ ├── ItemCheatingMode.java │ │ │ │ ├── DisplayPanelLocation.java │ │ │ │ ├── CheatingMode.java │ │ │ │ └── ConfigButtonPosition.java │ │ │ ├── DrawableConsumer.java │ │ │ ├── drag │ │ │ │ └── DraggedAcceptorResult.java │ │ │ └── DisplayRenderer.java │ │ │ ├── registry │ │ │ ├── screen │ │ │ │ ├── ExclusionZonesProvider.java │ │ │ │ ├── DisplayBoundsProvider.java │ │ │ │ └── SimpleClickArea.java │ │ │ └── transfer │ │ │ │ ├── TransferHandlerRenderer.java │ │ │ │ └── TransferHandlerRegistry.java │ │ │ ├── util │ │ │ └── ClientEntryIngredients.java │ │ │ └── overlay │ │ │ └── ScreenOverlay.java │ │ └── impl │ │ ├── display │ │ └── DisplaySpec.java │ │ └── common │ │ └── plugins │ │ └── PluginReloadContext.java └── build.gradle └── default-plugin ├── src └── main │ └── java │ └── me │ └── shedaniel │ └── rei │ └── plugin │ ├── common │ └── displays │ │ ├── brewing │ │ └── BrewingRecipe.java │ │ ├── CampfireDisplay.java │ │ └── cooking │ │ └── CookingDisplay.java │ └── client │ ├── displays │ └── ClientsidedRecipeBookDisplay.java │ └── categories │ └── crafting │ └── filler │ └── CraftingRecipeFiller.java └── build.gradle /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: shedaniel 2 | -------------------------------------------------------------------------------- /forge/gradle.properties: -------------------------------------------------------------------------------- 1 | loom.platform=forge 2 | -------------------------------------------------------------------------------- /neoforge/gradle.properties: -------------------------------------------------------------------------------- 1 | loom.platform=neoforge 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/lang/en_7s.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /fake/REIPlugin.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPlugin.class -------------------------------------------------------------------------------- /fake/REIPluginClient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginClient.class -------------------------------------------------------------------------------- /fake/REIPluginCommon.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginCommon.class -------------------------------------------------------------------------------- /fake/REIPluginLoader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginLoader.class -------------------------------------------------------------------------------- /fabric/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PluginDetector: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.fabric.PluginDetectorImpl -------------------------------------------------------------------------------- /fake/REIPluginLoaderClient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginLoaderClient.class -------------------------------------------------------------------------------- /fake/REIPluginLoaderCommon.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginLoaderCommon.class -------------------------------------------------------------------------------- /forge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PluginDetector: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.forge.PluginDetectorImpl -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PluginDetector: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.forge.PluginDetectorImpl -------------------------------------------------------------------------------- /fabric/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PlatformAdapter: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.fabric.PlatformAdapterImpl -------------------------------------------------------------------------------- /fabric/src/main/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fabric/src/main/resources/icon.png -------------------------------------------------------------------------------- /forge/src/main/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/forge/src/main/resources/icon.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PlatformAdapter: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.forge.PlatformAdapterImpl -------------------------------------------------------------------------------- /fake/REIPluginDedicatedServer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginDedicatedServer.class -------------------------------------------------------------------------------- /neoforge/src/main/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/neoforge/src/main/resources/icon.png -------------------------------------------------------------------------------- /fake/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "rei-fake", 3 | "name": "THIS SHOULDN'T SHOW UP", 4 | "version": "ABC", 5 | "schemaVersion": 1 6 | } -------------------------------------------------------------------------------- /fabric/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PrimitivePlatformAdapter: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.fabric.PrimitivePlatformAdapterImpl -------------------------------------------------------------------------------- /fake/REIPluginLoaderDedicatedServer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/fake/REIPluginLoaderDedicatedServer.class -------------------------------------------------------------------------------- /forge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PrimitivePlatformAdapter: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.forge.PrimitivePlatformAdapterImpl -------------------------------------------------------------------------------- /forge/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "Roughly Enough Items", 4 | "pack_format": 6 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.init.PrimitivePlatformAdapter: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.forge.PrimitivePlatformAdapterImpl -------------------------------------------------------------------------------- /neoforge/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "Roughly Enough Items", 4 | "pack_format": 6 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/lang/nn_no.json: -------------------------------------------------------------------------------- 1 | { 2 | "config.roughlyenoughitems.filteringScreen": "Customized Filtering" 3 | } 4 | -------------------------------------------------------------------------------- /fabric/src/main/resources/META-INF/services/me.shedaniel.rei.impl.client.ErrorDisplayer$ErrorGuiInitializer: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.impl.client.fabric.ErrorDisplayerImpl -------------------------------------------------------------------------------- /forge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.client.ErrorDisplayer$ErrorGuiInitializer: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.impl.client.forge.ErrorDisplayerImpl -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/services/me.shedaniel.rei.impl.client.ErrorDisplayer$ErrorGuiInitializer: -------------------------------------------------------------------------------- 1 | me.shedaniel.rei.impl.client.forge.ErrorDisplayerImpl -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - source: /runtime/src/main/resources/assets/roughlyenoughitems/lang/en_us.json 3 | translation: /runtime/src/main/resources/assets/roughlyenoughitems/lang/%language%.json 4 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/info.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/kirb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/kirb.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/display.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/expand.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/pinyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/pinyin.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shrink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shrink.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/toasts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/toasts.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/bopomofo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/bopomofo.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/clipboard.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/jyutping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/jyutping.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_left.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_right.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/debug.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/flags.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/input.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/list.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/reset.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/display_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/display_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/cheats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/cheats.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/layout.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/search.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_left_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_left_small.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_right_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/arrow_right_small.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/appearance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/appearance.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/favorites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/favorites.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/filtering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/filtering.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/selector.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_1x.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_2x.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_3x.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/shapeless_icon_4x.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/performance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/performance.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/screenshot_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/screenshot_default.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/accessibility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/accessibility.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/search_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/config/search_options.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/recipecontainer_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/screenshot_composite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/screenshot_composite.png -------------------------------------------------------------------------------- /fake/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "[1,)" 3 | logoFile = "icon.png" 4 | authors = "shedaniel" 5 | license = "MIT" 6 | 7 | [[mods]] 8 | modId = "rei_fake" 9 | version = "ABC" 10 | displayName = "THIS SHOULDN'T SHOW UP" 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_none.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_slot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_slot.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_default.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_lighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_lighter.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_none_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_none_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_slot_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_slot_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_default_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_default_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_lighter_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_lighter_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_disabled_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_disabled_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 200, 6 | "height": 20, 7 | "border": 3 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_highlighted_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shedaniel/RoughlyEnoughItems/HEAD/runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_highlighted_dark.png -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_none.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_slot.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_default.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_lighter.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_none_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_slot_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_disabled_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 200, 6 | "height": 20, 7 | "border": 1 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_default_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/panel_lighter_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 150, 6 | "height": 66, 7 | "border": 4 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Dec 30 21:50:18 HKT 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 7 | -------------------------------------------------------------------------------- /runtime/src/main/resources/assets/roughlyenoughitems/textures/gui/sprites/widget/button_highlighted_dark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "gui": { 3 | "scaling": { 4 | "type": "nine_slice", 5 | "width": 200, 6 | "height": 20, 7 | "border": 3 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | name: Java CI 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Set up JDK 21 11 | uses: actions/setup-java@v2 12 | with: 13 | java-version: 21 14 | distribution: temurin 15 | - name: Build with Gradle 16 | uses: gradle/gradle-build-action@v2 17 | with: 18 | arguments: clean build --stacktrace 19 | -------------------------------------------------------------------------------- /JenkinsD: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | stages { 4 | 5 | stage ('Build') { 6 | when { 7 | expression { env.BRANCH_NAME == '4.x' || env.BRANCH_NAME == '5.x' } 8 | } 9 | steps { 10 | sh "rm -rf build/libs/" 11 | sh "chmod +x gradlew" 12 | sh "./gradlew clean build publish --refresh-dependencies --stacktrace" 13 | 14 | archiveArtifacts artifacts: '**/build/libs/*.jar', fingerprint: true 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /neoforge/src/main/resources/rei.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "me.shedaniel.rei.mixin.forge", 4 | "compatibilityLevel": "JAVA_8", 5 | "client": [ 6 | "MixinClientPacketListener", 7 | "MixinEffectsInInventory", 8 | "MixinFontSet", 9 | "MixinInputConstants", 10 | "MixinInputConstantsKey", 11 | "MixinRecipeToast" 12 | ], 13 | "mixins": [ 14 | "MixinPacketEncoder", 15 | "MixinTagLoader" 16 | ], 17 | "injectors": { 18 | "maxShiftBy": 5, 19 | "defaultRequire": 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /forge/src/main/resources/rei.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "me.shedaniel.rei.mixin.forge", 4 | "compatibilityLevel": "JAVA_8", 5 | "client": [ 6 | "MixinClientPacketListener", 7 | "MixinEffectRenderingInventoryScreen", 8 | "MixinFontSet", 9 | "MixinInputConstants", 10 | "MixinInputConstantsKey", 11 | "MixinRecipeToast" 12 | ], 13 | "mixins": [ 14 | "MixinPacketEncoder", 15 | "MixinTagLoader", 16 | "MixinTagManager" 17 | ], 18 | "injectors": { 19 | "maxShiftBy": 5, 20 | "defaultRequire": 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx6G 2 | base_version=19.0 3 | unstable=false 4 | supported_version=1.21.5 5 | minecraft_version=1.21.5 6 | platforms=fabric,neoforge 7 | forge_version=49.1.10 8 | neoforge_version=21.5.23-beta 9 | neoforge_pr= 10 | fabricloader_version=0.16.12 11 | cloth_config_version=18.0.145 12 | modmenu_version=11.0.0-rc.2 13 | fabric_api=0.119.6+1.21.5 14 | architectury_version=16.1.4 15 | api_exculde= 16 | #api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled nonsense that does not belong in *source* control 2 | **/build 3 | /build 4 | /bin 5 | **/bin 6 | /.gradle 7 | **/.gradle 8 | /minecraft 9 | */minecraft 10 | /out 11 | */run 12 | */out 13 | /run 14 | /classes 15 | 16 | # IDE nonsense that could go in source control but really shouldn't 17 | .classpath 18 | .project 19 | .metadata 20 | .settings 21 | *.launch 22 | *.iml 23 | .idea 24 | *.ipr 25 | *.iws 26 | .vscode 27 | 28 | # Sekrit files 29 | private.properties 30 | 31 | # Files from bad operating systems :^) 32 | Thumbs.db 33 | .DS_Store 34 | /.architectury-transformer/debug.log -------------------------------------------------------------------------------- /fabric/src/main/resources/rei.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "package": "me.shedaniel.rei.mixin.fabric", 4 | "plugin": "me.shedaniel.rei.mixin.fabric.REIMixinPlugin", 5 | "compatibilityLevel": "JAVA_8", 6 | "client": [ 7 | "MixinClientPacketListener", 8 | "MixinEffectsInInventory", 9 | "MixinInputConstants", 10 | "MixinInputConstantsKey", 11 | "MixinRecipeToast", 12 | "MixinScreen" 13 | ], 14 | "mixins": [ 15 | "MixinPacketEncoder", 16 | "MixinTagLoader" 17 | ], 18 | "injectors": { 19 | "maxShiftBy": 5, 20 | "defaultRequire": 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | maven { url "https://maven.shedaniel.me/" } 4 | maven { url "https://maven.fabricmc.net/" } 5 | gradlePluginPortal() 6 | maven { url "https://files.minecraftforge.net/maven/" } 7 | } 8 | } 9 | 10 | if (JavaVersion.current().ordinal() + 1 < 21) { 11 | throw new IllegalStateException("Please run gradle with Java 21+!") 12 | } 13 | 14 | rootProject.name = "RoughlyEnoughItems" 15 | 16 | include "api" 17 | include "default-plugin" 18 | include "runtime" 19 | include "fabric" 20 | //include "forge" 21 | include "neoforge" 22 | -------------------------------------------------------------------------------- /forge/src/serverComponent/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "[41,)" 3 | issueTrackerURL = "https://github.com/shedaniel/RoughlyEnoughItems/issues" 4 | logoFile = "icon.png" 5 | authors = "shedaniel" 6 | license = "MIT" 7 | 8 | [[mods]] 9 | modId = "roughlyenoughitems_servercomponent" 10 | version = "${version}" 11 | displayName = "Roughly Enough Items Server Component (REI)" 12 | description = ''' 13 | To allow players to view items and recipes. 14 | ''' 15 | 16 | [[dependencies.roughlyenoughitems_servercomponent]] 17 | modId = "architectury" 18 | mandatory = true 19 | versionRange = "[5.7,)" 20 | ordering = "NONE" 21 | side = "BOTH" 22 | 23 | [[dependencies.roughlyenoughitems_servercomponent]] 24 | modId = "cloth_config" 25 | mandatory = true 26 | versionRange = "[7.0,)" 27 | ordering = "NONE" 28 | side = "BOTH" 29 | -------------------------------------------------------------------------------- /neoforge/src/serverComponent/resources/META-INF/neoforge.mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "[41,)" 3 | issueTrackerURL = "https://github.com/shedaniel/RoughlyEnoughItems/issues" 4 | logoFile = "icon.png" 5 | authors = "shedaniel" 6 | license = "MIT" 7 | 8 | [[mods]] 9 | modId = "roughlyenoughitems_servercomponent" 10 | version = "${version}" 11 | displayName = "Roughly Enough Items Server Component (REI)" 12 | description = ''' 13 | To allow players to view items and recipes. 14 | ''' 15 | 16 | [[dependencies.roughlyenoughitems_servercomponent]] 17 | modId = "architectury" 18 | type = "required" 19 | versionRange = "[5.7,)" 20 | ordering = "NONE" 21 | side = "BOTH" 22 | 23 | [[dependencies.roughlyenoughitems_servercomponent]] 24 | modId = "cloth_config" 25 | type = "required" 26 | versionRange = "[7.0,)" 27 | ordering = "NONE" 28 | side = "BOTH" 29 | -------------------------------------------------------------------------------- /fabric/src/main/resources/error_notifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "checks": [ 4 | { 5 | "type": "depends", 6 | "modId": "fabric", 7 | "modName": "Fabric API", 8 | "versions": "*", 9 | "url": "https://www.curseforge.com/minecraft/mc-mods/fabric-api/" 10 | }, 11 | { 12 | "type": "depends", 13 | "modId": "architectury", 14 | "modName": "Architectury API", 15 | "versions": ">=16.1.0 <17.0.0", 16 | "url": "https://www.curseforge.com/minecraft/mc-mods/architectury-api/" 17 | }, 18 | { 19 | "type": "depends", 20 | "modId": "cloth-config2", 21 | "modName": "Cloth Config", 22 | "versions": ">=18.0.0 <19.0.0", 23 | "url": "https://www.curseforge.com/minecraft/mc-mods/cloth-config/" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /forge/src/main/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "[41,)" 3 | issueTrackerURL = "https://github.com/shedaniel/RoughlyEnoughItems/issues" 4 | logoFile = "icon.png" 5 | authors = "shedaniel" 6 | license = "MIT" 7 | 8 | [[mods]] 9 | modId = "roughlyenoughitems" 10 | version = "${version}" 11 | displayName = "Roughly Enough Items (REI)" 12 | description = ''' 13 | To allow players to view items and recipes. 14 | ''' 15 | 16 | [[dependencies.roughlyenoughitems]] 17 | modId = "architectury" 18 | mandatory = true 19 | versionRange = "[8,)" 20 | ordering = "NONE" 21 | side = "BOTH" 22 | 23 | [[dependencies.roughlyenoughitems]] 24 | modId = "cloth_config" 25 | mandatory = true 26 | versionRange = "[10.0,)" 27 | ordering = "NONE" 28 | side = "BOTH" 29 | 30 | [[dependencies.roughlyenoughitems]] 31 | modId = "forge" 32 | mandatory = true 33 | versionRange = "[45.0.0,)" 34 | ordering = "NONE" 35 | side = "BOTH" 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yaml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest a change to the project 3 | title: "[Feature] CHANGE ME" 4 | labels: [ "enhancement" ] 5 | body: 6 | - type: textarea 7 | attributes: 8 | label: What is your feature request? 9 | description: | 10 | Please describe the feature you would like to see. 11 | 12 | Tip: You can attach images or additional log files by clicking this area to highlight it and then dragging files in. 13 | - type: checkboxes 14 | id: types 15 | attributes: 16 | label: What do you think this change is of? 17 | description: Please select all that apply. 18 | options: 19 | - label: Visual 20 | - label: Recipe Lookup 21 | - label: Cheat Mode 22 | - label: Plugin Integration / JEI Plugin Compatibility 23 | - label: Others 24 | - type: markdown 25 | attributes: 26 | value: | 27 | Thanks for taking the time to fill out this feature request! -------------------------------------------------------------------------------- /neoforge/src/main/resources/META-INF/neoforge.mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "[1,)" 3 | issueTrackerURL = "https://github.com/shedaniel/RoughlyEnoughItems/issues" 4 | logoFile = "icon.png" 5 | authors = "shedaniel" 6 | license = "MIT" 7 | 8 | [[mods]] 9 | modId = "roughlyenoughitems" 10 | version = "${version}" 11 | displayName = "Roughly Enough Items (REI)" 12 | description = ''' 13 | To allow players to view items and recipes. 14 | ''' 15 | 16 | [[dependencies.roughlyenoughitems]] 17 | modId = "architectury" 18 | type = "required" 19 | versionRange = "[16.1.0,)" 20 | ordering = "NONE" 21 | side = "BOTH" 22 | 23 | [[dependencies.roughlyenoughitems]] 24 | modId = "cloth_config" 25 | type = "required" 26 | versionRange = "[18.0,)" 27 | ordering = "NONE" 28 | side = "BOTH" 29 | 30 | [[dependencies.roughlyenoughitems]] 31 | modId = "neoforge" 32 | type = "required" 33 | versionRange = "[21.5-beta,)" 34 | ordering = "NONE" 35 | side = "BOTH" 36 | 37 | [[mixins]] 38 | config = "rei.mixins.json" 39 | -------------------------------------------------------------------------------- /HEADER: -------------------------------------------------------------------------------- 1 | This file is licensed under the MIT License, part of Roughly Enough Items. 2 | Copyright (c) ${year} ${name} 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | Auto Config is bundled with Roughly Enough items, and is licensed under Apache License 2.0. -------------------------------------------------------------------------------- /.github/workflows/curseforge.yml: -------------------------------------------------------------------------------- 1 | name: CF CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - 3.x 7 | - 4.x-unstable 8 | - 4.x 9 | - 5.x 10 | - 6.x 11 | - 6.x-1.17 12 | - 7.x-1.18 13 | - 8.x-1.18.2 14 | - 9.x-1.19 15 | - 10.x-1.19.3 16 | - 11.x-1.19.4 17 | - 11.x-23w13a_or_b 18 | - 12.x-1.20 19 | - 13.x-1.20.2 20 | - 14.x-1.20.4 21 | - 15.x-1.20.5 22 | - 16.x-1.21 23 | - 17.x-1.21.2 24 | - 18.x-1.21.4 25 | - 19.x-1.21.5 26 | 27 | jobs: 28 | build: 29 | runs-on: ubuntu-latest 30 | if: "!contains(github.event.head_commit.message, 'ci skip')" 31 | steps: 32 | - uses: actions/checkout@v2 33 | - name: Set up JDK 21 34 | uses: actions/setup-java@v2 35 | with: 36 | java-version: 21 37 | distribution: temurin 38 | - name: Upload Mod 39 | uses: gradle/gradle-build-action@v2 40 | with: 41 | arguments: build publish publishUnified --stacktrace 42 | env: 43 | danielshe_curse_api_key: ${{ secrets.CF_API_KEY }} 44 | modrinth_key: ${{ secrets.MODRINTH_KEY }} 45 | BRANCH_NAME: ${{ github.ref }} 46 | MAVEN_PASS: ${{ secrets.MAVEN_PASS }} 47 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/registry/ReloadStage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.registry; 25 | 26 | public enum ReloadStage { 27 | START, 28 | END, 29 | } 30 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/favorites/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | @ApiStatus.Experimental 25 | package me.shedaniel.rei.api.client.favorites; 26 | 27 | import org.jetbrains.annotations.ApiStatus; -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/basewidgets/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | @ApiStatus.Internal 25 | package me.shedaniel.rei.impl.client.gui.widget.basewidgets; 26 | 27 | import org.jetbrains.annotations.ApiStatus; -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/entry/filtering/FilteringResultFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.entry.filtering; 25 | 26 | @FunctionalInterface 27 | public interface FilteringResultFactory { 28 | FilteringResult create(); 29 | } 30 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/LateRenderable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.widget; 25 | 26 | import org.jetbrains.annotations.ApiStatus; 27 | 28 | @ApiStatus.Internal 29 | public interface LateRenderable { 30 | } 31 | -------------------------------------------------------------------------------- /fabric/src/main/java/me/shedaniel/rei/fabric/RoughlyEnoughItemsFabric.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.fabric; 25 | 26 | import net.fabricmc.api.ClientModInitializer; 27 | 28 | public class RoughlyEnoughItemsFabric implements ClientModInitializer { 29 | @Override 30 | public void onInitializeClient() { 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/brewing/BrewingRecipe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.plugin.common.displays.brewing; 25 | 26 | import me.shedaniel.rei.api.common.entry.EntryIngredient; 27 | 28 | public record BrewingRecipe(EntryIngredient input, EntryIngredient ingredient, EntryIngredient output) { 29 | } -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/WidgetHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.widgets; 25 | 26 | import net.minecraft.client.gui.components.events.GuiEventListener; 27 | 28 | import java.util.List; 29 | 30 | public interface WidgetHolder { 31 | List children(); 32 | } 33 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/entry/filtering/FilteringContextType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.entry.filtering; 25 | 26 | public enum FilteringContextType { 27 | SHOWN, 28 | DEFAULT, 29 | HIDDEN; 30 | 31 | public boolean isHidden() { 32 | return this == HIDDEN; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/CampfireDisplay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.plugin.common.displays; 25 | 26 | import me.shedaniel.rei.api.common.display.Display; 27 | 28 | import java.util.OptionalDouble; 29 | 30 | public interface CampfireDisplay extends Display { 31 | OptionalDouble cookTime(); 32 | } 33 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/init/PluginDetector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.init; 25 | 26 | import java.util.function.Supplier; 27 | 28 | public interface PluginDetector { 29 | void detectCommonPlugins(); 30 | 31 | default Supplier detectClientPlugins() { 32 | return () -> () -> {}; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /default-plugin/src/main/java/me/shedaniel/rei/plugin/client/displays/ClientsidedRecipeBookDisplay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.plugin.client.displays; 25 | 26 | import net.minecraft.world.item.crafting.display.RecipeDisplayId; 27 | 28 | import java.util.Optional; 29 | 30 | public interface ClientsidedRecipeBookDisplay { 31 | Optional recipeDisplayId(); 32 | } 33 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/config/options/ConfigPreviewer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.config.options; 25 | 26 | import me.shedaniel.rei.api.client.gui.widgets.WidgetWithBounds; 27 | 28 | import java.util.function.Supplier; 29 | 30 | public interface ConfigPreviewer { 31 | WidgetWithBounds preview(int width, Supplier value); 32 | } 33 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/PanelBoundary.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | public record PanelBoundary( 27 | double horizontalPercentage, 28 | double verticalPercentage, 29 | int horizontalLimit, 30 | int verticalLimit, 31 | double horizontalAlign, 32 | double verticalAlign 33 | ) { 34 | } 35 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/CloseableScissors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.widgets; 25 | 26 | import org.jetbrains.annotations.ApiStatus; 27 | 28 | import java.io.Closeable; 29 | 30 | @ApiStatus.NonExtendable 31 | @ApiStatus.Experimental 32 | public interface CloseableScissors extends Closeable { 33 | @Override 34 | void close(); 35 | } 36 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginClient { 34 | } 35 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginCommon.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginCommon { 34 | } 35 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginLoaderClient { 34 | } -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderCommon.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginLoaderCommon { 34 | } -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginClient { 34 | } 35 | -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginCommon.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginCommon { 34 | } 35 | -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginLoaderClient { 34 | } -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderCommon.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginLoaderCommon { 34 | } -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginDedicatedServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginDedicatedServer { 34 | } 35 | -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginDedicatedServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginDedicatedServer { 34 | } 35 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderDedicatedServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginLoaderDedicatedServer { 34 | } -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderDedicatedServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface REIPluginLoaderDedicatedServer { 34 | } -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei; 25 | 26 | import dev.architectury.platform.Platform; 27 | import me.shedaniel.rei.api.client.config.ConfigManager; 28 | 29 | public class REIModMenuEntryPoint { 30 | public void onInitializeClient() { 31 | Platform.getMod("roughlyenoughitems").registerConfigurationScreen(ConfigManager.getInstance()::getConfigScreen); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/util/Identifiable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.util; 25 | 26 | import net.minecraft.resources.ResourceLocation; 27 | 28 | /** 29 | * An interface that allows an entry to be identified. 30 | */ 31 | public interface Identifiable { 32 | /** 33 | * Returns the unique identifier. 34 | * 35 | * @return the unique identifier 36 | */ 37 | ResourceLocation getIdentifier(); 38 | } 39 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/registry/screen/ExclusionZonesProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.registry.screen; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import net.fabricmc.api.EnvType; 28 | import net.fabricmc.api.Environment; 29 | 30 | import java.util.Collection; 31 | 32 | @FunctionalInterface 33 | @Environment(EnvType.CLIENT) 34 | public interface ExclusionZonesProvider { 35 | Collection provide(T screen); 36 | } 37 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/impl/client/gui/credits/forge/CreditsScreenImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.credits.forge; 25 | 26 | import me.shedaniel.rei.impl.client.gui.credits.CreditsScreen; 27 | import net.minecraft.util.Tuple; 28 | 29 | import java.util.List; 30 | 31 | public class CreditsScreenImpl { 32 | public static void fillTranslators(Exception[] exception, List>> translators) { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/impl/client/gui/credits/forge/CreditsScreenImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.credits.forge; 25 | 26 | import me.shedaniel.rei.impl.client.gui.credits.CreditsScreen; 27 | import net.minecraft.util.Tuple; 28 | 29 | import java.util.List; 30 | 31 | public class CreditsScreenImpl { 32 | public static void fillTranslators(Exception[] exception, List>> translators) { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/util/ClientEntryIngredients.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.util; 25 | 26 | import me.shedaniel.rei.api.client.gui.Renderer; 27 | import me.shedaniel.rei.api.common.entry.EntryIngredient; 28 | 29 | public final class ClientEntryIngredients { 30 | private ClientEntryIngredients() {} 31 | 32 | public static EntryIngredient of(Renderer renderer) { 33 | return EntryIngredient.of(ClientEntryStacks.of(renderer)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/DrawableConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.gui.GuiGraphics; 29 | 30 | /** 31 | * Consumer of a {@link GuiGraphics} and information of mouse and delta. 32 | */ 33 | @Environment(EnvType.CLIENT) 34 | public interface DrawableConsumer { 35 | void render(GuiGraphics graphics, int mouseX, int mouseY, float delta); 36 | } 37 | -------------------------------------------------------------------------------- /runtime/build.gradle: -------------------------------------------------------------------------------- 1 | archivesBaseName = rootProject.name + "-" + project.name 2 | 3 | architectury { 4 | common(platforms.split(",")) 5 | } 6 | 7 | loom { 8 | accessWidenerPath = gradle.rootProject.project("fabric").file("src/main/resources/roughlyenoughitems.accessWidener") 9 | } 10 | 11 | dependencies { 12 | modCompileOnly("net.fabricmc:fabric-loader:${project.fabricloader_version}") 13 | modApi("me.shedaniel.cloth:cloth-config:${cloth_config_version}") 14 | modApi("dev.architectury:architectury:${architectury_version}") 15 | compileOnly(annotationProcessor("org.projectlombok:lombok:1.18.22")) 16 | compileOnly(project(path: ":api", configuration: "namedElements")) 17 | testImplementation(project(path: ":api", configuration: "namedElements")) 18 | testImplementation("org.junit.jupiter:junit-jupiter:5.8.2") 19 | } 20 | 21 | test { 22 | useJUnitPlatform() 23 | } 24 | 25 | remapJar { 26 | archiveClassifier = "raw" 27 | } 28 | 29 | task fakeJar(type: Jar, dependsOn: remapJar) { 30 | from remapJar.archiveFile.map { zipTree(it) } 31 | from(rootProject.file("fake/fabric.mod.json")) { 32 | into "" 33 | } 34 | archiveClassifier = null 35 | } 36 | 37 | artifacts { 38 | apiElements(fakeJar) 39 | runtimeElements(fakeJar) 40 | } 41 | 42 | afterEvaluate { 43 | configurations.apiElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } 44 | configurations.runtimeElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } 45 | } 46 | 47 | publishing { 48 | publications { 49 | mavenCommon(MavenPublication) { 50 | artifactId = rootProject.name + "-" + project.name 51 | from components.java 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/util/ClientTickCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.util; 25 | 26 | import dev.architectury.event.events.client.ClientTickEvent; 27 | 28 | public class ClientTickCounter { 29 | private static int ticks = 0; 30 | 31 | static { 32 | ClientTickEvent.CLIENT_POST.register(tick -> { 33 | ticks++; 34 | }); 35 | } 36 | 37 | public static int getTicks() { 38 | return ticks; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/entry/type/BuiltinEntryTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.entry.type; 25 | 26 | import net.minecraft.resources.ResourceLocation; 27 | import net.minecraft.util.Unit; 28 | import org.jetbrains.annotations.ApiStatus; 29 | 30 | @ApiStatus.NonExtendable 31 | public interface BuiltinEntryTypes { 32 | ResourceLocation EMPTY_ID = ResourceLocation.withDefaultNamespace("empty"); 33 | 34 | EntryType EMPTY = EntryType.deferred(EMPTY_ID); 35 | } 36 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/search/argument/type/MatchType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.search.argument.type; 25 | 26 | import org.jetbrains.annotations.ApiStatus; 27 | 28 | @ApiStatus.Internal 29 | public enum MatchType { 30 | INVERT_MATCHED, 31 | UNMATCHED, 32 | MATCHED; 33 | 34 | public boolean isMatched() { 35 | return this != UNMATCHED; 36 | } 37 | 38 | public boolean isInverted() { 39 | return this == INVERT_MATCHED; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/favorites/SystemFavoriteEntryProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.favorites; 25 | 26 | import java.util.List; 27 | 28 | /** 29 | * @deprecated {@link FavoriteEntryType.Section#add(boolean, FavoriteEntry...)} 30 | */ 31 | @FunctionalInterface 32 | @Deprecated(forRemoval = true) 33 | public interface SystemFavoriteEntryProvider { 34 | List provide(); 35 | 36 | default long updateInterval() { 37 | return 250; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import net.neoforged.api.distmarker.Dist; 27 | 28 | import java.lang.annotation.ElementType; 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.RetentionPolicy; 31 | import java.lang.annotation.Target; 32 | 33 | @Retention(RetentionPolicy.RUNTIME) 34 | @Target(ElementType.TYPE) 35 | @Deprecated(forRemoval = true) 36 | public @interface REIPlugin { 37 | Dist[] value() default {Dist.CLIENT, Dist.DEDICATED_SERVER}; 38 | } 39 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/impl/display/DisplaySpec.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.display; 25 | 26 | import me.shedaniel.rei.api.common.display.Display; 27 | import net.minecraft.resources.ResourceLocation; 28 | import org.jetbrains.annotations.ApiStatus; 29 | 30 | import java.util.Collection; 31 | 32 | @ApiStatus.Internal 33 | public interface DisplaySpec { 34 | @ApiStatus.Internal 35 | Display provideInternalDisplay(); 36 | 37 | @ApiStatus.Internal 38 | Collection provideInternalDisplayIds(); 39 | } 40 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import net.minecraftforge.api.distmarker.Dist; 27 | 28 | import java.lang.annotation.ElementType; 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.RetentionPolicy; 31 | import java.lang.annotation.Target; 32 | 33 | @Retention(RetentionPolicy.RUNTIME) 34 | @Target(ElementType.TYPE) 35 | @Deprecated(forRemoval = true) 36 | public @interface REIPlugin { 37 | Dist[] value() default {Dist.CLIENT, Dist.DEDICATED_SERVER}; 38 | } 39 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/FavoriteAddWidgetMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.minecraft.client.resources.language.I18n; 27 | 28 | import java.util.Locale; 29 | 30 | public enum FavoriteAddWidgetMode { 31 | ALWAYS_INVISIBLE, 32 | AUTO_HIDE, 33 | ALWAYS_VISIBLE, 34 | ; 35 | 36 | @Override 37 | public String toString() { 38 | return I18n.get("config.rei.value.favorites.new_favorites_button_visibility." + name().toLowerCase(Locale.ROOT)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import net.minecraftforge.api.distmarker.Dist; 27 | 28 | import java.lang.annotation.ElementType; 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.RetentionPolicy; 31 | import java.lang.annotation.Target; 32 | 33 | @Retention(RetentionPolicy.RUNTIME) 34 | @Target(ElementType.TYPE) 35 | @Deprecated(forRemoval = true) 36 | public @interface REIPluginLoader { 37 | Dist[] value() default {Dist.CLIENT, Dist.DEDICATED_SERVER}; 38 | } 39 | -------------------------------------------------------------------------------- /neoforge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.forge; 25 | 26 | import net.neoforged.api.distmarker.Dist; 27 | 28 | import java.lang.annotation.ElementType; 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.RetentionPolicy; 31 | import java.lang.annotation.Target; 32 | 33 | @Retention(RetentionPolicy.RUNTIME) 34 | @Target(ElementType.TYPE) 35 | @Deprecated(forRemoval = true) 36 | public @interface REIPluginLoader { 37 | Dist[] value() default {Dist.CLIENT, Dist.DEDICATED_SERVER}; 38 | } 39 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/ItemCheatingStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.resources.language.I18n; 29 | 30 | import java.util.Locale; 31 | 32 | @Environment(EnvType.CLIENT) 33 | public enum ItemCheatingStyle { 34 | GRAB, 35 | GIVE; 36 | 37 | @Override 38 | public String toString() { 39 | return I18n.get("config.rei.value.cheats.method." + name().toLowerCase(Locale.ROOT)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/entry/EntrySerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.entry; 25 | 26 | import com.mojang.serialization.Codec; 27 | import net.minecraft.network.RegistryFriendlyByteBuf; 28 | import net.minecraft.network.codec.StreamCodec; 29 | 30 | /** 31 | * A serializer for {@link EntryStack}, optionally supporting saving and reading. 32 | * 33 | * @param the type of object to serialize 34 | */ 35 | public interface EntrySerializer { 36 | Codec codec(); 37 | 38 | StreamCodec streamCodec(); 39 | } 40 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/SearchMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.resources.language.I18n; 29 | 30 | import java.util.Locale; 31 | 32 | @Environment(EnvType.CLIENT) 33 | public enum SearchMode { 34 | ALWAYS, 35 | PREFIX, 36 | NEVER; 37 | 38 | @Override 39 | public String toString() { 40 | return I18n.get("config.rei.value.search.filters." + name().toLowerCase(Locale.ROOT)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/EntryPanelOrdering.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | public enum EntryPanelOrdering { 27 | REGISTRY("ordering.rei.registry"), 28 | NAME("ordering.rei.name"), 29 | GROUPS("ordering.rei.item_groups"); 30 | 31 | private String nameTranslationKey; 32 | 33 | EntryPanelOrdering(String nameTranslationKey) { 34 | this.nameTranslationKey = nameTranslationKey; 35 | } 36 | 37 | public String getNameTranslationKey() { 38 | return nameTranslationKey; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/init/PlatformAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.init; 25 | 26 | import me.shedaniel.rei.api.common.entry.EntryIngredient; 27 | import net.minecraft.world.item.crafting.Ingredient; 28 | 29 | import java.util.ServiceLoader; 30 | 31 | public interface PlatformAdapter { 32 | ServiceLoader LOADER = ServiceLoader.load(PlatformAdapter.class); 33 | 34 | static PlatformAdapter get() { 35 | return LOADER.findFirst().orElseThrow(); 36 | } 37 | 38 | EntryIngredient fromIngredient(Ingredient ingredient); 39 | } 40 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/registry/screen/DisplayBoundsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.registry.screen; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import net.fabricmc.api.EnvType; 28 | import net.fabricmc.api.Environment; 29 | import org.jetbrains.annotations.Nullable; 30 | 31 | @Environment(EnvType.CLIENT) 32 | public interface DisplayBoundsProvider extends OverlayDecider { 33 | /** 34 | * @param screen the screen 35 | * @return the boundary of the base container panel. 36 | */ 37 | @Nullable 38 | Rectangle getScreenBounds(T screen); 39 | } -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/entry/settings/EntryIngredientSetting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.entry.settings; 25 | 26 | import me.shedaniel.rei.api.common.entry.EntryIngredient; 27 | import org.jetbrains.annotations.ApiStatus; 28 | 29 | import java.util.UUID; 30 | 31 | /** 32 | * Represents a setting for an {@link EntryIngredient}. 33 | * 34 | * @param the type of the setting 35 | * @since 8.4 36 | */ 37 | @ApiStatus.Experimental 38 | public interface EntryIngredientSetting { 39 | EntryIngredientSetting FOCUS_UUID = new EntryIngredientSetting<>() {}; 40 | } 41 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/registry/transfer/TransferHandlerRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.registry.transfer; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import me.shedaniel.rei.api.client.gui.widgets.Widget; 28 | import me.shedaniel.rei.api.common.display.Display; 29 | import net.minecraft.client.gui.GuiGraphics; 30 | 31 | import java.util.List; 32 | 33 | @FunctionalInterface 34 | public interface TransferHandlerRenderer { 35 | void render(GuiGraphics graphics, int mouseX, int mouseY, float delta, List widgets, Rectangle bounds, Display display); 36 | } 37 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/entry/type/VanillaEntryTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.entry.type; 25 | 26 | import dev.architectury.fluid.FluidStack; 27 | import net.minecraft.resources.ResourceLocation; 28 | import net.minecraft.world.item.ItemStack; 29 | import org.jetbrains.annotations.ApiStatus; 30 | 31 | @ApiStatus.NonExtendable 32 | public interface VanillaEntryTypes { 33 | EntryType ITEM = EntryType.deferred(ResourceLocation.withDefaultNamespace("item")); 34 | EntryType FLUID = EntryType.deferred(ResourceLocation.withDefaultNamespace("fluid")); 35 | } 36 | -------------------------------------------------------------------------------- /default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/cooking/CookingDisplay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.plugin.common.displays.cooking; 25 | 26 | import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay; 27 | 28 | import java.util.OptionalDouble; 29 | 30 | public interface CookingDisplay extends SimpleGridMenuDisplay { 31 | @Override 32 | default int getWidth() { 33 | return 1; 34 | } 35 | 36 | @Override 37 | default int getHeight() { 38 | return 1; 39 | } 40 | 41 | OptionalDouble xp(); 42 | 43 | OptionalDouble cookTime(); 44 | } 45 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/DisplayScreenType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.resources.language.I18n; 29 | 30 | import java.util.Locale; 31 | 32 | @Environment(EnvType.CLIENT) 33 | public enum DisplayScreenType { 34 | UNSET, 35 | ORIGINAL, 36 | COMPOSITE; 37 | 38 | @Override 39 | public String toString() { 40 | return I18n.get("config.rei.value.appearance.recipe_lookup_style." + name().toLowerCase(Locale.ROOT)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/panel/rows/FavoritesPanelRow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.widget.favorites.panel.rows; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import me.shedaniel.rei.api.client.gui.AbstractContainerEventHandler; 28 | import net.minecraft.client.gui.GuiGraphics; 29 | 30 | public abstract class FavoritesPanelRow extends AbstractContainerEventHandler { 31 | public abstract int getRowHeight(); 32 | 33 | public abstract void render(GuiGraphics graphics, Rectangle innerBounds, int x, int y, int rowWidth, int rowHeight, int mouseX, int mouseY, float delta); 34 | } -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/registry/display/ServerDisplayRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.registry.display; 25 | 26 | import me.shedaniel.rei.api.common.plugins.PluginManager; 27 | import me.shedaniel.rei.api.common.plugins.REICommonPlugin; 28 | 29 | public interface ServerDisplayRegistry extends DisplayRegistryCommon, DisplayConsumer.RecipeManagerConsumer { 30 | /** 31 | * @return the instance of {@link ServerDisplayRegistry} 32 | */ 33 | static ServerDisplayRegistry getInstance() { 34 | return PluginManager.getInstance().get(ServerDisplayRegistry.class); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/AppearanceTheme.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import me.shedaniel.clothconfig2.gui.entries.SelectionListEntry; 27 | import net.fabricmc.api.EnvType; 28 | import net.fabricmc.api.Environment; 29 | import net.minecraft.client.resources.language.I18n; 30 | 31 | import java.util.Locale; 32 | 33 | @Environment(EnvType.CLIENT) 34 | public enum AppearanceTheme { 35 | LIGHT, 36 | DARK; 37 | 38 | @Override 39 | public String toString() { 40 | return I18n.get("config.rei.value.appearance.theme." + name().toLowerCase(Locale.ROOT)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/SyntaxHighlightingMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.resources.language.I18n; 29 | 30 | import java.util.Locale; 31 | 32 | @Environment(EnvType.CLIENT) 33 | public enum SyntaxHighlightingMode { 34 | PLAIN, 35 | PLAIN_UNDERSCORED, 36 | COLORFUL, 37 | COLORFUL_UNDERSCORED; 38 | 39 | @Override 40 | public String toString() { 41 | return I18n.get("config.rei.value.search.syntax_highlighting." + name().toLowerCase(Locale.ROOT)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/registry/transfer/TransferHandlerRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.registry.transfer; 25 | 26 | import me.shedaniel.rei.api.client.plugins.REIClientPlugin; 27 | import me.shedaniel.rei.api.common.plugins.PluginManager; 28 | import me.shedaniel.rei.api.common.registry.Reloadable; 29 | 30 | public interface TransferHandlerRegistry extends Reloadable, Iterable { 31 | static TransferHandlerRegistry getInstance() { 32 | return PluginManager.getClientInstance().get(TransferHandlerRegistry.class); 33 | } 34 | 35 | void register(TransferHandler handler); 36 | } 37 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/init/PrimitivePlatformAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.init; 25 | 26 | import java.util.ServiceLoader; 27 | 28 | public interface PrimitivePlatformAdapter { 29 | ServiceLoader LOADER = ServiceLoader.load(PrimitivePlatformAdapter.class); 30 | 31 | static PrimitivePlatformAdapter get() { 32 | return LOADER.findFirst().orElseThrow(); 33 | } 34 | 35 | boolean isClient(); 36 | 37 | boolean isDev(); 38 | 39 | void checkMods(); 40 | 41 | String getMinecraftVersion(); 42 | 43 | int compareVersions(String version1, String version2); 44 | } 45 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/ItemCheatingMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.resources.language.I18n; 29 | 30 | @Environment(EnvType.CLIENT) 31 | public enum ItemCheatingMode { 32 | REI_LIKE, 33 | JEI_LIKE; 34 | 35 | @Override 36 | public String toString() { 37 | if (this == REI_LIKE) { 38 | return I18n.get("config.rei.value.cheats.amount.default"); 39 | } else { 40 | return I18n.get("config.rei.value.cheats.amount.reversed"); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/entry/type/EntryTypeBridge.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.entry.type; 25 | 26 | import dev.architectury.event.CompoundEventResult; 27 | import me.shedaniel.rei.api.common.entry.EntryStack; 28 | 29 | import java.util.stream.Stream; 30 | 31 | /** 32 | * A bridge of two different entry types, for comparison and equality checks. 33 | * 34 | * @param the original entry type 35 | * @param the destination entry type 36 | * @see EntryTypeRegistry#registerBridge(EntryType, EntryType, EntryTypeBridge) 37 | */ 38 | @FunctionalInterface 39 | public interface EntryTypeBridge { 40 | CompoundEventResult>> bridge(EntryStack object); 41 | } 42 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/entry/type/BuiltinClientEntryTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.entry.type; 25 | 26 | import me.shedaniel.rei.api.client.gui.Renderer; 27 | import me.shedaniel.rei.api.common.entry.type.EntryType; 28 | import net.fabricmc.api.EnvType; 29 | import net.fabricmc.api.Environment; 30 | import net.minecraft.resources.ResourceLocation; 31 | import org.jetbrains.annotations.ApiStatus; 32 | 33 | @ApiStatus.NonExtendable 34 | @Environment(EnvType.CLIENT) 35 | public interface BuiltinClientEntryTypes { 36 | ResourceLocation RENDERING_ID = ResourceLocation.withDefaultNamespace("rendering"); 37 | 38 | EntryType RENDERING = EntryType.deferred(RENDERING_ID); 39 | } 40 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/DisplayPanelLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.fabricmc.api.EnvType; 27 | import net.fabricmc.api.Environment; 28 | import net.minecraft.client.resources.language.I18n; 29 | 30 | import java.util.Locale; 31 | 32 | @Environment(EnvType.CLIENT) 33 | public enum DisplayPanelLocation { 34 | LEFT, 35 | RIGHT; 36 | 37 | public DisplayPanelLocation mirror() { 38 | if (this == LEFT) return RIGHT; 39 | return LEFT; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return I18n.get("config.rei.value.layout.location." + name().toLowerCase(Locale.ROOT)); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/entry/filtering/FilteringResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.entry.filtering; 25 | 26 | import me.shedaniel.rei.api.common.entry.EntryStack; 27 | import net.fabricmc.api.EnvType; 28 | import net.fabricmc.api.Environment; 29 | import org.jetbrains.annotations.ApiStatus; 30 | 31 | import java.util.Collection; 32 | 33 | @Environment(EnvType.CLIENT) 34 | @ApiStatus.Experimental 35 | public interface FilteringResult { 36 | FilteringResult hide(EntryStack stack); 37 | 38 | FilteringResult hide(Collection> stacks); 39 | 40 | FilteringResult show(EntryStack stack); 41 | 42 | FilteringResult show(Collection> stacks); 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/drag/DraggedAcceptorResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.drag; 25 | 26 | /** 27 | * The result of the visitor, this is used to determine if the visitor consumed the stack or not. 28 | */ 29 | public enum DraggedAcceptorResult { 30 | /** 31 | * The visitor consumed the stack, the stack will not be returned to the original stack. 32 | */ 33 | CONSUMED, 34 | /** 35 | * The visitor did not consume the stack, the stack will be returned to the original stack, 36 | * other visitors will not be called. 37 | */ 38 | ACCEPTED, 39 | /** 40 | * The visitor did not consume the stack, the stack will be passed to the next visitor. 41 | */ 42 | PASS, 43 | ; 44 | } -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/util/TextRepresentable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.util; 25 | 26 | import me.shedaniel.rei.api.client.gui.widgets.TooltipContext; 27 | import net.minecraft.network.chat.Component; 28 | 29 | /** 30 | * A component that can be represented in {@link Component}. 31 | */ 32 | public interface TextRepresentable { 33 | default Component asFormattedText() { 34 | return Component.empty(); 35 | } 36 | 37 | default Component asFormattedText(TooltipContext context) { 38 | return asFormattedText(); 39 | } 40 | 41 | default Component asFormatStrippedText() { 42 | return Component.literal(FormattingUtils.stripFormatting(asFormattedText().getString())); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /api/build.gradle: -------------------------------------------------------------------------------- 1 | import net.fabricmc.loom.task.RemapJarTask 2 | 3 | archivesBaseName = rootProject.name + "-" + project.name 4 | 5 | loom { 6 | accessWidenerPath = gradle.rootProject.project("fabric").file("src/main/resources/roughlyenoughitems.accessWidener") 7 | } 8 | 9 | dependencies { 10 | modCompileOnly("net.fabricmc:fabric-loader:${project.fabricloader_version}") 11 | modApi("me.shedaniel.cloth:cloth-config:${cloth_config_version}") 12 | modApi("dev.architectury:architectury:${architectury_version}") 13 | } 14 | 15 | architectury { 16 | common(platforms.split(",")) 17 | } 18 | 19 | remapJar { 20 | archiveClassifier = "raw" 21 | } 22 | 23 | task fakeJar(type: Jar, dependsOn: remapJar) { 24 | from remapJar.archiveFile.map { zipTree(it) } 25 | from(rootProject.file("fake/fabric.mod.json")) { 26 | into "" 27 | } 28 | archiveClassifier = null 29 | } 30 | 31 | task fakeForgeJar(type: Jar, dependsOn: jar) { 32 | from jar.archiveFile.map { zipTree(it) } 33 | from(rootProject.file("fake/mods.toml")) { 34 | into "META-INF" 35 | } 36 | ["REIPlugin", "REIPluginClient", "REIPluginCommon", "REIPluginDedicatedServer", 37 | "REIPluginLoader", "REIPluginLoaderClient", "REIPluginLoaderCommon", "REIPluginLoaderDedicatedServer"].each { 38 | from(rootProject.file("fake/${it}.class")) { 39 | into "me/shedaniel/rei/forge" 40 | } 41 | } 42 | archiveClassifier = "fake-forge" 43 | } 44 | 45 | artifacts { 46 | apiElements(fakeJar) 47 | runtimeElements(fakeJar) 48 | } 49 | 50 | afterEvaluate { 51 | configurations.apiElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } 52 | configurations.runtimeElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } 53 | } 54 | 55 | publishing { 56 | publications { 57 | mavenCommon(MavenPublication) { 58 | artifactId = rootProject.name + "-" + project.name 59 | from components.java 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /default-plugin/build.gradle: -------------------------------------------------------------------------------- 1 | archivesBaseName = rootProject.name + "-" + project.name 2 | 3 | loom { 4 | accessWidenerPath = gradle.rootProject.project("fabric").file("src/main/resources/roughlyenoughitems.accessWidener") 5 | } 6 | 7 | dependencies { 8 | modCompileOnly("net.fabricmc:fabric-loader:${project.fabricloader_version}") 9 | modApi("me.shedaniel.cloth:cloth-config:${cloth_config_version}") 10 | modApi("dev.architectury:architectury:${architectury_version}") 11 | compileOnly(project(path: ":api", configuration: "namedElements")) 12 | } 13 | 14 | architectury { 15 | common(platforms.split(",")) 16 | } 17 | 18 | remapJar { 19 | archiveClassifier = "raw" 20 | } 21 | 22 | task fakeJar(type: Jar, dependsOn: remapJar) { 23 | from remapJar.archiveFile.map { zipTree(it) } 24 | from(rootProject.file("fake/fabric.mod.json")) { 25 | into "" 26 | } 27 | archiveClassifier = null 28 | } 29 | 30 | task fakeForgeJar(type: Jar, dependsOn: jar) { 31 | from jar.archiveFile.map { zipTree(it) } 32 | from(rootProject.file("fake/mods.toml")) { 33 | into "META-INF" 34 | } 35 | ["REIPlugin", "REIPluginClient", "REIPluginCommon", "REIPluginDedicatedServer", 36 | "REIPluginLoader", "REIPluginLoaderClient", "REIPluginLoaderCommon", "REIPluginLoaderDedicatedServer"].each { 37 | from(rootProject.file("fake/$it.class")) { 38 | into "me/shedaniel/rei/forge" 39 | } 40 | } 41 | archiveClassifier = "fake-forge" 42 | } 43 | 44 | artifacts { 45 | apiElements(fakeJar) 46 | runtimeElements(fakeJar) 47 | } 48 | 49 | afterEvaluate { 50 | configurations.apiElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } 51 | configurations.runtimeElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } 52 | } 53 | 54 | publishing { 55 | publications { 56 | mavenCommon(MavenPublication) { 57 | artifactId = rootProject.name + "-" + project.name 58 | from components.java 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/DisplayRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui; 25 | 26 | import me.shedaniel.rei.api.client.gui.widgets.Tooltip; 27 | import me.shedaniel.rei.api.client.gui.widgets.TooltipContext; 28 | import net.fabricmc.api.EnvType; 29 | import net.fabricmc.api.Environment; 30 | import org.jetbrains.annotations.ApiStatus; 31 | import org.jetbrains.annotations.Nullable; 32 | 33 | @ApiStatus.OverrideOnly 34 | @Environment(EnvType.CLIENT) 35 | public abstract class DisplayRenderer implements Renderer { 36 | public abstract int getHeight(); 37 | 38 | public final int getWidth() { 39 | return 100; 40 | } 41 | 42 | @Override 43 | @Nullable 44 | public Tooltip getTooltip(TooltipContext mouse) { 45 | return null; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/search/SearchRuntime.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.search; 25 | 26 | import me.shedaniel.rei.api.client.plugins.REIClientPlugin; 27 | import me.shedaniel.rei.api.common.registry.ReloadStage; 28 | import me.shedaniel.rei.api.common.registry.Reloadable; 29 | import me.shedaniel.rei.impl.client.search.argument.Argument; 30 | 31 | public class SearchRuntime implements Reloadable { 32 | @Override 33 | public void startReload() { 34 | Argument.resetCache(false); 35 | } 36 | 37 | @Override 38 | public void startReload(ReloadStage stage) { 39 | this.startReload(); 40 | } 41 | 42 | @Override 43 | public void endReload(ReloadStage stage) { 44 | Argument.resetCache(true); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/CheatingMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import net.minecraft.client.resources.language.I18n; 27 | 28 | public enum CheatingMode { 29 | OFF, 30 | ON, 31 | WHEN_CREATIVE, 32 | ; 33 | 34 | @Override 35 | public String toString() { 36 | switch (this) { 37 | case ON: 38 | return I18n.get("config.rei.value.enabledDisabled.true"); 39 | case OFF: 40 | return I18n.get("config.rei.value.enabledDisabled.false"); 41 | case WHEN_CREATIVE: 42 | return I18n.get("config.rei.value.cheats.mode.when_creative"); 43 | default: 44 | throw new IllegalStateException("Unknown CheatingMode: " + this); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/common/entry/EmptyEntryStack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.common.entry; 25 | 26 | import me.shedaniel.rei.api.common.entry.EntryStack; 27 | import me.shedaniel.rei.api.common.entry.type.BuiltinEntryTypes; 28 | import me.shedaniel.rei.api.common.entry.type.EntryDefinition; 29 | import net.minecraft.util.Unit; 30 | import org.jetbrains.annotations.ApiStatus; 31 | 32 | @ApiStatus.Internal 33 | public class EmptyEntryStack extends AbstractEntryStack { 34 | public static final EntryStack EMPTY = new EmptyEntryStack(); 35 | 36 | @Override 37 | public EntryDefinition getDefinition() { 38 | return BuiltinEntryTypes.EMPTY.getDefinition(); 39 | } 40 | 41 | @Override 42 | public Unit getValue() { 43 | return Unit.INSTANCE; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/config/ConfigAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.config; 25 | 26 | import me.shedaniel.clothconfig2.api.ModifierKeyCode; 27 | import me.shedaniel.rei.impl.client.gui.config.options.CompositeOption; 28 | import me.shedaniel.rei.impl.client.gui.modules.Menu; 29 | import org.jetbrains.annotations.Nullable; 30 | 31 | public interface ConfigAccess { 32 | T get(CompositeOption option); 33 | 34 | void set(CompositeOption option, T value); 35 | 36 | T getDefault(CompositeOption option); 37 | 38 | void closeMenu(); 39 | 40 | void openMenu(Menu menu); 41 | 42 | void focusKeycode(CompositeOption option); 43 | 44 | @Nullable 45 | CompositeOption getFocusedKeycode(); 46 | } 47 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/config/ConfigButtonPosition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.config; 25 | 26 | import me.shedaniel.clothconfig2.gui.entries.SelectionListEntry; 27 | import net.fabricmc.api.EnvType; 28 | import net.fabricmc.api.Environment; 29 | import net.minecraft.client.resources.language.I18n; 30 | 31 | import java.util.Locale; 32 | 33 | @Environment(EnvType.CLIENT) 34 | public enum ConfigButtonPosition { 35 | UPPER, 36 | LOWER; 37 | 38 | public String toString(boolean right) { 39 | if (this == UPPER && !right) return I18n.get("config.rei.value.layout.config_button_location.top_right"); 40 | if (this == UPPER) return I18n.get("config.rei.value.layout.config_button_location.top_left"); 41 | return I18n.get("config.rei.value.layout.config_button_location.next_to_search"); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/common/registry/displays/DisplaysHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.common.registry.displays; 25 | 26 | import me.shedaniel.rei.api.common.category.CategoryIdentifier; 27 | import me.shedaniel.rei.api.common.display.Display; 28 | import org.jetbrains.annotations.Nullable; 29 | 30 | import java.util.List; 31 | import java.util.Map; 32 | import java.util.Set; 33 | 34 | public interface DisplaysHolder { 35 | void add(Display display, @Nullable Object origin); 36 | 37 | boolean remove(Display display); 38 | 39 | int size(); 40 | 41 | Map, List> getUnmodifiable(); 42 | 43 | @Nullable 44 | Object getDisplayOrigin(Display display); 45 | 46 | interface ByKey extends DisplaysHolder { 47 | Set getDisplaysByKey(DisplayKey key); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /forge/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/forge/DefaultCraftingDisplayImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.plugin.common.displays.crafting.forge; 25 | 26 | import me.shedaniel.rei.plugin.common.displays.crafting.CraftingRecipeSizeProvider; 27 | import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCraftingDisplay; 28 | import net.minecraftforge.common.crafting.IShapedRecipe; 29 | 30 | public class DefaultCraftingDisplayImpl { 31 | public static void registerPlatformSizeProvider() { 32 | DefaultCraftingDisplay.registerSizeProvider(recipe -> { 33 | if (recipe instanceof IShapedRecipe) { 34 | return new CraftingRecipeSizeProvider.Size(((IShapedRecipe) recipe).getRecipeWidth(), ((IShapedRecipe) recipe).getRecipeHeight()); 35 | } 36 | 37 | return null; 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/overlay/ScreenOverlay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.overlay; 25 | 26 | import me.shedaniel.rei.api.client.gui.drag.DraggingContext; 27 | import me.shedaniel.rei.api.client.gui.widgets.WidgetWithBounds; 28 | import net.fabricmc.api.EnvType; 29 | import net.fabricmc.api.Environment; 30 | 31 | import java.util.Optional; 32 | 33 | @Environment(EnvType.CLIENT) 34 | public abstract class ScreenOverlay extends WidgetWithBounds { 35 | public abstract void queueReloadOverlay(); 36 | 37 | public abstract void queueReloadSearch(); 38 | 39 | public abstract DraggingContext getDraggingContext(); 40 | 41 | public abstract boolean isNotInExclusionZones(double mouseX, double mouseY); 42 | 43 | public abstract OverlayListWidget getEntryList(); 44 | 45 | public abstract Optional getFavoritesList(); 46 | } 47 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/impl/common/plugins/PluginReloadContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.common.plugins; 25 | 26 | import me.shedaniel.rei.api.common.registry.ReloadStage; 27 | import org.jetbrains.annotations.ApiStatus; 28 | 29 | @ApiStatus.Internal 30 | public interface PluginReloadContext { 31 | ReloadStage stage(); 32 | 33 | ReloadInterruptionContext interruptionContext(); 34 | 35 | static PluginReloadContext of(ReloadStage stage, ReloadInterruptionContext interruptionContext) { 36 | return new PluginReloadContext() { 37 | @Override 38 | public ReloadStage stage() { 39 | return stage; 40 | } 41 | 42 | @Override 43 | public ReloadInterruptionContext interruptionContext() { 44 | return interruptionContext; 45 | } 46 | }; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.common.logging; 25 | 26 | import me.shedaniel.rei.impl.common.InternalLogger; 27 | import org.apache.logging.log4j.Level; 28 | 29 | public class Log4JLogger implements InternalLogger { 30 | private final org.apache.logging.log4j.Logger logger; 31 | 32 | public Log4JLogger(org.apache.logging.log4j.Logger logger) { 33 | this.logger = logger; 34 | } 35 | 36 | @Override 37 | public void throwException(Throwable throwable) { 38 | logger.throwing(throwable); 39 | } 40 | 41 | @Override 42 | public void log(Level level, String message) { 43 | logger.log(level, message); 44 | } 45 | 46 | @Override 47 | public void log(Level level, String message, Throwable throwable) { 48 | logger.log(level, message, throwable); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TextField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.widgets; 25 | 26 | public interface TextField { 27 | String getText(); 28 | 29 | void setText(String text); 30 | 31 | String getSelectedText(); 32 | 33 | void addText(String text); 34 | 35 | void moveCursorTo(int cursor); 36 | 37 | void moveCursorToStart(); 38 | 39 | void moveCursorToEnd(); 40 | 41 | int getMaxLength(); 42 | 43 | void setMaxLength(int maxLength); 44 | 45 | int getCursor(); 46 | 47 | void setCursorPosition(int cursor); 48 | 49 | boolean hasBorder(); 50 | 51 | void setHasBorder(boolean hasBorder); 52 | 53 | void setEditableColor(int editableColor); 54 | 55 | void setNotEditableColor(int notEditableColor); 56 | 57 | boolean isFocused(); 58 | 59 | void setFocused(boolean focused); 60 | } 61 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.common.entry.type; 25 | 26 | import it.unimi.dsi.fastutil.longs.LongList; 27 | import me.shedaniel.rei.api.common.entry.EntryStack; 28 | import me.shedaniel.rei.impl.common.util.HNEntryStackWrapper; 29 | import org.jetbrains.annotations.Nullable; 30 | 31 | import java.util.List; 32 | 33 | public interface EntryRegistryListener { 34 | default void addEntryAfter(@Nullable EntryStack afterEntry, EntryStack stack, long stackHashExact) {} 35 | 36 | default void addEntriesAfter(@Nullable EntryStack afterEntry, List> stacks, @Nullable LongList hashes) {} 37 | 38 | default void removeEntry(EntryStack stack, long hashExact) {} 39 | 40 | default void removeEntries(List> stacks, @Nullable LongList hashes) {} 41 | 42 | default void onReFilter(List stacks) {} 43 | } 44 | -------------------------------------------------------------------------------- /default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/crafting/filler/CraftingRecipeFiller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.plugin.client.categories.crafting.filler; 25 | 26 | import me.shedaniel.rei.api.common.display.Display; 27 | import me.shedaniel.rei.api.common.registry.display.ServerDisplayRegistry; 28 | import net.minecraft.world.item.crafting.CraftingRecipe; 29 | import net.minecraft.world.item.crafting.RecipeHolder; 30 | import net.minecraft.world.item.crafting.RecipeType; 31 | 32 | import java.util.Collection; 33 | import java.util.function.Function; 34 | 35 | public interface CraftingRecipeFiller extends Function, Collection> { 36 | default void registerDisplays(ServerDisplayRegistry registry) { 37 | registry.beginRecipeFiller(getRecipeClass()) 38 | .filterType(RecipeType.CRAFTING) 39 | .fillMultiple(this); 40 | } 41 | 42 | Class getRecipeClass(); 43 | } 44 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/NoOpWidget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.widget; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import me.shedaniel.rei.api.client.gui.widgets.WidgetWithBounds; 28 | import net.minecraft.client.gui.GuiGraphics; 29 | import net.minecraft.client.gui.components.events.GuiEventListener; 30 | 31 | import java.util.Collections; 32 | import java.util.List; 33 | 34 | public class NoOpWidget extends WidgetWithBounds { 35 | public static final NoOpWidget INSTANCE = new NoOpWidget(); 36 | 37 | private NoOpWidget() { 38 | } 39 | 40 | @Override 41 | public void render(GuiGraphics graphics, int mouseX, int mouseY, float delta) { 42 | } 43 | 44 | @Override 45 | public List children() { 46 | return Collections.emptyList(); 47 | } 48 | 49 | @Override 50 | public Rectangle getBounds() { 51 | return new Rectangle(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/utils/PanelTextures.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.gui.widgets.utils; 25 | 26 | import me.shedaniel.rei.api.client.gui.config.RecipeBorderType; 27 | import net.minecraft.resources.ResourceLocation; 28 | 29 | public interface PanelTextures { 30 | PanelTextures DEFAULT = RecipeBorderType.DEFAULT; 31 | PanelTextures LIGHTER = RecipeBorderType.LIGHTER; 32 | PanelTextures NONE = RecipeBorderType.NONE; 33 | PanelTextures SLOT = new PanelTextures() { 34 | @Override 35 | public ResourceLocation texture() { 36 | return ResourceLocation.parse("roughlyenoughitems:widget/panel_slot"); 37 | } 38 | 39 | @Override 40 | public ResourceLocation darkTexture() { 41 | return ResourceLocation.parse("roughlyenoughitems:widget/panel_slot_dark"); 42 | } 43 | }; 44 | 45 | ResourceLocation texture(); 46 | 47 | ResourceLocation darkTexture(); 48 | } 49 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/favorites/panel/rows/FavoritesPanelSeparatorRow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.widget.favorites.panel.rows; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import net.minecraft.client.gui.GuiGraphics; 28 | import net.minecraft.client.gui.components.events.GuiEventListener; 29 | 30 | import java.util.Collections; 31 | import java.util.List; 32 | 33 | public class FavoritesPanelSeparatorRow extends FavoritesPanelRow { 34 | @Override 35 | public int getRowHeight() { 36 | return 5; 37 | } 38 | 39 | @Override 40 | public void render(GuiGraphics graphics, Rectangle innerBounds, int x, int y, int rowWidth, int rowHeight, int mouseX, int mouseY, float delta) { 41 | graphics.fillGradient(x, y + 2, x + rowWidth, y + 3, -571806998, -571806998); 42 | } 43 | 44 | @Override 45 | public List children() { 46 | return Collections.emptyList(); 47 | } 48 | } -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/client/registry/screen/SimpleClickArea.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.client.registry.screen; 25 | 26 | import me.shedaniel.math.Rectangle; 27 | import me.shedaniel.rei.api.common.category.CategoryIdentifier; 28 | import net.fabricmc.api.EnvType; 29 | import net.fabricmc.api.Environment; 30 | import net.minecraft.client.gui.screens.Screen; 31 | 32 | import java.util.Arrays; 33 | import java.util.function.Supplier; 34 | 35 | @FunctionalInterface 36 | @Environment(EnvType.CLIENT) 37 | public interface SimpleClickArea { 38 | Rectangle provide(T screen); 39 | 40 | default ClickArea toClickArea(Supplier[]> categories) { 41 | return context -> { 42 | return provide(context.getScreen()).contains(context.getMousePosition()) 43 | ? ClickArea.Result.success().categories(Arrays.asList(categories.get())) 44 | : ClickArea.Result.fail(); 45 | }; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /api/src/main/java/me/shedaniel/rei/api/common/plugins/REIPluginProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.api.common.plugins; 25 | 26 | import java.util.Collection; 27 | 28 | /** 29 | * A provider for {@link REIPlugin}. 30 | * 31 | * @param

the type of plugin 32 | */ 33 | public interface REIPluginProvider

> { 34 | default String getPluginProviderName() { 35 | Class self = getClass(); 36 | String simpleName = self.getSimpleName(); 37 | return simpleName == null ? self.getName() : simpleName; 38 | } 39 | 40 | /** 41 | * Provides the collection of REI plugins, can be dynamic. 42 | * 43 | * @return the collection of REI plugins. 44 | */ 45 | Collection

provide(); 46 | 47 | /** 48 | * Returns the type of plugin this provider provides, 49 | * should be same as {@link P}. 50 | * 51 | * @return the type of plugin this provider provides 52 | */ 53 | Class

getPluginProviderClass(); 54 | } 55 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/client/gui/hints/HintProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.client.gui.hints; 25 | 26 | import me.shedaniel.math.Color; 27 | import me.shedaniel.math.Point; 28 | import me.shedaniel.math.Rectangle; 29 | import me.shedaniel.rei.api.client.gui.widgets.Tooltip; 30 | import net.fabricmc.api.EnvType; 31 | import net.fabricmc.api.Environment; 32 | import net.minecraft.network.chat.Component; 33 | import org.jetbrains.annotations.Nullable; 34 | 35 | import java.util.List; 36 | import java.util.function.Consumer; 37 | 38 | @Environment(EnvType.CLIENT) 39 | public interface HintProvider { 40 | List provide(); 41 | 42 | @Nullable 43 | Tooltip provideTooltip(Point mouse); 44 | 45 | @Nullable 46 | default Double getProgress() { 47 | return null; 48 | } 49 | 50 | Color getColor(); 51 | 52 | List getButtons(); 53 | 54 | record HintButton(Component name, Consumer action) {} 55 | } 56 | -------------------------------------------------------------------------------- /runtime/src/main/java/me/shedaniel/rei/impl/common/entry/EntryStackProviderImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is licensed under the MIT License, part of Roughly Enough Items. 3 | * Copyright (c) 2018, 2019, 2020, 2021, 2022, 2023 shedaniel 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package me.shedaniel.rei.impl.common.entry; 25 | 26 | import me.shedaniel.rei.api.common.entry.EntryStack; 27 | import me.shedaniel.rei.api.common.entry.type.BuiltinEntryTypes; 28 | import me.shedaniel.rei.api.common.entry.type.EntryDefinition; 29 | import me.shedaniel.rei.impl.Internals; 30 | import net.minecraft.util.Unit; 31 | 32 | import java.util.Objects; 33 | 34 | public enum EntryStackProviderImpl implements Internals.EntryStackProvider { 35 | INSTANCE; 36 | 37 | @Override 38 | public EntryStack empty() { 39 | return EmptyEntryStack.EMPTY; 40 | } 41 | 42 | @Override 43 | public EntryStack of(EntryDefinition definition, T value) { 44 | if (Objects.equals(definition.getType().getId(), BuiltinEntryTypes.EMPTY_ID)) { 45 | return empty().cast(); 46 | } 47 | 48 | return new TypedEntryStack<>(definition, value); 49 | } 50 | } 51 | --------------------------------------------------------------------------------