From cc655f13a35fde20cef1f7d98e3624fab4ec5d7d Mon Sep 17 00:00:00 2001 From: Paul Schifferer Date: Sun, 21 Jan 2024 12:25:38 -0800 Subject: [PATCH] More files --- .github/.DS_Store | Bin 0 -> 6148 bytes .github/CONTRIBUTING.md | 76 +++++++++++ .github/FUNDING.yml | 4 + .github/ISSUE_TEMPLATE/bug_report.md | 40 ++++++ .github/ISSUE_TEMPLATE/feature-request.md | 21 +++ .github/workflows/ci-build.yml | 66 +++++++++ .github/workflows/codeql-analysis.yml | 70 ++++++++++ .github/workflows/debug.yml | 66 +++++++++ .github/workflows/pr-build-release.yml | 35 +++++ .github/workflows/pr-build.yml | 37 +++++ .github/workflows/release.yml | 67 +++++++++ .release-info/1.20/VERSION | 0 CHANGELOG/.DS_Store | Bin 0 -> 10244 bytes CHANGELOG/1.20/current.md | 0 CODE_OF_CONDUCT.md | 128 ++++++++++++++++++ LICENSE.txt | 16 +++ SECURITY.md | 11 ++ settings.gradle | 6 + src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/sweetrpg/.DS_Store | Bin 0 -> 6148 bytes .../java/com/sweetrpg/minecraft/.DS_Store | Bin 0 -> 8196 bytes .../sweetrpg/minecraft/gamemaster/.DS_Store | Bin 0 -> 6148 bytes .../minecraft/gamemaster/common/.DS_Store | Bin 0 -> 6148 bytes .../gamemaster/common/config/.DS_Store | Bin 0 -> 6148 bytes .../common/config/ConfigHandler.java | 72 ++++++++++ .../gamemaster/common/items/ScepterItem.java | 24 ++++ .../gamemaster/common/lib/Constants.java | 6 + .../resources/META-INF/accesstransformer.cfg | 13 ++ 31 files changed, 758 insertions(+) create mode 100644 .github/.DS_Store create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/workflows/ci-build.yml create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/debug.yml create mode 100644 .github/workflows/pr-build-release.yml create mode 100644 .github/workflows/pr-build.yml create mode 100644 .github/workflows/release.yml create mode 100644 .release-info/1.20/VERSION create mode 100644 CHANGELOG/.DS_Store create mode 100644 CHANGELOG/1.20/current.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 LICENSE.txt create mode 100644 SECURITY.md create mode 100644 settings.gradle create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/.DS_Store create mode 100644 src/main/java/com/.DS_Store create mode 100644 src/main/java/com/sweetrpg/.DS_Store create mode 100644 src/main/java/com/sweetrpg/minecraft/.DS_Store create mode 100644 src/main/java/com/sweetrpg/minecraft/gamemaster/.DS_Store create mode 100644 src/main/java/com/sweetrpg/minecraft/gamemaster/common/.DS_Store create mode 100644 src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/.DS_Store create mode 100644 src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/ConfigHandler.java create mode 100644 src/main/java/com/sweetrpg/minecraft/gamemaster/common/items/ScepterItem.java create mode 100644 src/main/java/com/sweetrpg/minecraft/gamemaster/common/lib/Constants.java create mode 100644 src/main/resources/META-INF/accesstransformer.cfg diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..dc21fddf46e91aaa04dedb37343e085c227750d9 GIT binary patch literal 6148 zcmeHK%}N6?5T3Nv?NWpu6vR`&Yr(B;@!(~t^#xqfgG%kvs!P|6bX)gO3i|;1LOzJk z<4lr@rS;%N#LmFvOXg=ozATvp07QGzuLD#8po~gbaIsk-JzU*K66viqDbY-EMVn zI&FAft0tRXYgUuf`eCb4lSj?QZ044C_79HFy2JP}Q7?v2f&ZSCEsJw_#m?hj=b7^iMrME+UHuasE-b8==wo*BPmXBPH_BJ}KNmpUATZ;)GN zfEie1plF6ws{g0ozyBALc*G1a1OJKvQR)PpHZIB5)}_T!t(B;^s3a7Z8~jYcjxNO* fOQm=hRSViBbr5}vxk0p`@I^q=zzs9-s| + +## Environment And Mod Information: + +* Minecraft Version: [i.e. 1.18.1] +* Forge Version: [i.e. 14.21.1.2443] +* Cat Herder Version: [i.e. 1.14.1.240] +* Java Version: [i.e. 8 Update 144 64 bit] +* Operating System (OS): [i.e. Windows 10 64-bit Build 17134] + +## Logs + + +## Issue Description: + + + +## Steps to reproduce: + +1. +2. +3. +4. + +## Additional Information: + +- More Details: +- Screenshots: diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..4eb33f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,21 @@ +--- +name: Feature Request +about: Suggest an idea for this project + +--- + + + +## Feature Description: + + +## Relation to any Known/Unknown Bug: + + +## Additional Information: diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..133e14d --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,66 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: CI + +on: + push: + branches: [ "1.16", "1.18", "1.19", "1.20" ] + paths: + - 'src/**' + - 'test/**' + - build.gradle + - gradle.properties + - settings.gradle + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + - id: get_last_version + name: Get last version + run: | + echo "latest_version=$(cat .release-info/${{ github.ref_name }}/VERSION)" >> $GITHUB_ENV + - id: bump_version + name: Bump version + uses: cbrgm/semver-bump-action@main + with: + current-version: ${{ env.latest_version }} + bump-level: patch + - name: Build with Gradle + uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + with: + arguments: build test --scan + env: + CATHERDER_VERSION: "${{ steps.bump_version.outputs.new_version }}" + - name: Commit version file + run: | + git config --global user.email "ci@sweetrpg.com" + git config --global user.name "SweetRPG CI" + echo "${{ steps.bump_version.outputs.new_version }}" > .release-info/${{ github.ref_name }}/VERSION + git add .release-info/${{ github.ref_name }}/VERSION + git commit -m "Update ${{ github.ref_name }} VERSION file" + git push origin + - name: Release artifacts + uses: softprops/action-gh-release@v1 + with: + tag_name: "${{ github.ref_name }}-${{ steps.bump_version.outputs.new_version }}" + prerelease: true + files: | + build/libs/*.jar diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..f31703c --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ 1.16, 1.18, 1.19, 1.20 ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ 1.16, 1.18, 1.19, 1.20 ] + schedule: + - cron: '17 11 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml new file mode 100644 index 0000000..bba8132 --- /dev/null +++ b/.github/workflows/debug.yml @@ -0,0 +1,66 @@ +name: Debug + +on: + create: + tags: + - '*' + release: + types: + - published + - created + push: + branches: + - '*' + +jobs: + debug: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump job context + env: + JOB_CONTEXT: ${{ toJson(job) }} + run: echo "$JOB_CONTEXT" + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" + - name: Dump runner context + env: + RUNNER_CONTEXT: ${{ toJson(runner) }} + run: echo "$RUNNER_CONTEXT" + - name: Dump strategy context + env: + STRATEGY_CONTEXT: ${{ toJson(strategy) }} + run: echo "$STRATEGY_CONTEXT" + - name: Dump matrix context + env: + MATRIX_CONTEXT: ${{ toJson(matrix) }} + run: echo "$MATRIX_CONTEXT" + - name: 'Get Previous tag' + id: previoustag + uses: actions-ecosystem/action-get-latest-tag@v1 + with: + semver_only: true + initial_version: v0.0.0 + with_initial_version: true + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: | + registry.sweetrpg.com/sweetrpg-main-web + tags: | + type=raw,value=latest + type=raw,value=${{ steps.previoustag.outputs.tag }} + type=ref,event=branch + type=ref,event=tag + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha diff --git a/.github/workflows/pr-build-release.yml b/.github/workflows/pr-build-release.yml new file mode 100644 index 0000000..f8504e2 --- /dev/null +++ b/.github/workflows/pr-build-release.yml @@ -0,0 +1,35 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: PR (Release) + +on: + pull_request: + branches: [ "1.16-release", "1.18-release", "1.19-release", "1.20-release" ] + paths: + - 'src/**' + - 'test/**' + - build.gradle + - gradle.properties + - settings.gradle + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + with: + arguments: build test --console=verbose --scan diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml new file mode 100644 index 0000000..13fc936 --- /dev/null +++ b/.github/workflows/pr-build.yml @@ -0,0 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: PR + +on: + pull_request: + branches: [ "1.16", "1.18", "1.19", "1.20" ] + paths: + - 'src/**' + - 'test/**' + - build.gradle + - gradle.properties + - settings.gradle + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + with: + arguments: build test --console=verbose --scan diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..da08612 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,67 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Release + +on: + push: + branches: [ "1.16-release", "1.18-release", "1.19-release", "1.20-release" ] + paths: + - 'src/**' + - 'test/**' + - build.gradle + - gradle.properties + - settings.gradle + +jobs: + release: + + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + env: + CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} + MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }} + with: + arguments: curseforge modrinth --console=verbose + - name: Commit hash file and reset changelog + run: | + git config --global user.email "ci@sweetrpg.com" + git config --global user.name "SweetRPG CI" + + branch_version=$(cat ${{ github.ref_name }} | cut -f1 -d-) + + echo "${{ github.sha }}" > .release-info/${branch_version}/RELEASE_HASH + git add .release-info/${branch_version}/RELEASE_HASH + git commit -m "Update ${branch_version} RELEASE_HASH" + version=$(cat .release-info/${branch_version}/VERSION) + git tag "release-${version}" + + echo "# $version" > CHANGELOG/${branch_version}/${version}.md + echo "" >> CHANGELOG/${branch_version}/${version}.md + cat CHANGELOG/${branch_version}/current.md >> CHANGELOG/${branch_version}/${version}.md + cat /dev/null > CHANGELOG/${branch_version}/current.md + git add CHANGELOG/${branch_version} + git commit -m "Reset ${branch_version} changelog" + + git push origin --tags + + git checkout ${branch_version} + git merge ${{ github.ref_name }} + git push origin diff --git a/.release-info/1.20/VERSION b/.release-info/1.20/VERSION new file mode 100644 index 0000000..e69de29 diff --git a/CHANGELOG/.DS_Store b/CHANGELOG/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..488095fe918d5883bf939ae157603c02db8683ae GIT binary patch literal 10244 zcmeHMU2GIp6uxI#=**PTTWIOe2w7r2@kJlhC{HAK?%dgS+b&H^(DY$$ zGWX0m=bn4-eDj^TxpxR5(4AF7gaim7B3?|=MOc+6%+Ib_MerGGz(>GGz(-)dAb@K&D`F*=e(fXRBj6)2i2(aP1n^=q;>igv-A@Nr?iK)L zIhx&q_mthB40tl)$q6peg9UgfN*)T{76W)V+5=v@h$knwD3cPGk-;t>3bY zWZ^!M+^=inaa!ABnNC7CwTv5}s~R>rG^m@ZHQsGyP1SZ|W85K0q75#+9V2)!e(Vg75S$?d%@Y zOg5{F+}Er0DZ}A^l1rR?1-=!t*ro0?!n@RU-}4O4<=teG?^|BT zo~eA|`89x?*G`CxxU|A+eg8@kIZqdO>Z;YK?xYL3+SD2pF~6wbs&Z3XNWv_lWuDr) z5mn%dys1;de4^#~#`=b3TjWP%N?4vtUQazy?CByE|2z^98l)uEd(_!~D9|0c$9|0c$9|0eMdw@V0?<2s@|9kKL|NkD0sKdk5$9X#f8Y!DibA literal 0 HcmV?d00001 diff --git a/CHANGELOG/1.20/current.md b/CHANGELOG/1.20/current.md new file mode 100644 index 0000000..e69de29 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9e8d0df --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +admin@sweetrpg.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..5e4c9a3 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,16 @@ +The MIT License (MIT) + +Copyright © 2022 SweetRPG + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the “Software”), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..a87134f --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| < 1.x | :white_check_mark: | + +## Reporting a Vulnerability + +Please open an issue [here](https://github.com/sweetrpg/CatHerder/issues). diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..aa4aa22 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,6 @@ +pluginManagement { + repositories { + maven { url = 'https://maven.minecraftforge.net/' } + gradlePluginPortal() + } +} diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7b0d36729e2ee777a660f9e8c6709dd97bc2fb68 GIT binary patch literal 6148 zcmeH~F>V4u3`M`g7D#EfOgRk)$PGpaPQV2S&>%r5BKkQx-ySzvsH0W%E!l7ES!;KH zv9ktX>-*^w7y&HlPOLmk%$N_j;tOYdpMH*)!|itQBJHgMp3+B5_H$d10#ZNMM4T9irw zDe%t}uwk>?toc%Twm!X{*Y{cVb)%DUIm54?049DEf6&9YUwlEZ41Ihw+$ZCa@h6X)Lo@aaP z8SN|9V*s`}A0B}EG1^C)retP&UmZ5UN|LYIV^7GId!wugko_!<1Nx*JyEL| z5Cd}tZqr?R|9_(XGXKwu@UIxKVf(z@@RO>yEH1@V-^m;4I%_5-~tF3K^+i#j?VMXLSaS~dY0@jc51bKLsN^0 z?w;4J$RHv;+$b9h6I0}!Tx68{^>MkK$MI$*w?)zl@IfZ~xlK?3DnJFO02QDDGg2TA z@_sd=XX2w!0V*&L1?>A!;KrJ4LH~3h_y_tMAK>5S|49o|DnJGPOaWc) zkNX{7D$mxB*R%R5tF~@%&@V@L`w2i|NAVi&hW%m-uqIm&6&Qa6Tm}Xz@KXg|*oF~o literal 0 HcmV?d00001 diff --git a/src/main/java/com/.DS_Store b/src/main/java/com/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5a23cbb3814407d4bf04a49c1218eb36e7eac35c GIT binary patch literal 6148 zcmeHKyG{c!5S)b+C()!#>0ihnSW)-_ejrMMXd(p>5bafb7oW!LqaZryk|vrxt;b&P z_;gcvZvoiqW4{FE00z1vzI>RP@4HXzt|CUH^Ne@A;T13Y)9x_I{yX5@0VjOona?l& z_INz_rc4S*0VyB_q<|E-r~*}9hlh)vs>7s!6u1Qi{C;S3$6h!l#?`?gS^(mV;V{ml zmmoF|5PRX6$Oz4nN=&L%i(yG;yj5N=921ictLDS%%~l-rbMO=F1m|x%zqN;pBe*kC!AuYR7d7SsgZ!>m`)M|^=69*Ve&LoZ} zQRc8-1F+@$_8M3KnA08c>BH1~-+f|d8F92YV}l*;@QAnV>m>Vlz_}NA!83Y1V2{7) z?uVh{vB$PQ*1NtN`X}yshD-`b0VyB_q<|DSS%EB_^UISNN|XXp;J+x~--kkXtchd8 z_;hfH7JxWoIE?e?C5XiX#F{uZWQ1moN^Dfi7Q-5y@sfEpactP=u(+A$@zh8m@S6gX7iye$`A|8M9&^#6w>t)zey_)`klY_(o3`J}9^lgD|jE%aOZw=p-; mIYcQYMk(gPOYzlSUhz5iYvR~2=!^%Qs2>5>MJ5G)LxC?&2OH@C literal 0 HcmV?d00001 diff --git a/src/main/java/com/sweetrpg/minecraft/.DS_Store b/src/main/java/com/sweetrpg/minecraft/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ada8c70d7ad00b348ef1b741091a95349210ddf5 GIT binary patch literal 8196 zcmeHMTWl0n7(U;$r89J((@JHb;4Y~bF0Hf+6;P1vw%nxHLR(r2vfbSo%Y@mPvNO9y zDq3&xLD44--X2W6B*u7&0!Dl?(Fd=IG#ZE|n)swa6JI3JME^5q7AtKZjENyQCz8fiMDL1i}b}5x5*8KxZ~@@(ky`kcNF2fiMF9%LwrOAx0OciGYp^>Tey?`6U3+ za$@_9##9IRHnD&v0y-|JZ%S*5>H&c%f)WG5oa8aCPBanFaY2PSgD__Z?u?*9fq!?h zi}~sd2|>d?j6fKHsS)6{`)oE$b$gDg_DS`7X4D3Yr0UqUJ?ub5R? zsZ>@~-qCZw8SU}XUcpVK^LzQM*Kw>&X`IgNHjUAgHm}{Wy|if?dEda)4N}?HZ`!&u znsf@b?)tVpLZB$JlG5tO#^UjH@y6Jy)$yZ^v9Xrc*0qhXmgd%$qem6Fu3_aZyHW?O zob4PF9wFEj*qlo|d~7E7bT?~d=yAE>wEkOev0eCI7AyIGF7RJgW>=|mB7M92`UljM zR$C-TyGA_IvEAK9-X)sSs$B}mwya}!=M66J&pK8iXS*q_CY!dh1uN|tZI;zz9x;el z?Pl|iWpz8Q$(PwP;2DQKE}J467<8Sy*X}PiVAA?RODnj>E`t^|i$(`6?P^e7n>&Be zlIxbQT)pnr_AQ;=6V+Nx?Nw@>I!K|mJ@Zb}$nQzJS;N*%d$@1Z)V%}!MbkAimeFgc zbB0n=_JT4|tJPFTA`9zfS!)<5WXwYa)4R*(s*z|+k+l>1bh_aVN9QZ*fqwK_S>DU} z?RkTG!B!(nmytob*Co%y5^B?pilVu_2MG_tRE@8a6;1E6(iy`FSZmf2YkPlD1UF!= z-ykbBXdK8oxg7c93U;I|Nl$umKfiZp+V#3d4EwLA+APa^xTHXXa$Jz7jZFZ8KVjr^4**W$-`+@z!eq|TfZ|rweU=}K& zpceI5gvE%W5v{lhYtW8P?7;2lMj!Sgg&|}xj1e3{9v+V10X&F@@Gu_7aXf{m@f=>l z>v#ii;w`+7kMRjU#aH+iKjJ)o!q2!M&6cVpRjQMgO3S3>(h6y{v_VQr+r^_xr6d~^ z^HMK$(rBg}3ic4`iRp7Fx@GH@ZMR*l(=SeGZb_7b%rs#Q>qi0Sp}(x^6z@sNtMNLt$MSnl~eL56ZH!gMpSiULg6W|F<&zo?TBhT zmHsWLKVoOtS@s<}PoVw-JqHh9`YUKZ9rSB7yp4yn&fx1yfXjh8so@)% zObgs%Pu{j1dzj=U&`+|vQif&1kqEEjwA_Y+Ut0& z9iwZAF5bA_xS+lXbzFt>{c@b>#Xk&b91CQLfQ}1F5^DeXhXDGu_78qThv$EI{`)w+ H(z-tZRmE{l literal 0 HcmV?d00001 diff --git a/src/main/java/com/sweetrpg/minecraft/gamemaster/.DS_Store b/src/main/java/com/sweetrpg/minecraft/gamemaster/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c366b0045fbb72cefe303fe2f300e646390a531d GIT binary patch literal 6148 zcmeHKOG?B*5UtWM1l$a`aoJax8^j@k`&__D0^=e{594Q@OLz^poSGJVjv7s%m1tnCjQA-nV^+ori3J2{313h#vCuZ5R3vrPLK#@HvLk+ojTwo5;43(O zs7Z*6m=J<{tLx+1$MMNY9oIx8I=69)s7XXVQlYnr!V#)pWi3{0%QjHxYm8_(?@q_5 z91m-3ZeR!4f#2qUTDxmBAW37or0V*`nx+kk(V9_${uyfErNdTtAhSv7RvfHMMo~YN zeX#ueaqr~(^||f7UMAyjGACEHnSHJ72Fg?>G;^q{amv~r-i}YLHV3az_7%^etDzMo zaL%Qu)LYi_bhdwBwNw~|3OBG%6Tt7?5C{4IlAvIFb@ zJFsv-y&nRk!q8%FP`^4*=pz8oL$eOl)mcJ~2`q*dbA#wX2s0FDh6;Pc5N0^q1Ir67 z<_67h687*R?99TRP=uZx*AFzEL}-vpc7PqIIYqoFR*dikegyW2p9EXqn`F$MEP4@Qz>0 z&$kU46`%rCfC^9nDloeOSz_1Ev!BcZsQ?xD>k8QSp}-Am;uPqg4h-G`0G9~6VeY*I zuvh?C6Q@8#U>a0lP&Hc&4Laf_^J?N07`>Hi$N9z6MQb2ODnJDu6?lr} z#_Ino{D=Pkk;D}hpaTC&0bTZQeTOGyZEYTBwYI=_aLc*D%`kTg1~11zFUMF|Io^6w biGvE;K6e+X{REt!@>6 literal 0 HcmV?d00001 diff --git a/src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/ConfigHandler.java b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/ConfigHandler.java new file mode 100644 index 0000000..6b946a8 --- /dev/null +++ b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/ConfigHandler.java @@ -0,0 +1,72 @@ +package com.sweetrpg.minecraft.gamemaster.common.config; + +import com.sweetrpg.catherder.CatHerder; +import com.sweetrpg.catherder.api.CatHerderAPI; +import com.sweetrpg.catherder.api.registry.Talent; +import com.sweetrpg.catherder.common.lib.Constants; +import com.sweetrpg.minecraft.gamemaster.GameMaster; +import net.minecraftforge.common.ForgeConfigSpec; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.config.ModConfig; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.HashMap; +import java.util.Map; + +public class ConfigHandler { + + public static ClientConfig CLIENT; + public static ServerConfig SERVER; + private static ForgeConfigSpec CONFIG_SERVER_SPEC; + private static ForgeConfigSpec CONFIG_CLIENT_SPEC; + + public static void init(IEventBus modEventBus) { + Pair commonPair = new ForgeConfigSpec.Builder().configure(ServerConfig::new); + CONFIG_SERVER_SPEC = commonPair.getRight(); + SERVER = commonPair.getLeft(); + Pair clientPair = new ForgeConfigSpec.Builder().configure(ClientConfig::new); + CONFIG_CLIENT_SPEC = clientPair.getRight(); + CLIENT = clientPair.getLeft(); + GameMaster.LOGGER.debug("Register configs"); + + ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, CONFIG_SERVER_SPEC); + ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CONFIG_CLIENT_SPEC); + } + + public static class ClientConfig { + + + public ClientConfig(ForgeConfigSpec.Builder builder) { + { + builder.push("General"); + +// SKITTISH_OWNER = builder.comment("Sets the likelihood (in percent) that a skittish cat will avoid its owner.").translation("catherder.config.client.skittish_owner").defineInRange("skittish_owner", 25, 1, 100); +// SKITTISH_ANIMALS = builder.comment("Sets the likelihood (in percent) that a skittish cat will avoid other animals.").translation("catherder.config.client.skittish_animals").defineInRange("skittish_animals", 40, 1, 100); +// SKITTISH_OTHERS = builder.comment("Sets the likelihood (in percent) that a skittish cat will avoid any other creature.").translation("catherder.config.client.skittish_others").defineInRange("skittish_others", 75, 1, 100); +// SKITTISH_TWITCHINESS = builder.comment("Sets how sensitive the check for fleeing from an entity is.").translation("catherder.config.client.skittish_twitchiness").defineInRange("skittish_twitchiness", 750, 1, 1000); + + builder.pop(); + } + } + } + + public static class ServerConfig { + + public ServerConfig(ForgeConfigSpec.Builder builder) { + { + builder.push("General"); + + //DEBUG_MODE = builder + // .comment("Enables debugging mode, which would output values for the sake of finding issues in the mod.") + // .define("debugMode", false); +// CHANCE_WILD_CATNIP = builder.comment("Chance that catnip appears in the wild").translation(Constants.TRANSLATION_KEY_CONFIG_CHANCE_WILD_CATNIP).defineInRange("chance_wild_catnip", 50, 1, 100); +// WILD_CATNIP_SPREAD = builder.comment("Horizontal spread of patches of catnip").translation(Constants.TRANSLATION_KEY_CONFIG_WILD_CATNIP_SPREAD).defineInRange("wild_catnip_spread", 6, 1, 20); + + builder.pop(); + } + + } + } + +} diff --git a/src/main/java/com/sweetrpg/minecraft/gamemaster/common/items/ScepterItem.java b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/items/ScepterItem.java new file mode 100644 index 0000000..f573f02 --- /dev/null +++ b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/items/ScepterItem.java @@ -0,0 +1,24 @@ +package com.sweetrpg.minecraft.gamemaster.common.items; + +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +public class ScepterItem extends Item { + + public ScepterItem(Properties props) { + super(props); + } + + @Override + public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { + if(!level.isClientSide) { + + } + + return super.use(level, player, hand); + } +} diff --git a/src/main/java/com/sweetrpg/minecraft/gamemaster/common/lib/Constants.java b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/lib/Constants.java new file mode 100644 index 0000000..6dea7bc --- /dev/null +++ b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/lib/Constants.java @@ -0,0 +1,6 @@ +package com.sweetrpg.minecraft.gamemaster.common.lib; + +public class Constants { + + public static final String MOD_ID = "gamemaster"; +} diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg new file mode 100644 index 0000000..f1c5abd --- /dev/null +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1,13 @@ +public net.minecraft.world.entity.LivingEntity m_21275_(Lnet/minecraft/world/damagesource/DamageSource;)Z # canBlockDamageSource +public-f net.minecraft.world.entity.Entity func_70045_F()Z # isImmuneToFire +public net.minecraft.network.syncher.SynchedEntityData m_135379_(Lnet/minecraft/network/syncher/EntityDataAccessor;)Lnet/minecraft/network/syncher/SynchedEntityData$DataItem; # getEntry +public net.minecraft.network.syncher.SynchedEntityData f_135348_ # dirty +public net.minecraft.world.entity.TamableAnimal m_21834_(Z)V # playTameEffect +public net.minecraft.client.renderer.entity.layers.RenderLayer m_117376_(Lnet/minecraft/client/model/EntityModel;Lnet/minecraft/resources/ResourceLocation;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;ILnet/minecraft/world/entity/LivingEntity;FFF)V # renderCutoutModel +public net.minecraft.client.resources.SkinManager f_118808_ # skinCacheDir +public net.minecraft.server.MinecraftServer field_71308_o # anvilFile +public net.minecraft.world.entity.Entity m_20305_()Z # isInBubbleColumn +public net.minecraft.world.inventory.AbstractContainerMenu f_38841_ # inventoryItemStacks +public net.minecraft.world.inventory.AbstractContainerMenu f_38848_ # listeners +public net.minecraft.client.gui.screens.Screen f_96545_ # buttons +public net.minecraft.world.entity.projectile.ThrowableProjectile field_200218_h # ownerId