mirror of
https://github.com/Lucaslah/No-Report-Button.git
synced 2026-01-12 17:07:52 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a20014bb5a | |||
| 061c4b1ee0 | |||
| c33b9ffd88 | |||
| af4654a14d | |||
| 165144ea30 | |||
| a82d8bf07c | |||
| ed139af4ba |
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file → Executable file
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file → Executable file
0
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file → Executable file
0
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file → Executable file
0
.github/dependabot.yml
vendored
Normal file → Executable file
0
.github/dependabot.yml
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
CODE_OF_CONDUCT.md
Normal file → Executable file
0
CODE_OF_CONDUCT.md
Normal file → Executable file
8
README.md
Normal file → Executable file
8
README.md
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
[](https://www.curseforge.com/minecraft/mc-mods/no-report-button)
|
||||
[](https://modrinth.com/mod/nrb)
|
||||
[](https://modrinth.com/mod/nrb)
|
||||
# No Report Button
|
||||
Removes the chat report button from the game menu screen
|
||||
|
||||
@@ -9,11 +9,15 @@ Should be compatible with any mods, but if you do find a mod that is not please
|
||||
**Fabric API not required.**\
|
||||
**Mod is client size only, this mod will not do anything if used on the server.**
|
||||
|
||||
For Minecraft versions 1.19.1 and 1.19.2 use NRB v1.2.1, the latest version only supports 1.19.3+.
|
||||
For Minecraft versions 1.19.1 and 1.19.2 use NRB v1.2.1.\
|
||||
For Minecraft 1.19.3 use NRB v1.4.0.\
|
||||
The latest version (v1.4.1) only supports 1.19.4+.
|
||||
|
||||
## Released Versions
|
||||
| Version | MC Version | Mod loaders | Git tag | Supported |
|
||||
|---------|---------------|----------------------|---------------------------------------------------------------------------|-----------|
|
||||
| 1.5.0 | 1.20.1 | 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) | yes |
|
||||
| 1.4.0 | 1.19.3 | fabric, forge, quilt | [1.4.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.4.0) | yes |
|
||||
| 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 |
|
||||
|
||||
0
SECURITY.md
Normal file → Executable file
0
SECURITY.md
Normal file → Executable file
0
build.gradle
Normal file → Executable file
0
build.gradle
Normal file → Executable file
0
common/build.gradle
Normal file → Executable file
0
common/build.gradle
Normal file → Executable file
32
common/src/main/java/me/lucaslah/nrb/mixin/GameMenuScreenMixin.java
Normal file → Executable file
32
common/src/main/java/me/lucaslah/nrb/mixin/GameMenuScreenMixin.java
Normal file → Executable file
@@ -1,10 +1,9 @@
|
||||
package me.lucaslah.nrb.mixin;
|
||||
|
||||
import net.minecraft.client.gui.Element;
|
||||
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.gui.widget.GridWidget;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.text.Text;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -23,29 +22,16 @@ public abstract class GameMenuScreenMixin extends Screen {
|
||||
|
||||
@Inject(method = "initWidgets()V", at = @At(value = "RETURN"))
|
||||
public void initWidgets(CallbackInfo ci) {
|
||||
final List<Element> widgets = ((ScreenAccessor) this).getChildren();
|
||||
List<? extends Element> buttons = null;
|
||||
final List<Drawable> drawables = ((ScreenAccessor) this).getDrawables();
|
||||
|
||||
for (Element clickableWidget : widgets) {
|
||||
if (clickableWidget instanceof GridWidget widget) {
|
||||
List<? extends Element> children = widget.children();
|
||||
|
||||
if (children != null) {
|
||||
buttons = children;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (buttons != null) {
|
||||
for (Element element : buttons) {
|
||||
if (element instanceof ClickableWidget button) {
|
||||
if (button.getMessage().getString().equals(I18n.translate("menu.playerReporting"))) {
|
||||
if (this.client != null) {
|
||||
button.active = this.client.isIntegratedServerRunning() && !Objects.requireNonNull(this.client.getServer()).isRemote();
|
||||
}
|
||||
|
||||
button.setMessage(Text.translatable("menu.shareToLan"));
|
||||
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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
common/src/main/java/me/lucaslah/nrb/mixin/ScreenAccessor.java
Normal file → Executable file
4
common/src/main/java/me/lucaslah/nrb/mixin/ScreenAccessor.java
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
package me.lucaslah.nrb.mixin;
|
||||
|
||||
import net.minecraft.client.gui.Element;
|
||||
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;
|
||||
@@ -10,5 +10,5 @@ import java.util.List;
|
||||
@Mixin(Screen.class)
|
||||
public interface ScreenAccessor {
|
||||
@Accessor
|
||||
List<Element> getChildren();
|
||||
List<Drawable> getDrawables();
|
||||
}
|
||||
|
||||
0
common/src/main/resources/architectury.common.json
Normal file → Executable file
0
common/src/main/resources/architectury.common.json
Normal file → Executable file
0
common/src/main/resources/assets/noreportbutton/icon.png
Normal file → Executable file
0
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 |
0
common/src/main/resources/noreportbutton.mixins.json
Normal file → Executable file
0
common/src/main/resources/noreportbutton.mixins.json
Normal file → Executable file
8
fabric/build.gradle
Normal file → Executable file
8
fabric/build.gradle
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "com.github.johnrengelman.shadow" version "8.1.1"
|
||||
}
|
||||
|
||||
architectury {
|
||||
@@ -37,17 +37,17 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
setArchiveClassifier("dev-shadow")
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
setArchiveClassifier(null)
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
setArchiveClassifier("dev")
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
0
fabric/src/main/java/me/lucaslah/nrb/NoReportButtonFabric.java
Normal file → Executable file
0
fabric/src/main/java/me/lucaslah/nrb/NoReportButtonFabric.java
Normal file → Executable file
4
fabric/src/main/resources/fabric.mod.json
Normal file → Executable file
4
fabric/src/main/resources/fabric.mod.json
Normal file → Executable file
@@ -27,8 +27,8 @@
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.6",
|
||||
"minecraft": ">=1.19.3",
|
||||
"fabricloader": ">=0.14.17",
|
||||
"minecraft": "~1.20.1",
|
||||
"java": ">=17"
|
||||
}
|
||||
}
|
||||
|
||||
8
forge/build.gradle
Normal file → Executable file
8
forge/build.gradle
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id "com.github.johnrengelman.shadow" version "8.1.1"
|
||||
}
|
||||
|
||||
architectury {
|
||||
@@ -43,17 +43,17 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
setArchiveClassifier("dev-shadow")
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
setArchiveClassifier(null)
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
setArchiveClassifier("dev")
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
0
forge/gradle.properties
Normal file → Executable file
0
forge/gradle.properties
Normal file → Executable file
0
forge/src/main/java/me/lucaslah/nrb/NoReportButtonForge.java
Normal file → Executable file
0
forge/src/main/java/me/lucaslah/nrb/NoReportButtonForge.java
Normal file → Executable file
2
forge/src/main/resources/META-INF/mods.toml
Normal file → Executable file
2
forge/src/main/resources/META-INF/mods.toml
Normal file → Executable file
@@ -22,6 +22,6 @@ side = "CLIENT"
|
||||
[[dependencies.noreportbutton]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[1.19.3,)"
|
||||
versionRange = "[1.20.1,)"
|
||||
ordering = "NONE"
|
||||
side = "CLIENT"
|
||||
|
||||
0
forge/src/main/resources/icon.png
Normal file → Executable file
0
forge/src/main/resources/icon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
0
forge/src/main/resources/pack.mcmeta
Normal file → Executable file
0
forge/src/main/resources/pack.mcmeta
Normal file → Executable file
16
gradle.properties
Normal file → Executable file
16
gradle.properties
Normal file → Executable file
@@ -1,19 +1,19 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
|
||||
# Minecraft Properties
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=1.19.3+build.3
|
||||
fabric_loader_version=0.14.11
|
||||
minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.1
|
||||
fabric_loader_version=0.14.21
|
||||
quilt_loader_version=0.18.1-beta.23
|
||||
enabled_platforms=quilt,fabric,forge
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.4.0
|
||||
mod_version = 1.5.0
|
||||
maven_group = me.lucaslah
|
||||
archives_base_name = no-report-button
|
||||
|
||||
# Dependencies
|
||||
architectury_version=6.2.43
|
||||
fabric_version=0.68.1+1.19.3
|
||||
forge_version=1.19.3-44.0.18
|
||||
architectury_version=9.0.8
|
||||
fabric_version=0.83.0+1.20.1
|
||||
forge_version=1.20.1-47.0.3
|
||||
|
||||
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.
2
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable file
2
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
10
gradlew
vendored
10
gradlew
vendored
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (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
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
|
||||
178
gradlew.bat
vendored
Normal file → Executable file
178
gradlew.bat
vendored
Normal file → Executable file
@@ -1,89 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@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 obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@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 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set 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 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
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
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 %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@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 obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@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 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set 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 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
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
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 %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
0
settings.gradle
Normal file → Executable file
0
settings.gradle
Normal file → Executable file
Reference in New Issue
Block a user