aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitHub Action <action@github.com>2023-07-21 10:15:53 +0000
committerGitHub Action <action@github.com>2023-07-21 10:15:53 +0000
commit4f8ca665888f10504d2995e9bed4b95ea60554c3 (patch)
treec9894a5c302d4b1665f4f6aabfc285b00f90849a
parent2c7e371cb8d566875d767dd20c4a1287d5275b2c (diff)
downloadSkyblockPlayersAnonymous-4f8ca665888f10504d2995e9bed4b95ea60554c3.tar.gz
SkyblockPlayersAnonymous-4f8ca665888f10504d2995e9bed4b95ea60554c3.tar.bz2
SkyblockPlayersAnonymous-4f8ca665888f10504d2995e9bed4b95ea60554c3.zip
Initialize template repository proper
Set package name to com.github.romangraef.skyblockplayersanonymous Set project name to SkyblockPlayersAnonymous Set modid to skyblockplayersanonymous
-rw-r--r--.github/workflows/init.yml38
-rw-r--r--gradle.properties4
-rwxr-xr-xmake-my-own.sh36
-rw-r--r--settings.gradle.kts2
-rw-r--r--src/main/java/com/github/romangraef/skyblockplayersanonymous/ExampleMod.java (renamed from src/main/java/com/example/ExampleMod.java)4
-rw-r--r--src/main/java/com/github/romangraef/skyblockplayersanonymous/mixin/MixinGuiMainMenu.java (renamed from src/main/java/com/example/mixin/MixinGuiMainMenu.java)2
-rw-r--r--src/main/resources/mixins.skyblockplayersanonymous.json (renamed from src/main/resources/mixins.examplemod.json)0
7 files changed, 6 insertions, 80 deletions
diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml
deleted file mode 100644
index c18810f..0000000
--- a/.github/workflows/init.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Initialize Template Repo
-on:
- - push
-
-permissions:
- contents: write
-
-jobs:
- cleanup:
- name: "Initialize Repo"
- runs-on: ubuntu-latest
- if: github.event.repository.name != 'Forge1.8.9Template'
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- - name: Initialize Repo
- run: |
- git config --local user.email "action@github.com"
- git config --local user.name "GitHub Action"
- owner=$(echo $GITHUB_REPOSITORY | cut -d/ -f1 | tr '[:upper:]' '[:lower:]')
- name=$(echo $GITHUB_REPOSITORY | cut -d/ -f2 | tr '[:upper:]' '[:lower:]' | tr -d "-" | tr -d ".")
- pack_name="com.github.${owner,,}.${name,,}"
- proj_name="$(echo $GITHUB_REPOSITORY | cut -d/ -f2)"
- modid="$(echo $name | sed 's/[^a-z]//g')"
- ./make-my-own.sh "$pack_name" "$proj_name" "$modid"
- git add .
- git commit -F- <<EOF
- Initialize template repository proper
-
- Set package name to $pack_name
- Set project name to $proj_name
- Set modid to $modid
- EOF
- - name: Push changes
- uses: ad-m/github-push-action@v0.6.0
- with:
- branch: ${{ github.ref }}
- github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/gradle.properties b/gradle.properties
index d831732..f06856b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,6 +1,6 @@
loom.platform=forge
org.gradle.jvmargs=-Xmx2g
-baseGroup = com.example
+baseGroup = com.github.romangraef.skyblockplayersanonymous
mcVersion = 1.8.9
-modid = examplemod
+modid = skyblockplayersanonymous
version = 1.0.0
diff --git a/make-my-own.sh b/make-my-own.sh
deleted file mode 100755
index ff8f1ec..0000000
--- a/make-my-own.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-
-print_help() {
- echo "$0 <new package name> <project name> <modid>"
-}
-
-if [ "$#" -ne "3" ]; then
- print_help
- exit 0
-fi
-
-base=$(dirname "$(readlink -f "$0")")
-echo "Updating $base"
-package_name="$1"
-project_name="$2"
-modid="$3"
-package_dir=$(echo "$package_name" | tr . /)
-echo "Setting package name to $package_name"
-echo "Setting project name to $project_name"
-echo "Setting package dir to $package_dir"
-echo "Setting mod id to $modid"
-(
- set -x
- find "$base"/src/main -type f -exec sed -i s/examplemod/"$modid"/g\;s/com.example/"$package_name"/g {} +
- sed -i s/com.example/"$package_name"/g\;s/examplemod/"$modid"/g "$base"/gradle.properties
- sed -i s/examplemod/"$project_name"/g "$base"/settings.gradle.kts
- mkdir -p "$base"/src/main/java/"$package_dir"
- mkdir -p "$base"/src/main/kotlin/"$package_dir"
- mv "$base"/src/main/java/com/example/* "$base"/src/main/java/"$package_dir"
- mv "$base"/src/main/kotlin/com/example/* "$base"/src/main/kotlin/"$package_dir"
- mv "$base"/src/main/resources/mixins.examplemod.json "$base"/src/main/resources/mixins."$modid".json
- rm "$base"/.github/workflows/init.yml
- rm "$(readlink -f $0)"
-)
-echo "All done"
-echo "Now go commit those changes"
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 05f4f1e..0372e85 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -23,4 +23,4 @@ plugins {
}
-rootProject.name = "examplemod"
+rootProject.name = "SkyblockPlayersAnonymous"
diff --git a/src/main/java/com/example/ExampleMod.java b/src/main/java/com/github/romangraef/skyblockplayersanonymous/ExampleMod.java
index c18b591..7fe7102 100644
--- a/src/main/java/com/example/ExampleMod.java
+++ b/src/main/java/com/github/romangraef/skyblockplayersanonymous/ExampleMod.java
@@ -1,10 +1,10 @@
-package com.example;
+package com.github.romangraef.skyblockplayersanonymous;
import net.minecraft.init.Blocks;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
-@Mod(modid = "examplemod", useMetadata=true)
+@Mod(modid = "skyblockplayersanonymous", useMetadata=true)
public class ExampleMod {
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
diff --git a/src/main/java/com/example/mixin/MixinGuiMainMenu.java b/src/main/java/com/github/romangraef/skyblockplayersanonymous/mixin/MixinGuiMainMenu.java
index 47eee87..c42ad81 100644
--- a/src/main/java/com/example/mixin/MixinGuiMainMenu.java
+++ b/src/main/java/com/github/romangraef/skyblockplayersanonymous/mixin/MixinGuiMainMenu.java
@@ -1,4 +1,4 @@
-package com.example.mixin;
+package com.github.romangraef.skyblockplayersanonymous.mixin;
import net.minecraft.client.gui.GuiMainMenu;
import org.spongepowered.asm.mixin.Mixin;
diff --git a/src/main/resources/mixins.examplemod.json b/src/main/resources/mixins.skyblockplayersanonymous.json
index 570a0d0..570a0d0 100644
--- a/src/main/resources/mixins.examplemod.json
+++ b/src/main/resources/mixins.skyblockplayersanonymous.json