Skip to content

Commit

Permalink
Catalogue integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Nov 27, 2023
1 parent 7646d40 commit 0ab91ef
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 6 deletions.
Binary file added .github/assets/logo/new/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/logo/new/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions blockbench/logo/Logo.bbmodel

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/src/main/resources/catalogue_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/src/main/resources/catalogue_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed common/src/main/resources/icon.jpg
Binary file not shown.
Binary file added common/src/main/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ dependencies {
//modRuntimeOnly "curse.maven:structureessentialsforgefabric-832882:4429721"
//modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:1.1.2")

// Optional dependency catalogue
modRuntimeOnly "curse.maven:catalogue-fabric-667377:4171029"

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.faboslav.friendsandfoes.integrations.fabric;

import com.faboslav.friendsandfoes.FriendsAndFoes;
import com.faboslav.friendsandfoes.config.ConfigScreenBuilder;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import net.minecraft.client.gui.screen.Screen;

public class CatalogueIntegration
{
public static Screen createConfigScreen(Screen currentScreen, ModContainer container) {
if (FabricLoader.getInstance().isModLoaded("catalogue") == false) {
return null;
}

return ConfigScreenBuilder.createConfigScreen(FriendsAndFoes.getConfig(), currentScreen);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fabric/src/main/resources/catalogue_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fabric/src/main/resources/catalogue_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"wiki": "https://github.com/Faboslav/friends-and-foes/wiki"
},
"license": "CC-BY-NC-ND-4.0",
"icon": "icon.jpg",
"icon": "icon.png",
"environment": "*",
"entrypoints": {
"main": [
Expand All @@ -23,9 +23,6 @@
"client": [
"com.faboslav.friendsandfoes.fabric.FriendsAndFoesFabricClient"
],
"server": [
"com.faboslav.friendsandfoes.fabric.FriendsAndFoesFabricServer"
],
"preLaunch": [
"com.llamalad7.mixinextras.MixinExtrasBootstrap::init"
],
Expand All @@ -46,9 +43,20 @@
"custom": {
"modmenu": {
"links": {
"modmenu.discord": "https://discord.com/invite/QGwFvvMQCn",
"Discord": "https://discord.com/invite/QGwFvvMQCn",
"Wiki": "https://github.com/Faboslav/friends-and-foes/wiki"
"Wiki": "https://github.com/Faboslav/friends-and-foes/wiki",
"CurseForge": "https://www.curseforge.com/minecraft/mc-mods/friends-and-foes",
"Modrinth": "https://modrinth.com/mod/friends-and-foes"
}
},
"catalogue": {
"configFactory": "com.faboslav.friendsandfoes.integrations.fabric.CatalogueIntegration",
"icon": {
"image": "catalogue_icon.png"
},
"banner": "catalogue_logo.png",
"background": "catalogue_background.png"
}
}
}
7 changes: 7 additions & 0 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ dependencies {

// Cloth config
modImplementation("me.shedaniel.cloth:cloth-config-forge:${rootProject.cloth_config_version}")

// Optional dependency catalogue
modRuntimeOnly "curse.maven:catalogue-459701:4171024"
}

processResources {
Expand Down Expand Up @@ -95,6 +98,10 @@ repositories {
maven {
url = "https://maven.theillusivec4.top/"
}

maven { url "https://www.cursemaven.com" }

maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" }
}

publishing {
Expand Down
7 changes: 6 additions & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version = "${modVersion}"
displayName = "${modName}"
authors = "${modAuthor}"
description = "${modDescription}"
logoFile = "icon.jpg"
logoFile = "icon.png"

[[dependencies.friendsandfoes]]
modId = "forge"
Expand All @@ -31,3 +31,8 @@ mandatory = false
versionRange = "[7,)"
ordering = "NONE"
side = "CLIENT"

[modproperties.friendsandfoes]
catalogueImageIcon="catalogue_icon.png"
catalogueBackground="catalogue_logo.png"
configuredBackground="catalogue_background.png"

0 comments on commit 0ab91ef

Please sign in to comment.