├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── images └── result.png ├── settings.gradle └── src └── main ├── java └── ca │ └── fxco │ └── delayedreports │ ├── DelayedReports.java │ └── mixin │ └── ChatMessageSignerMixin.java └── resources ├── assets └── delayedreports │ └── icon.png ├── delayedreports.mixins.json └── fabric.mod.json /.gitignore: -------------------------------------------------------------------------------- 1 | # User-specific stuff 2 | .idea/ 3 | 4 | *.iml 5 | *.ipr 6 | *.iws 7 | 8 | # IntelliJ 9 | out/ 10 | # mpeltonen/sbt-idea plugin 11 | .idea_modules/ 12 | 13 | # JIRA plugin 14 | atlassian-ide-plugin.xml 15 | 16 | # Compiled class file 17 | *.class 18 | 19 | # Log file 20 | *.log 21 | 22 | # BlueJ files 23 | *.ctxt 24 | 25 | # Package Files # 26 | *.jar 27 | *.war 28 | *.nar 29 | *.ear 30 | *.zip 31 | *.tar.gz 32 | *.rar 33 | 34 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 35 | hs_err_pid* 36 | 37 | *~ 38 | 39 | # temporary files which can be created if a process still has a handle open of a deleted file 40 | .fuse_hidden* 41 | 42 | # KDE directory preferences 43 | .directory 44 | 45 | # Linux trash folder which might appear on any partition or disk 46 | .Trash-* 47 | 48 | # .nfs files are created when an open file is removed but is still being accessed 49 | .nfs* 50 | 51 | # General 52 | .DS_Store 53 | .AppleDouble 54 | .LSOverride 55 | 56 | # Icon must end with two \r 57 | Icon 58 | 59 | # Thumbnails 60 | ._* 61 | 62 | # Files that might appear in the root of a volume 63 | .DocumentRevisions-V100 64 | .fseventsd 65 | .Spotlight-V100 66 | .TemporaryItems 67 | .Trashes 68 | .VolumeIcon.icns 69 | .com.apple.timemachine.donotpresent 70 | 71 | # Directories potentially created on remote AFP share 72 | .AppleDB 73 | .AppleDesktop 74 | Network Trash Folder 75 | Temporary Items 76 | .apdisk 77 | 78 | # Windows thumbnail cache files 79 | Thumbs.db 80 | Thumbs.db:encryptable 81 | ehthumbs.db 82 | ehthumbs_vista.db 83 | 84 | # Dump file 85 | *.stackdump 86 | 87 | # Folder config file 88 | [Dd]esktop.ini 89 | 90 | # Recycle Bin used on file shares 91 | $RECYCLE.BIN/ 92 | 93 | # Windows Installer files 94 | *.cab 95 | *.msi 96 | *.msix 97 | *.msm 98 | *.msp 99 | 100 | # Windows shortcuts 101 | *.lnk 102 | 103 | .gradle 104 | build/ 105 | 106 | # Ignore Gradle GUI config 107 | gradle-app.setting 108 | 109 | # Cache of project 110 | .gradletasknamecache 111 | 112 | **/build/ 113 | 114 | # Common working directory 115 | run/ 116 | 117 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 118 | !gradle-wrapper.jar 119 | 120 | # Don't include icon gimp save file 121 | icon.xcf 122 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 FX, Adryd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DelayedReports 2 | ### A mod that delays your chat messages so that they are delayed in reports. Making it harder for Mojang to validate, and hopefully a temporary solution to Fabricated chat reports 3 | 4 | This mod does not visually change anything about chat messages. All chat messages will act normally, although internally the timestamp will be 4.5 minutes behind. 5 | This means your messages will most likely be seen as invalid or unusable by instigators who are reviewing reports containing your messages. 6 | 7 | **Example:** 8 | ![Delayed](https://github.com/fxmorin/DelayedReports/blob/master/images/result.png) 9 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'fabric-loom' version '0.12-SNAPSHOT' 3 | id 'io.github.juuxel.loom-quiltflower' version '1.7.1' 4 | id 'maven-publish' 5 | } 6 | 7 | version = project.mod_version 8 | group = project.maven_group 9 | 10 | dependencies { 11 | // To change the versions see the gradle.properties file 12 | minecraft "com.mojang:minecraft:${project.minecraft_version}" 13 | mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" 14 | modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" 15 | 16 | } 17 | 18 | processResources { 19 | inputs.property "version", project.version 20 | filteringCharset "UTF-8" 21 | 22 | filesMatching("fabric.mod.json") { 23 | expand "version": project.version 24 | } 25 | } 26 | 27 | def targetJavaVersion = 17 28 | tasks.withType(JavaCompile).configureEach { 29 | it.options.encoding = "UTF-8" 30 | if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { 31 | it.options.release = targetJavaVersion 32 | } 33 | } 34 | 35 | java { 36 | def javaVersion = JavaVersion.toVersion(targetJavaVersion) 37 | if (JavaVersion.current() < javaVersion) { 38 | toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) 39 | } 40 | archivesBaseName = project.archives_base_name 41 | withSourcesJar() 42 | } 43 | 44 | jar { 45 | from("LICENSE") { 46 | rename { "${it}_${project.archivesBaseName}" } 47 | } 48 | } 49 | 50 | // configure the maven publication 51 | publishing { 52 | publications { 53 | mavenJava(MavenPublication) { 54 | from components.java 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Done to increase the memory available to gradle. 2 | org.gradle.jvmargs=-Xmx1G 3 | # Fabric Properties 4 | # check these on https://modmuss50.me/fabric.html 5 | minecraft_version=1.19.1-pre2 6 | yarn_mappings=1.19.1-pre2+build.2 7 | loader_version=0.14.8 8 | # Mod Properties 9 | mod_version=1.0 10 | maven_group=ca.fxco 11 | archives_base_name=DelayedReports 12 | 13 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FxMorin/DelayedReports/e5390d6bf52126c4e8d054468bd7f78641d88c08/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FxMorin/DelayedReports/e5390d6bf52126c4e8d054468bd7f78641d88c08/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /images/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FxMorin/DelayedReports/e5390d6bf52126c4e8d054468bd7f78641d88c08/images/result.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | maven { 4 | name = 'Fabric' 5 | url = 'https://maven.fabricmc.net/' 6 | } 7 | maven { 8 | name = 'Cotton' 9 | url = 'https://server.bbkr.space/artifactory/libs-release/' 10 | } 11 | gradlePluginPortal() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/ca/fxco/delayedreports/DelayedReports.java: -------------------------------------------------------------------------------- 1 | package ca.fxco.delayedreports; 2 | 3 | import net.fabricmc.api.ClientModInitializer; 4 | import net.fabricmc.api.EnvType; 5 | import net.fabricmc.api.Environment; 6 | 7 | @Environment(EnvType.CLIENT) 8 | public class DelayedReports implements ClientModInitializer { 9 | @Override 10 | public void onInitializeClient() {} 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/ca/fxco/delayedreports/mixin/ChatMessageSignerMixin.java: -------------------------------------------------------------------------------- 1 | package ca.fxco.delayedreports.mixin; 2 | 3 | import net.fabricmc.api.EnvType; 4 | import net.fabricmc.api.Environment; 5 | import net.minecraft.network.message.ChatMessageSigner; 6 | import net.minecraft.util.math.random.Random; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | import java.time.Duration; 12 | import java.time.Instant; 13 | import java.util.UUID; 14 | 15 | @Environment(EnvType.CLIENT) 16 | @Mixin(ChatMessageSigner.class) 17 | public class ChatMessageSignerMixin { 18 | 19 | private static Instant lastMessage = Instant.now(); 20 | private static final long DELAY_MINUTES = (int)Duration.ofSeconds(270).toMillis(); //4.5m 21 | 22 | 23 | @Redirect( 24 | method = "create(Ljava/util/UUID;)Lnet/minecraft/network/message/ChatMessageSigner;", 25 | at = @At( 26 | value = "NEW", 27 | target = "net/minecraft/network/message/ChatMessageSigner" 28 | ) 29 | ) 30 | private static ChatMessageSigner onCreate(UUID sender, Instant instant, long salt) { 31 | Instant farTime = Instant.ofEpochMilli(instant.toEpochMilli() - DELAY_MINUTES); 32 | if (lastMessage.compareTo(farTime) <= 0) { 33 | farTime = lastMessage.plusMillis(Random.create().nextBetween(1,2)); 34 | lastMessage = farTime; 35 | } 36 | return new ChatMessageSigner(sender, farTime, salt); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/assets/delayedreports/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FxMorin/DelayedReports/e5390d6bf52126c4e8d054468bd7f78641d88c08/src/main/resources/assets/delayedreports/icon.png -------------------------------------------------------------------------------- /src/main/resources/delayedreports.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "ca.fxco.delayedreports.mixin", 5 | "compatibilityLevel": "JAVA_17", 6 | "client": [ 7 | "ChatMessageSignerMixin" 8 | ], 9 | "injectors": { 10 | "defaultRequire": 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "delayedreports", 4 | "version": "${version}", 5 | "name": "DelayedReports", 6 | "description": "A mod that delays your chat messages so that they are delayed in reports. Making it harder for Mojang to validate, and hopefully a temporary solution to Fabricated chat reports", 7 | "authors": [ 8 | "FX - PR0CESS", 9 | "Adryd" 10 | ], 11 | "contact": {}, 12 | "license": "MIT", 13 | "icon": "assets/delayedreports/icon.png", 14 | "environment": "client", 15 | "entrypoints": { 16 | "client": [ 17 | "ca.fxco.delayedreports.DelayedReports" 18 | ] 19 | }, 20 | "mixins": [ 21 | "delayedreports.mixins.json" 22 | ], 23 | "depends": { 24 | "fabricloader": ">=0.14.8", 25 | "minecraft": ">=1.19.1-beta.2" 26 | } 27 | } 28 | --------------------------------------------------------------------------------