From 490d368baea7a5281ca2378d8ed812ff9d49dfc7 Mon Sep 17 00:00:00 2001 From: NotNite Date: Tue, 20 Jun 2023 15:16:52 -0400 Subject: Modrinth changes --- .gitignore | 3 +++ README.md | 4 ++-- build.gradle | 15 +++++++++++++++ upload_to_modrinth.sh | 12 ++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 upload_to_modrinth.sh diff --git a/.gitignore b/.gitignore index c476faf..35c5985 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ hs_err_*.log replay_*.log *.hprof *.jfr + +.env + diff --git a/README.md b/README.md index bdc2f89..b6e91ce 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Gloppers (**gl**ob h**oppers**) is a Minecraft mod that lets you filter your hop The idea comes from [LiveOverflow's Minecraft lets play](https://www.youtube.com/playlist?list=PLhixgUqwRTjwvBI-hmbZ2rpkAl4lutnJG), where these were silently implemented on his server to make his storage system easier to build. -![A screenshot of a hopper's inventory, with the name "!*_ore,anvil"](./img/demo.png) +![A screenshot of a hopper's inventory, with the name "!*_ore,anvil"](https://raw.githubusercontent.com/NotNite/gloppers/main/img/demo.png) ## Usage @@ -32,6 +32,6 @@ Note that you must use the internal identifier of the items, and not the item's Gloppers are most useful in storage systems. Instead of requiring redstone circuits that take up space, you can instead just design it like so: -![A 2x4x1 schematic of a storage system, with a top row of hoppers, and a bottom row of one glopper and one chest](./img/storage.png) +![A 2x4x1 schematic of a storage system, with a top row of hoppers, and a bottom row of one glopper and one chest](https://raw.githubusercontent.com/NotNite/gloppers/main/img/storage.png) Items will only be sucked up from the top row to the bottom glopper if the pattern is matched. diff --git a/build.gradle b/build.gradle index 2184f95..6d1f37a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id "fabric-loom" version "1.2-SNAPSHOT" id "org.jetbrains.kotlin.jvm" version "1.8.22" + id "com.modrinth.minotaur" version "2.+" } version = project.mod_version @@ -56,3 +57,17 @@ jar { rename { "${it}_${project.archivesBaseName}" } } } + +modrinth { + syncBodyFrom = rootProject.file("README.md").text + token = System.getenv("MODRINTH_TOKEN") + projectId = "gloppers" + versionType = "release" + uploadFile = remapJar + gameVersions = ["1.20", "1.20.1"] + loaders = ["fabric", "quilt"] + dependencies { + required.project "fabric-api" + required.project "fabric-language-kotlin" + } +} diff --git a/upload_to_modrinth.sh b/upload_to_modrinth.sh new file mode 100644 index 0000000..d3cc1e9 --- /dev/null +++ b/upload_to_modrinth.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -a +source .env +set +a + +if [ -z MODRINTH_TOKEN ]; then + echo "No MODRINTH_TOKEN set in .env" + exit 1 +fi + +./gradlew modrinth -- cgit