diff options
| author | Fuwn <[email protected]> | 2024-06-08 18:23:53 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-08 18:24:15 -0700 |
| commit | 0cbefd712d59f01fbe626a3d85b71f848575a403 (patch) | |
| tree | 73112230e9934ec1c03b11e38d275e9e806ae3b6 | |
| parent | refactor(patches): move patches to directory (diff) | |
| download | worldsplayer_source_editor-0cbefd712d59f01fbe626a3d85b71f848575a403.tar.xz worldsplayer_source_editor-0cbefd712d59f01fbe626a3d85b71f848575a403.zip | |
feat: optional patches
| -rw-r--r-- | README.md | 25 | ||||
| -rw-r--r-- | patches/optional/bypass_assert_fail_exit.patch | 13 | ||||
| -rw-r--r-- | patches/optional/free_vip.patch | 30 |
3 files changed, 62 insertions, 6 deletions
@@ -4,7 +4,7 @@ This project enables anyone to fully decompile WorldsPlayer to Java source files, edit them in any way, and recompile them back to a working WorldsPlayer Java Archive. -# Usage +## Usage WorldsPlayer, and this project, require Java 6 to run. You can obtain a copy of Java 6 for your platform from the [Oracle Java Archive](https://www.oracle.com/java/technologies/javase-java-archive-javase6-downloads.html). @@ -13,7 +13,7 @@ This project additionally requires the [Vineflower](https://vineflower.org/usage/) Java decompiler. Make sure that `vineflower` is accessible from your `PATH` environment variable. -## Decompiling WorldsPlayer +### Decompiling WorldsPlayer To decompile WorldsPlayer, you will need to run the `decompile` Make task. This task will decompile the full source tree of the WorldsPlayer Java Archive to the @@ -26,11 +26,11 @@ Archive as the `WORLDSPLAYER_JAR` environment variable. WORLDSPLAYER_JAR=/path/to/worlds.jar make decompile ``` -## Editing WorldsPlayer +### Editing WorldsPlayer You can edit the decompiled source files in any way you like. -## Recompiling WorldsPlayer +### Recompiling WorldsPlayer To recompile WorldsPlayer, you will need to run the `compile` Make task. This task will recompile the full source tree of the WorldsPlayer Java Archive to the @@ -47,7 +47,7 @@ The recompiled WorldsPlayer Java Archive will be located at [`out/worlds.jar`](./out/worlds.jar) and requires no additional configuration to run in the WorldsPlayer client. -## Step-by-Step +### Step-by-Step ```shell # Decompile WorldsPlayer @@ -67,6 +67,19 @@ Now that we've changed the username format from `username` to `username (usernam  -# Licence +## Optional Patches + +This project includes a number of optional patches that can be applied to +WorldsPlayer. These patches are located in the +[`patches/optional`](./patches/optional) directory. + +- [Free VIP](./patches/optional/free_vip.patch): Enables level two VIP for free + at all times +- [Bypass `assertFail` `exit`](./patches/optional/bypass_assert_fail_exit.patch): + WorldsPlayer crashes when it encounters a failed assertion. This patch + continues to show any failed assertion popups, but attempts to continue + running the client, **if possible**. + +## Licence This project is licensed with the [GNU General Public License v3.0](./LICENSE).
\ No newline at end of file diff --git a/patches/optional/bypass_assert_fail_exit.patch b/patches/optional/bypass_assert_fail_exit.patch new file mode 100644 index 0000000..d4344f0 --- /dev/null +++ b/patches/optional/bypass_assert_fail_exit.patch @@ -0,0 +1,13 @@ +diff --git c/NET/worlds/core/Std.java i/NET/worlds/core/Std.java +index ee83be5..3af1bf6 100644 +--- c/NET/worlds/core/Std.java ++++ i/NET/worlds/core/Std.java +@@ -20,7 +20,7 @@ public class Std { + public static void assertFail(String file, int line) { + String msg = "Assertion failed: file " + file + ", line " + line; + dumpStackTrace(); +- exit(); ++ // exit(); + } + + public static String replaceStr(String in, String seek, String replace) { diff --git a/patches/optional/free_vip.patch b/patches/optional/free_vip.patch new file mode 100644 index 0000000..9636559 --- /dev/null +++ b/patches/optional/free_vip.patch @@ -0,0 +1,30 @@ +diff --git i/NET/worlds/console/Console.java w/NET/worlds/console/Console.java +index 1fc32ab..b6231ef 100644 +--- i/NET/worlds/console/Console.java ++++ w/NET/worlds/console/Console.java +@@ -637,11 +637,13 @@ public abstract class Console extends SuperRoot implements URLSelf, MainCallback + public static final native int getVolumeInfo(); + + public boolean getVIPAvatars() { +- return vip > 0 || isRedLightWorld; ++ // return vip > 0 || isRedLightWorld; ++ return true; + } + + public boolean getVIP() { +- return vip > 0; ++ // return vip > 0; ++ return true; + } + + public void setVIP(boolean vip) { +@@ -654,7 +656,8 @@ public abstract class Console extends SuperRoot implements URLSelf, MainCallback + } + + public boolean getFullVIP() { +- return vip == 2; ++ // return vip == 2; ++ return true; + } + + public void setFullVIP(boolean fullVIP) { |