mirror of
https://github.com/Lucaslah/No-Report-Button.git
synced 2026-01-18 11:57:51 +00:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92addc11d6 | |||
| 3c14e20cb5 | |||
|
cab7d75cf7
|
|||
|
868747db89
|
|||
|
46999f305a
|
|||
|
69810428d4
|
|||
|
cdaab07aa5
|
|||
|
fff624aa9d
|
|||
|
d5c07e9c56
|
|||
|
481ecc2368
|
|||
|
893c1a8e8d
|
|||
|
067465d68e
|
|||
| b8ef29614c | |||
| d293d78d0f | |||
| a20014bb5a | |||
| 061c4b1ee0 | |||
| c33b9ffd88 | |||
| af4654a14d | |||
| 165144ea30 | |||
| a82d8bf07c | |||
| ed139af4ba | |||
| aad7b3291a | |||
| a9ca8a8e19 | |||
| 10ab15bd4d | |||
| b2dabd7f93 | |||
| cc47e5ec2f | |||
| 388d8ad362 | |||
| 2388d81343 | |||
| 9896b95828 | |||
| 886b2c37e0 | |||
| 256ed10cfe | |||
| 64397c5497 |
@@ -1,25 +0,0 @@
|
|||||||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/java/.devcontainer/base.Dockerfile
|
|
||||||
|
|
||||||
# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster
|
|
||||||
ARG VARIANT="17-bullseye"
|
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
|
|
||||||
|
|
||||||
# [Option] Install Maven
|
|
||||||
ARG INSTALL_MAVEN="false"
|
|
||||||
ARG MAVEN_VERSION=""
|
|
||||||
# [Option] Install Gradle
|
|
||||||
ARG INSTALL_GRADLE="false"
|
|
||||||
ARG GRADLE_VERSION=""
|
|
||||||
RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
|
|
||||||
&& if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi
|
|
||||||
|
|
||||||
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
|
||||||
ARG NODE_VERSION="none"
|
|
||||||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
|
||||||
|
|
||||||
# [Optional] Uncomment this section to install additional OS packages.
|
|
||||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
|
||||||
|
|
||||||
# [Optional] Uncomment this line to install global node packages.
|
|
||||||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
||||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/java
|
|
||||||
{
|
|
||||||
"name": "Java",
|
|
||||||
"build": {
|
|
||||||
"dockerfile": "Dockerfile",
|
|
||||||
"args": {
|
|
||||||
// Update the VARIANT arg to pick a Java version: 11, 17
|
|
||||||
// Append -bullseye or -buster to pin to an OS version.
|
|
||||||
// Use the -bullseye variants on local arm64/Apple Silicon.
|
|
||||||
"VARIANT": "17-bullseye",
|
|
||||||
// Options
|
|
||||||
"INSTALL_MAVEN": "false",
|
|
||||||
"INSTALL_GRADLE": "true",
|
|
||||||
"NODE_VERSION": "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Configure tool-specific properties.
|
|
||||||
"customizations": {
|
|
||||||
// Configure properties specific to VS Code.
|
|
||||||
"vscode": {
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
|
||||||
"settings": {
|
|
||||||
},
|
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
|
||||||
"extensions": [
|
|
||||||
"vscjava.vscode-java-pack",
|
|
||||||
"vscjava.vscode-gradle"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
||||||
// "forwardPorts": [],
|
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
|
||||||
// "postCreateCommand": "java -version",
|
|
||||||
|
|
||||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
|
||||||
"remoteUser": "vscode",
|
|
||||||
"features": {
|
|
||||||
"git": "os-provided",
|
|
||||||
"github-cli": "latest",
|
|
||||||
"sshd": "latest",
|
|
||||||
"fish": "latest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Executable file
31
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Information (please complete the following information):**
|
||||||
|
- Minecraft Version: [e.g 1.19.3]
|
||||||
|
- No Report Button Version: [e.g 1.3.1]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Executable file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
11
.github/dependabot.yml
vendored
Executable file
11
.github/dependabot.yml
vendored
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "gradle" # See documentation for possible values
|
||||||
|
directory: "/" # Location of package manifests
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
47
.github/workflows/build.yml
vendored
Normal file
47
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||||
|
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./gradlew build
|
||||||
|
|
||||||
|
- name: Set Commit SHA
|
||||||
|
id: commit_short_sha
|
||||||
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Find Build Artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p artifacts
|
||||||
|
|
||||||
|
find . -type d -path '*/build/libs' | while read -r dir; do
|
||||||
|
project_name=$(basename "$(dirname "$(dirname "$dir")")")
|
||||||
|
mkdir -p "artifacts/$project_name"
|
||||||
|
cp -r "$dir"/* "artifacts/$project_name/"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: 'NRB-Build-${{ steps.commit_short_sha.outputs.sha_short }}'
|
||||||
|
path: 'artifacts/'
|
||||||
25
.github/workflows/gradle.yml
vendored
Normal file
25
.github/workflows/gradle.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Gradle
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["develop"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependency-submission:
|
||||||
|
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
|
||||||
|
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
|
||||||
|
- name: Generate and submit dependency graph
|
||||||
|
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|
||||||
2
.gitignore
vendored
Normal file → Executable file
2
.gitignore
vendored
Normal file → Executable file
@@ -31,3 +31,5 @@ bin/
|
|||||||
# fabric
|
# fabric
|
||||||
|
|
||||||
run/
|
run/
|
||||||
|
|
||||||
|
.architectury-transformer/
|
||||||
165
LICENSE
Executable file
165
LICENSE
Executable file
@@ -0,0 +1,165 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
30
README.md
Normal file → Executable file
30
README.md
Normal file → Executable file
@@ -1,11 +1,33 @@
|
|||||||
|
[](https://www.curseforge.com/minecraft/mc-mods/no-report-button)
|
||||||
|
[](https://modrinth.com/mod/nrb)
|
||||||
|

|
||||||
|
|
||||||
# No Report Button
|
# No Report Button
|
||||||
Removes the chat report button from the game menu screen
|
Removes the chat report button from the game menu screen
|
||||||
|
|
||||||
Supports fabric 1.19.3+, forge support is coming soon!\
|
Supports fabric, forge and quilt 1.19.1+\
|
||||||
The fabric api is not required.
|
Should be compatible with any mods, but if you do find a mod that is not please open an issue.
|
||||||
|
|
||||||
For minecraft versions 1.19.2 or older use NRB v1.2.1, the latest version only supports 1.19.3+.
|
**Fabric API not required.**\
|
||||||
|
**Mod is client size only, this mod will not do anything if used on the server.**
|
||||||
|
|
||||||
|
See below for what NRB version to use.
|
||||||
|
|
||||||
|
## Released Versions
|
||||||
|
| Version | MC Version | Mod loaders | Git tag | Supported |
|
||||||
|
|------------|---------------|-------------------------|-------------------------------------------------------------------------------------|-----------|
|
||||||
|
| 1.6.1 | 1.21 | fabric, forge, neoforge | [1.6.1](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.1) | yes |
|
||||||
|
| 1.6.0 | 1.21 | fabric, forge, quilt | [1.6.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.0) | no |
|
||||||
|
| 1.6.0-beta | 1.21 | fabric | [1.6.0-beta](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.0-beta) | no |
|
||||||
|
| 1.5.0 | 1.20.1-1.20.6 | fabric, forge, quilt | [1.5.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.5.0) | yes |
|
||||||
|
| 1.4.1 | 1.19.4 | fabric, forge, quilt | [1.4.1](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.4.1) | no |
|
||||||
|
| 1.4.0 | 1.19.3 | fabric, forge, quilt | [1.4.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.4.0) | no |
|
||||||
|
| 1.3.1 | 1.19.3 | fabric | [1.3.1](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.3.1) | no |
|
||||||
|
| 1.3.0 | 1.19.3 | fabric | [1.3.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.3.0) | no |
|
||||||
|
| 1.2.1 | 1.19.1-1.19.2 | fabric | [1.2.1](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.2.1) | no |
|
||||||
|
| 1.2.0 | 1.19.1-1.19.2 | fabric | [1.2.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.2.0) | no |
|
||||||
|
| 1.1.0 | 1.19.1-1.19.2 | fabric | [1.1.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.1.0) | no |
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
Curseforge: https://www.curseforge.com/minecraft/mc-mods/no-report-button<br>
|
Curseforge: https://www.curseforge.com/minecraft/mc-mods/no-report-button <br>
|
||||||
Modrinth: https://modrinth.com/mod/nrb
|
Modrinth: https://modrinth.com/mod/nrb
|
||||||
|
|||||||
5
SECURITY.md
Executable file
5
SECURITY.md
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Please email nsx1luke@gmail.com
|
||||||
130
build.gradle
Normal file → Executable file
130
build.gradle
Normal file → Executable file
@@ -1,92 +1,72 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.12-SNAPSHOT'
|
id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false
|
||||||
id 'maven-publish'
|
id 'architectury-plugin' version '3.4-SNAPSHOT'
|
||||||
|
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
architectury {
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
minecraft = project.minecraft_version
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
|
||||||
version = project.mod_version
|
|
||||||
group = project.maven_group
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
// Add repositories to retrieve artifacts from in here.
|
|
||||||
// You should only use this when depending on other mods because
|
|
||||||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
|
||||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
|
||||||
// for more information about repositories.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
allprojects {
|
||||||
includeModImplementation
|
group = rootProject.maven_group
|
||||||
includeImplementation
|
version = rootProject.mod_version
|
||||||
|
|
||||||
include.extendsFrom includeImplementation
|
|
||||||
include.extendsFrom includeModImplementation
|
|
||||||
|
|
||||||
implementation.extendsFrom includeImplementation
|
|
||||||
modImplementation.extendsFrom includeModImplementation
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
subprojects {
|
||||||
// To change the versions see the gradle.properties file
|
apply plugin: 'dev.architectury.loom'
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
apply plugin: 'architectury-plugin'
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
apply plugin: 'maven-publish'
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
||||||
|
|
||||||
|
base {
|
||||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
archivesName = "$rootProject.archives_name-$project.name"
|
||||||
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
||||||
|
|
||||||
// Uncomment the following line to enable the deprecated Fabric API modules.
|
|
||||||
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
|
|
||||||
|
|
||||||
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
|
|
||||||
|
|
||||||
includeModImplementation fabricApi.module("fabric-api-base", project.fabric_version)
|
|
||||||
includeModImplementation fabricApi.module("fabric-screen-api-v1", project.fabric_version)
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources {
|
|
||||||
inputs.property "version", project.version
|
|
||||||
|
|
||||||
filesMatching("fabric.mod.json") {
|
|
||||||
expand "version": project.version
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
repositories {
|
||||||
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
|
// Add repositories to retrieve artifacts from in here.
|
||||||
it.options.release = 17
|
// You should only use this when depending on other mods because
|
||||||
}
|
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||||
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||||
java {
|
// for more information about repositories.
|
||||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
|
||||||
// if it is present.
|
|
||||||
// If you remove this line, sources will not be generated.
|
|
||||||
withSourcesJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
from("LICENSE") {
|
|
||||||
rename { "${it}_${project.archivesBaseName}"}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// configure the maven publication
|
dependencies {
|
||||||
publishing {
|
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
|
||||||
publications {
|
mappings loom.layered {
|
||||||
mavenJava(MavenPublication) {
|
it.mappings("net.fabricmc:yarn:$rootProject.yarn_mappings:v2")
|
||||||
from components.java
|
it.mappings("dev.architectury:yarn-mappings-patch-neoforge:$rootProject.yarn_mappings_patch_neoforge_version")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
java {
|
||||||
repositories {
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||||
// Add repositories to publish to here.
|
// if it is present.
|
||||||
// Notice: This block does NOT have the same function as the block in the top level.
|
// If you remove this line, sources will not be generated.
|
||||||
// The repositories here will be used for publishing your artifact, not for
|
withSourcesJar()
|
||||||
// retrieving dependencies.
|
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_21
|
||||||
|
targetCompatibility = JavaVersion.VERSION_21
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
it.options.release = 21
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configure Maven publishing.
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
artifactId = base.archivesName.get()
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||||
|
repositories {
|
||||||
|
// Add repositories to publish to here.
|
||||||
|
// Notice: This block does NOT have the same function as the block in the top level.
|
||||||
|
// The repositories here will be used for publishing your artifact, not for
|
||||||
|
// retrieving dependencies.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
common/build.gradle
Executable file
8
common/build.gradle
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
architectury {
|
||||||
|
injectInjectables = false
|
||||||
|
common(rootProject.properties["enabled_platforms"].split(","))
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:${rootProject.property("fabric_loader_version")}"
|
||||||
|
}
|
||||||
39
common/src/main/java/me/lucaslah/nrb/mixin/GameMenuScreenMixin.java
Executable file
39
common/src/main/java/me/lucaslah/nrb/mixin/GameMenuScreenMixin.java
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
package me.lucaslah.nrb.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.Drawable;
|
||||||
|
import net.minecraft.client.gui.screen.GameMenuScreen;
|
||||||
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import net.minecraft.client.gui.widget.ClickableWidget;
|
||||||
|
import net.minecraft.client.resource.language.I18n;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Mixin(GameMenuScreen.class)
|
||||||
|
public abstract class GameMenuScreenMixin extends Screen {
|
||||||
|
protected GameMenuScreenMixin(Text title) {
|
||||||
|
super(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "initWidgets()V", at = @At(value = "RETURN"))
|
||||||
|
public void initWidgets(CallbackInfo ci) {
|
||||||
|
final List<Drawable> drawables = ((ScreenAccessor) this).getDrawables();
|
||||||
|
|
||||||
|
for (Drawable drawable : drawables) {
|
||||||
|
if (drawable instanceof ClickableWidget widget) {
|
||||||
|
if (widget.getMessage().getString().equals(I18n.translate("menu.playerReporting"))) {
|
||||||
|
if (this.client != null) {
|
||||||
|
widget.active = this.client.isIntegratedServerRunning() && !Objects.requireNonNull(this.client.getServer()).isRemote();
|
||||||
|
}
|
||||||
|
|
||||||
|
widget.setMessage(Text.translatable("menu.shareToLan"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
common/src/main/java/me/lucaslah/nrb/mixin/ScreenAccessor.java
Executable file
14
common/src/main/java/me/lucaslah/nrb/mixin/ScreenAccessor.java
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
package me.lucaslah.nrb.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.Drawable;
|
||||||
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mixin(Screen.class)
|
||||||
|
public interface ScreenAccessor {
|
||||||
|
@Accessor
|
||||||
|
List<Drawable> getDrawables();
|
||||||
|
}
|
||||||
2
common/src/main/resources/architectury.common.json
Executable file
2
common/src/main/resources/architectury.common.json
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
||||||
0
src/main/resources/assets/noreportbutton/icon.png → common/src/main/resources/assets/noreportbutton/icon.png
Normal file → Executable file
0
src/main/resources/assets/noreportbutton/icon.png → common/src/main/resources/assets/noreportbutton/icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
11
src/main/resources/mixins.json → common/src/main/resources/noreportbutton.mixins.json
Normal file → Executable file
11
src/main/resources/mixins.json → common/src/main/resources/noreportbutton.mixins.json
Normal file → Executable file
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"package": "me.lucaslah.nrb.mixin",
|
||||||
"package": "me.lucaslah.ncrb.mixin",
|
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"minVersion": "0.8",
|
||||||
],
|
|
||||||
"client": [
|
"client": [
|
||||||
"GameMenuScreenMixin"
|
"GameMenuScreenMixin",
|
||||||
|
"ScreenAccessor"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
49
fabric/build.gradle
Executable file
49
fabric/build.gradle
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
architectury {
|
||||||
|
platformSetupLoomIde()
|
||||||
|
fabric()
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
common {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
compileClasspath.extendsFrom common
|
||||||
|
runtimeClasspath.extendsFrom common
|
||||||
|
developmentFabric.extendsFrom common
|
||||||
|
|
||||||
|
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||||
|
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||||
|
shadowBundle {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||||
|
|
||||||
|
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||||
|
shadowBundle project(path: ':common', configuration: 'transformProductionFabric')
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
inputs.property 'version', project.version
|
||||||
|
|
||||||
|
filesMatching('fabric.mod.json') {
|
||||||
|
expand version: project.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
configurations = [project.configurations.shadowBundle]
|
||||||
|
archiveClassifier = 'dev-shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
remapJar {
|
||||||
|
inputFile.set shadowJar.archiveFile
|
||||||
|
}
|
||||||
8
fabric/src/main/java/me/lucaslah/nrb/NoReportButtonFabric.java
Executable file
8
fabric/src/main/java/me/lucaslah/nrb/NoReportButtonFabric.java
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
package me.lucaslah.nrb;
|
||||||
|
|
||||||
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
|
||||||
|
public class NoReportButtonFabric implements ModInitializer {
|
||||||
|
@Override
|
||||||
|
public void onInitialize() {}
|
||||||
|
}
|
||||||
15
src/main/resources/fabric.mod.json → fabric/src/main/resources/fabric.mod.json
Normal file → Executable file
15
src/main/resources/fabric.mod.json → fabric/src/main/resources/fabric.mod.json
Normal file → Executable file
@@ -9,27 +9,26 @@
|
|||||||
"Lucaslah"
|
"Lucaslah"
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://cssudii.xyz/r/project/no-report-button",
|
"homepage": "https://github.com/Lucalah/no-report-button",
|
||||||
"sources": "https://github.com/Lucalah/no-report-button"
|
"sources": "https://github.com/Lucalah/no-report-button"
|
||||||
},
|
},
|
||||||
|
|
||||||
"license": "lgpl-3",
|
"license": "lgpl-3",
|
||||||
"icon": "assets/noreportbutton/icon.png",
|
"icon": "assets/noreportbutton/icon.png",
|
||||||
|
|
||||||
"environment": "*",
|
"environment": "client",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
"me.lucaslah.ncrb.NoReportButton"
|
"me.lucaslah.nrb.NoReportButtonFabric"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"mixins.json"
|
"noreportbutton.mixins.json"
|
||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.14.6",
|
"fabricloader": ">=0.14.17",
|
||||||
"minecraft": ">=1.19.3",
|
"minecraft": "~1.21",
|
||||||
"java": ">=17",
|
"java": ">=21"
|
||||||
"fabric-screen-api-v1": ">=1.0.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
55
forge/build.gradle
Executable file
55
forge/build.gradle
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
architectury {
|
||||||
|
platformSetupLoomIde()
|
||||||
|
forge()
|
||||||
|
}
|
||||||
|
|
||||||
|
loom {
|
||||||
|
forge {
|
||||||
|
mixinConfig "noreportbutton.mixins.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
common {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
compileClasspath.extendsFrom common
|
||||||
|
runtimeClasspath.extendsFrom common
|
||||||
|
developmentForge.extendsFrom common
|
||||||
|
|
||||||
|
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||||
|
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||||
|
shadowBundle {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
forge "net.minecraftforge:forge:${rootProject.properties["forge_version"]}"
|
||||||
|
|
||||||
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||||
|
shadowBundle(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
inputs.property "version", project.version
|
||||||
|
|
||||||
|
filesMatching("META-INF/mods.toml") {
|
||||||
|
expand "version": project.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
configurations = [project.configurations.shadowBundle]
|
||||||
|
archiveClassifier = 'dev-shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
remapJar {
|
||||||
|
inputFile.set shadowJar.archiveFile
|
||||||
|
}
|
||||||
1
forge/gradle.properties
Executable file
1
forge/gradle.properties
Executable file
@@ -0,0 +1 @@
|
|||||||
|
loom.platform=forge
|
||||||
7
forge/src/main/java/me/lucaslah/nrb/NoReportButtonForge.java
Executable file
7
forge/src/main/java/me/lucaslah/nrb/NoReportButtonForge.java
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
package me.lucaslah.nrb;
|
||||||
|
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
|
@Mod("noreportbutton")
|
||||||
|
public class NoReportButtonForge {
|
||||||
|
}
|
||||||
28
forge/src/main/resources/META-INF/mods.toml
Executable file
28
forge/src/main/resources/META-INF/mods.toml
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
modLoader = "javafml"
|
||||||
|
loaderVersion = "[0,)"
|
||||||
|
license = "GNU LESSER GENERAL PUBLIC LICENSE"
|
||||||
|
clientSideOnly=true
|
||||||
|
|
||||||
|
[[mods]]
|
||||||
|
modId = "noreportbutton"
|
||||||
|
version = "${version}"
|
||||||
|
displayName = "No Report Button"
|
||||||
|
authors = "Lucaslah"
|
||||||
|
description = '''
|
||||||
|
Removes the chat report button from the multiplayer menu screen
|
||||||
|
'''
|
||||||
|
logoFile = "icon.png"
|
||||||
|
|
||||||
|
[[dependencies.noreportbutton]]
|
||||||
|
modId = "forge"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[0,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "CLIENT"
|
||||||
|
|
||||||
|
[[dependencies.noreportbutton]]
|
||||||
|
modId = "minecraft"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[1.21,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "CLIENT"
|
||||||
BIN
forge/src/main/resources/icon.png
Executable file
BIN
forge/src/main/resources/icon.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
6
forge/src/main/resources/pack.mcmeta
Executable file
6
forge/src/main/resources/pack.mcmeta
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"description": "NoReportButton",
|
||||||
|
"pack_format": 9
|
||||||
|
}
|
||||||
|
}
|
||||||
24
gradle.properties
Normal file → Executable file
24
gradle.properties
Normal file → Executable file
@@ -1,16 +1,20 @@
|
|||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx1G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
|
org.gradle.parallel=true
|
||||||
# Fabric Properties
|
|
||||||
# check these on https://fabricmc.net/develop
|
|
||||||
minecraft_version=1.19.3
|
|
||||||
yarn_mappings=1.19.3+build.1
|
|
||||||
loader_version=0.14.11
|
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.3.0
|
mod_version = 1.6.1
|
||||||
maven_group = me.lucaslah
|
maven_group = me.lucaslah
|
||||||
archives_base_name = no-report-button
|
archives_name = no-report-button
|
||||||
|
enabled_platforms=fabric,forge,neoforge
|
||||||
|
|
||||||
|
# Minecraft Properties
|
||||||
|
minecraft_version=1.21
|
||||||
|
yarn_mappings=1.21+build.7
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.68.1+1.19.3
|
fabric_version=0.100.1+1.21
|
||||||
|
fabric_loader_version=0.15.11
|
||||||
|
forge_version=1.21-51.0.5
|
||||||
|
neoforge_version=21.0.167
|
||||||
|
yarn_mappings_patch_neoforge_version = 1.21+build.4
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file → Executable file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file → Executable file
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable file
3
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable file
@@ -1,5 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
28
gradlew
vendored
28
gradlew
vendored
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015-2021 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -32,10 +32,10 @@
|
|||||||
# Busybox and similar reduced shells will NOT work, because this script
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
# requires all of these POSIX shell features:
|
# requires all of these POSIX shell features:
|
||||||
# * functions;
|
# * functions;
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
#
|
#
|
||||||
# Important for patching:
|
# Important for patching:
|
||||||
#
|
#
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -80,10 +80,10 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
@@ -143,12 +143,16 @@ fi
|
|||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -205,6 +209,12 @@ set -- \
|
|||||||
org.gradle.wrapper.GradleWrapperMain \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
|||||||
181
gradlew.bat
vendored
Normal file → Executable file
181
gradlew.bat
vendored
Normal file → Executable file
@@ -1,89 +1,92 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
@rem This is normally unused
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
@rem Find java.exe
|
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
set JAVA_EXE=java.exe
|
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
set JAVA_EXE=java.exe
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
echo.
|
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo.
|
||||||
echo.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo.
|
||||||
echo location of your Java installation.
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
goto fail
|
|
||||||
|
goto fail
|
||||||
:findJavaFromJavaHome
|
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
:findJavaFromJavaHome
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
if exist "%JAVA_EXE%" goto execute
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
echo.
|
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo.
|
||||||
echo.
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo.
|
||||||
echo location of your Java installation.
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
goto fail
|
|
||||||
|
goto fail
|
||||||
:execute
|
|
||||||
@rem Setup the command line
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
@rem Execute Gradle
|
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
:end
|
|
||||||
@rem End local scope for the variables with windows NT shell
|
:end
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
:fail
|
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
:fail
|
||||||
rem the _cmd.exe /c_ return code!
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
rem the _cmd.exe /c_ return code!
|
||||||
exit /b 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
:mainEnd
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:omega
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
|
|||||||
56
neoforge/build.gradle
Normal file
56
neoforge/build.gradle
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
architectury {
|
||||||
|
platformSetupLoomIde()
|
||||||
|
neoForge()
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
common {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
compileClasspath.extendsFrom common
|
||||||
|
runtimeClasspath.extendsFrom common
|
||||||
|
developmentNeoForge.extendsFrom common
|
||||||
|
|
||||||
|
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||||
|
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||||
|
shadowBundle {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = 'NeoForged'
|
||||||
|
url = 'https://maven.neoforged.net/releases'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
|
||||||
|
|
||||||
|
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||||
|
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
inputs.property 'version', project.version
|
||||||
|
|
||||||
|
filesMatching('META-INF/neoforge.mods.toml') {
|
||||||
|
expand version: project.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
configurations = [project.configurations.shadowBundle]
|
||||||
|
archiveClassifier = 'dev-shadow'
|
||||||
|
}
|
||||||
|
|
||||||
|
remapJar {
|
||||||
|
inputFile.set shadowJar.archiveFile
|
||||||
|
}
|
||||||
1
neoforge/gradle.properties
Normal file
1
neoforge/gradle.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
loom.platform=neoforge
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package me.lucaslah.nrb;
|
||||||
|
|
||||||
|
import net.neoforged.fml.common.Mod;
|
||||||
|
|
||||||
|
@Mod("noreportbutton")
|
||||||
|
public class NoReportButtonNeoForge {
|
||||||
|
}
|
||||||
31
neoforge/src/main/resources/META-INF/neoforge.mods.toml
Normal file
31
neoforge/src/main/resources/META-INF/neoforge.mods.toml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
modLoader = "javafml"
|
||||||
|
loaderVersion = "[0,)"
|
||||||
|
license = "GNU LESSER GENERAL PUBLIC LICENSE"
|
||||||
|
clientSideOnly=true
|
||||||
|
|
||||||
|
[[mods]]
|
||||||
|
modId = "noreportbutton"
|
||||||
|
version = "${version}"
|
||||||
|
displayName = "No Report Button"
|
||||||
|
authors = "Lucaslah"
|
||||||
|
description = '''
|
||||||
|
Removes the chat report button from the multiplayer menu screen
|
||||||
|
'''
|
||||||
|
logoFile = "icon.png"
|
||||||
|
|
||||||
|
[[dependencies.noreportbutton]]
|
||||||
|
modId = "neoforge"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[0,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "CLIENT"
|
||||||
|
|
||||||
|
[[dependencies.noreportbutton]]
|
||||||
|
modId = "minecraft"
|
||||||
|
mandatory = true
|
||||||
|
versionRange = "[1.21,)"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "CLIENT"
|
||||||
|
|
||||||
|
[[mixins]]
|
||||||
|
config = "noreportbutton.mixins.json"
|
||||||
BIN
neoforge/src/main/resources/icon.png
Normal file
BIN
neoforge/src/main/resources/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
6
neoforge/src/main/resources/pack.mcmeta
Normal file
6
neoforge/src/main/resources/pack.mcmeta
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"description": "NoReportButton",
|
||||||
|
"pack_format": 9
|
||||||
|
}
|
||||||
|
}
|
||||||
10
settings.gradle
Normal file → Executable file
10
settings.gradle
Normal file → Executable file
@@ -4,7 +4,17 @@ pluginManagement {
|
|||||||
name = 'Fabric'
|
name = 'Fabric'
|
||||||
url = 'https://maven.fabricmc.net/'
|
url = 'https://maven.fabricmc.net/'
|
||||||
}
|
}
|
||||||
|
maven { url "https://maven.architectury.dev/" }
|
||||||
|
maven { url "https://maven.minecraftforge.net/" }
|
||||||
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rootProject.name = "No-Report-Button"
|
||||||
|
|
||||||
|
include 'common'
|
||||||
|
include 'fabric'
|
||||||
|
include 'forge'
|
||||||
|
include 'neoforge'
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
package me.lucaslah.ncrb;
|
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
|
||||||
|
|
||||||
public class NoReportButton implements ModInitializer {
|
|
||||||
@Override
|
|
||||||
public void onInitialize() {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package me.lucaslah.ncrb;
|
|
||||||
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
|
||||||
import net.minecraft.client.gui.screen.OpenToLanScreen;
|
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
|
||||||
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
|
|
||||||
import net.minecraft.client.gui.widget.PressableWidget;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
|
|
||||||
public class OpenToLanButton extends PressableWidget {
|
|
||||||
private final Screen screen;
|
|
||||||
public OpenToLanButton(Screen screen, int i, int j, int k, int l, Text text) {
|
|
||||||
super(i, j, k, l, text);
|
|
||||||
this.screen = screen;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPress() {
|
|
||||||
MinecraftClient client = MinecraftClient.getInstance();
|
|
||||||
assert client != null;
|
|
||||||
client.setScreen(new OpenToLanScreen(screen));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void appendClickableNarrations(NarrationMessageBuilder builder) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
package me.lucaslah.ncrb.mixin;
|
|
||||||
|
|
||||||
import me.lucaslah.ncrb.OpenToLanButton;
|
|
||||||
import net.fabricmc.fabric.api.client.screen.v1.Screens;
|
|
||||||
import net.minecraft.client.gui.Element;
|
|
||||||
import net.minecraft.client.gui.screen.GameMenuScreen;
|
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
|
||||||
import net.minecraft.client.gui.widget.ClickableWidget;
|
|
||||||
import net.minecraft.client.gui.widget.GridWidget;
|
|
||||||
import net.minecraft.client.resource.language.I18n;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Mixin(GameMenuScreen.class)
|
|
||||||
public abstract class GameMenuScreenMixin extends Screen {
|
|
||||||
|
|
||||||
protected GameMenuScreenMixin(Text title) {
|
|
||||||
super(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Inject(method = "initWidgets()V", at = @At(value = "RETURN"))
|
|
||||||
public void initWidgets(CallbackInfo ci) {
|
|
||||||
final List<ClickableWidget> widgets = Screens.getButtons(this);
|
|
||||||
List<? extends Element> buttons = null;
|
|
||||||
|
|
||||||
for (ClickableWidget clickableWidget : widgets) {
|
|
||||||
if (clickableWidget instanceof GridWidget widget) {
|
|
||||||
List<? extends Element> children = widget.children();
|
|
||||||
|
|
||||||
if (children != null) {
|
|
||||||
buttons = children;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean reportButtonFound = false;
|
|
||||||
|
|
||||||
if (buttons != null) {
|
|
||||||
for (Element element : buttons) {
|
|
||||||
if (element instanceof ClickableWidget button) {
|
|
||||||
if (button.getMessage().getString().equals(I18n.translate("menu.playerReporting"))) {
|
|
||||||
button.visible = false;
|
|
||||||
button.active = false;
|
|
||||||
reportButtonFound = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reportButtonFound) {
|
|
||||||
OpenToLanButton openToLanButton = new OpenToLanButton(this,this.width / 2 + 4, this.height / 4 + 96 + -16, 98, 20, Text.translatable("menu.shareToLan"));
|
|
||||||
|
|
||||||
if (this.client != null) {
|
|
||||||
openToLanButton.active = this.client.isIntegratedServerRunning() && !Objects.requireNonNull(this.client.getServer()).isRemote();
|
|
||||||
}
|
|
||||||
|
|
||||||
widgets.add(openToLanButton);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user