Skip to content

Commit 0cbefd7

Browse files
committed
feat: optional patches
1 parent 5592d1c commit 0cbefd7

File tree

3 files changed

+62
-6
lines changed

3 files changed

+62
-6
lines changed

README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This project enables anyone to fully decompile WorldsPlayer to Java source
44
files, edit them in any way, and recompile them back to a working WorldsPlayer
55
Java Archive.
66

7-
# Usage
7+
## Usage
88

99
WorldsPlayer, and this project, require Java 6 to run. You can obtain a copy
1010
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
1313
[Vineflower](https://vineflower.org/usage/) Java decompiler. Make sure that
1414
`vineflower` is accessible from your `PATH` environment variable.
1515

16-
## Decompiling WorldsPlayer
16+
### Decompiling WorldsPlayer
1717

1818
To decompile WorldsPlayer, you will need to run the `decompile` Make task. This
1919
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.
2626
WORLDSPLAYER_JAR=/path/to/worlds.jar make decompile
2727
```
2828

29-
## Editing WorldsPlayer
29+
### Editing WorldsPlayer
3030

3131
You can edit the decompiled source files in any way you like.
3232

33-
## Recompiling WorldsPlayer
33+
### Recompiling WorldsPlayer
3434

3535
To recompile WorldsPlayer, you will need to run the `compile` Make task. This
3636
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
4747
[`out/worlds.jar`](./out/worlds.jar) and requires no additional configuration
4848
to run in the WorldsPlayer client.
4949

50-
## Step-by-Step
50+
### Step-by-Step
5151

5252
```shell
5353
# Decompile WorldsPlayer
@@ -67,6 +67,19 @@ Now that we've changed the username format from `username` to `username (usernam
6767

6868
![](./assets/step_by_step.png)
6969

70-
# Licence
70+
## Optional Patches
71+
72+
This project includes a number of optional patches that can be applied to
73+
WorldsPlayer. These patches are located in the
74+
[`patches/optional`](./patches/optional) directory.
75+
76+
- [Free VIP](./patches/optional/free_vip.patch): Enables level two VIP for free
77+
at all times
78+
- [Bypass `assertFail` `exit`](./patches/optional/bypass_assert_fail_exit.patch):
79+
WorldsPlayer crashes when it encounters a failed assertion. This patch
80+
continues to show any failed assertion popups, but attempts to continue
81+
running the client, **if possible**.
82+
83+
## Licence
7184

7285
This project is licensed with the [GNU General Public License v3.0](./LICENSE).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git c/NET/worlds/core/Std.java i/NET/worlds/core/Std.java
2+
index ee83be5..3af1bf6 100644
3+
--- c/NET/worlds/core/Std.java
4+
+++ i/NET/worlds/core/Std.java
5+
@@ -20,7 +20,7 @@ public class Std {
6+
public static void assertFail(String file, int line) {
7+
String msg = "Assertion failed: file " + file + ", line " + line;
8+
dumpStackTrace();
9+
- exit();
10+
+ // exit();
11+
}
12+
13+
public static String replaceStr(String in, String seek, String replace) {

patches/optional/free_vip.patch

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git i/NET/worlds/console/Console.java w/NET/worlds/console/Console.java
2+
index 1fc32ab..b6231ef 100644
3+
--- i/NET/worlds/console/Console.java
4+
+++ w/NET/worlds/console/Console.java
5+
@@ -637,11 +637,13 @@ public abstract class Console extends SuperRoot implements URLSelf, MainCallback
6+
public static final native int getVolumeInfo();
7+
8+
public boolean getVIPAvatars() {
9+
- return vip > 0 || isRedLightWorld;
10+
+ // return vip > 0 || isRedLightWorld;
11+
+ return true;
12+
}
13+
14+
public boolean getVIP() {
15+
- return vip > 0;
16+
+ // return vip > 0;
17+
+ return true;
18+
}
19+
20+
public void setVIP(boolean vip) {
21+
@@ -654,7 +656,8 @@ public abstract class Console extends SuperRoot implements URLSelf, MainCallback
22+
}
23+
24+
public boolean getFullVIP() {
25+
- return vip == 2;
26+
+ // return vip == 2;
27+
+ return true;
28+
}
29+
30+
public void setFullVIP(boolean fullVIP) {

0 commit comments

Comments
 (0)