diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 0000000..dc21fdd Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..9959763 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,76 @@ + + +# Reporting Bugs +Reporting issues are imperative in order to continue making the mod as great as it can be! + +## Guidelines +The following below are the guidelines for reporting bugs on the Cat Talents community. Failing do follow these guidelines will result in issues being **automatically closed and labeled as invalid or need more information**. +- All issues must be written in English. +- There is *zero tolerance* for disrespect/inappropriate content on the community. +- All issues **MUST** use the issue template and must leave the examples that are placed in `[ ]`. +- All issues must be **clear and concise**. +- Do not report bugs that are already *fixed* or *known*. +- No one issue can include more than one subject (bug, request or both) or multiple issues. +- Issues cannot pertain to versions **below Minecraft version 1.7.10**. +- Bugs must be able to be reproduced with **ONLY** Cat Talents (as well as any other affected mods if there is a compatibility problem). +- At the time of the reporting, Cat Talents and/or any other affected mods **MUST** be up to date, *Do not use "newest version" or "using latest version" when description the issue*. +- All game logs must be placed in paste websites like [Gist](hastebin.com), [Pastebin](hastebin.com), or [Hastebin](hastebin.com), **NOT** directly in the issue. +- Issues related to packs must be reported to the modpack author(s) **FIRST** before reported here. +- If necessary, please include relevant logs and screenshots. + +## Processing +The following with happen to this type of issues: +- Automatically be labeled as "Bug" and moved under the [Known Issues Project](https://github.com/Sweetrpg/CatHerder/projects/1) for easier access and better organization. +- It may take a few hours or so for the authors to respond, so be patient. + + +# Requesting Features: +Features are what makes the Cat Talents mod great! And adding new ones helps improve the quality of the mod, as well as encourage the developers working on it! + +## Guidelines +The following below are the guidelines for requesting features on the Cat Talents community. Failing do follow these guidelines will result in issues being **automatically closed and labeled as invalid or need more information**. +- All requests must be written in English. +- There is *zero tolerance* for disrespect/inappropriate content on the community. +- All requests **MUST** use the issue template and must leave the examples that are placed in `[ ]`. +- All requests must be **clear and concise**. +- Do not report features that are already *already implemented* or *known*. +- No one requests can include more than one subject (bug, request or both) or multiple requests. +- Requests cannot pertain to versions **below Minecraft version 1.7.10**. +- If any requests is related to a *bug*, please create a bug report and refer that issue within the request. + + +## Processing +The following with happen to this type of issues: +- Automatically be labeled as "Feature Request" and moved under the [Suggestions Project](https://github.com/Sweetrpg/CatHerder/projects/2) for easier access and better organization. +- It may take a few hours or so for the authors to respond, so be patient. + + +# Contributing to the Source code +While help is appreciated, source code submissions will be checked and decided on. When doing submissions, please use forks and create pull requests. + +## Guidelines +The following below are the guidelines for contributing to the mod's source code on the Cat Talents community. Failing do follow these guidelines will result in issues being **automatically closed and labeled as invalid or need more information**. +- **DO NOT** include malicious code or inappropriate content. +- Include comments (using `//` or `/* */)` in your code. +- Please leave a note that the code is a work in process (WIP) and bugs may occur. +- Please use forks and pull requests. + +## Processing +The following with happen to this type of issues: +- Automatically be labeled as "Enhancement" and moved under the [Suggestions Project](https://github.com/Sweetrpg/CatHerder/projects/2) for easier access and better organization. +- It may take a few hours or so for the authors to respond, so be patient + +# Contributing to the Locales +Please check to see if the lang files have been changed over time. When doing locale submissions, please use forks and create pull requests. + +## Guidelines +The following below are the guidelines for contributing to the mod's language packs on the Cat Talents community. Failing do follow these guidelines will result in issues being **automatically closed and labeled as invalid or need more information**. +- **DO NOT** add inappropriate language. +- Please ensure that all language changes are accurate. +- Please leave a note that the pack is a work in process (WIP) and that not all translations are finished. +- Please use forks and pull requests. + +## Processing +The following with happen to this type of issues: +- Automatically be labeled as "Enhancement" and moved under the [Suggestions Project](https://github.com/Sweetrpg/CatHerder/projects/2) for easier access and better organization. +- It may take a few hours or so for the authors to respond, so be patient. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..db24727 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: paulyhedral sweetrpg # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: pilgrimage # Replace with a single Patreon username diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..a100123 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,40 @@ +--- +name: Bug Report +about: Create a report to help us improve + +--- + + + +## 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 0000000..488095f Binary files /dev/null and b/CHANGELOG/.DS_Store differ 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 0000000..7b0d367 Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/main/.DS_Store b/src/main/.DS_Store new file mode 100644 index 0000000..5ddc54c Binary files /dev/null and b/src/main/.DS_Store differ diff --git a/src/main/java/.DS_Store b/src/main/java/.DS_Store new file mode 100644 index 0000000..35a54bf Binary files /dev/null and b/src/main/java/.DS_Store differ diff --git a/src/main/java/com/.DS_Store b/src/main/java/com/.DS_Store new file mode 100644 index 0000000..5a23cbb Binary files /dev/null and b/src/main/java/com/.DS_Store differ diff --git a/src/main/java/com/sweetrpg/.DS_Store b/src/main/java/com/sweetrpg/.DS_Store new file mode 100644 index 0000000..0a71e9f Binary files /dev/null and b/src/main/java/com/sweetrpg/.DS_Store differ 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 0000000..ada8c70 Binary files /dev/null and b/src/main/java/com/sweetrpg/minecraft/.DS_Store differ 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 0000000..c366b00 Binary files /dev/null and b/src/main/java/com/sweetrpg/minecraft/gamemaster/.DS_Store differ diff --git a/src/main/java/com/sweetrpg/minecraft/gamemaster/common/.DS_Store b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/.DS_Store new file mode 100644 index 0000000..def320a Binary files /dev/null and b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/.DS_Store differ diff --git a/src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/.DS_Store b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/.DS_Store new file mode 100644 index 0000000..db68ea8 Binary files /dev/null and b/src/main/java/com/sweetrpg/minecraft/gamemaster/common/config/.DS_Store differ 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