From 3f0a24170cd8284d1ea1ce55f037b25339d88522 Mon Sep 17 00:00:00 2001 From: Alexander Medvedev <71594357+Snowiiii@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:44:21 +0100 Subject: [PATCH] Remove minecraft source decompiler script There are many 3th-party software's out there which can easily decompile your the Minecraft source. You also often don't need the Source for most things. --- .devcontainer/devcontainer.json | 19 ++---------------- mc-source-code/decompile.sh | 35 --------------------------------- mc-source-code/pom.xml | 12 ----------- 3 files changed, 2 insertions(+), 64 deletions(-) delete mode 100755 mc-source-code/decompile.sh delete mode 100644 mc-source-code/pom.xml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 361cae3be..ada7e38b1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,23 +2,9 @@ "name": "Pumpkin", "image": "mcr.microsoft.com/devcontainers/base:noble", "features": { - // rust is needed for compiling the server's code - "ghcr.io/devcontainers/features/rust:1": {}, - // java is needed for decompiling Mojang's server jar - "ghcr.io/devcontainers/features/java:1": { - "version": "21", - "jdkDistro": "oracle", - "installMaven": true, - "mavenVersion": "latest" - }, - // python is needed for decompiling Mojang's server jar - "ghcr.io/devcontainers/features/python:1": { - "installTools": true, - "version": "3.7" - } + "ghcr.io/devcontainers/features/rust:1": {} }, "mounts": [ - // mount SSH config & public keys from host to enable SSH-based Git remotes "source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,readonly,type=bind" ], "forwardPorts": [ @@ -28,8 +14,7 @@ "vscode": { "extensions": [ "eamodio.gitlens", - "Swellaby.rust-pack", - "vscjava.vscode-java-pack" + "Swellaby.rust-pack" ] } } diff --git a/mc-source-code/decompile.sh b/mc-source-code/decompile.sh deleted file mode 100755 index a347f8d62..000000000 --- a/mc-source-code/decompile.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# This script decompiles the official Minecraft server JAR file. -# Be careful, as releasing the decompiled source code is against Minecraft's EULA. - -# configure which version we want to decompile -MC_VERSION="1.21" - -# remove folders if they already exist -if [ -d "DecompilerMC" ]; then rm -r DecompilerMC; fi -if [ -d "src" ]; then rm -r src; fi -if [ -d "target" ]; then rm -r target; fi - -# clone DecompilerMC for automatic decompilation -# look here for more informations: -# - https://minecraft.fandom.com/wiki/Tutorials/See_Minecraft%27s_code -# - https://github.com/hube12/DecompilerMC -git clone https://github.com/hube12/DecompilerMC.git -echo "DecompilerMC cloned successfully." - -# decompile the server JAR file -echo "Decompilation might take a while, please be patient." -cd DecompilerMC -python3 main.py -mcv $MC_VERSION -s server -na -f -rmap -rjar -dm -dj -dd -dec -q -c - -# move it to the correct directory -mv src .. -cd .. - -# move the custom made pom.xml -cp pom.xml src/$MC_VERSION/server - -# install the dependencies -cd ../src/$MC_VERSION/server -# mvn clean install \ No newline at end of file diff --git a/mc-source-code/pom.xml b/mc-source-code/pom.xml deleted file mode 100644 index e051d6cc7..000000000 --- a/mc-source-code/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - com.mojang - minecraft-server - 1.21 - - - - \ No newline at end of file