Skip to content

Commit 564406d

Browse files
committed
Enforce LiteLoader progress bar override
1 parent bb5a72e commit 564406d

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mc_version=1.8
22
forge_version=11.14.1.1354
33

4-
mod_version=1.2.7
4+
mod_version=1.2.8
55
fallback_build_number=1
66
alexiil_lib_version=1.0.+

src/main/java/alexiil/mods/load/LiteLoaderProgress.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ public class LiteLoaderProgress extends LoadingBar {
1111
private int totalLiteProgress = 0;
1212
private int liteProgress = 0;
1313

14+
public LiteLoaderProgress() {
15+
super();
16+
}
17+
18+
@Override
19+
protected void _incrementProgress() {}
20+
1421
@Override
1522
protected void _dispose() {}
1623

src/main/java/alexiil/mods/load/coremod/BetterLoadingScreenTransformer.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,26 @@ private byte[] transformMinecraft(byte[] before, boolean dev) {
6464
}
6565
if (m.name.equals(minecraftStartGame)) {
6666
for (int i = 0; i < m.instructions.size(); i++) {
67+
/* LiteLoader disabling -NOTE TO ANYONE FROM LITELOADER OR ANYONE ELSE: I am disabling liteloader's
68+
* overlay simply because otherwise it switches between liteloader's bar and mine. I can safely
69+
* assume that people won't wont LiteLoader's as they are using my mod, which is just a progress
70+
* bar, they can disable this behaviour by removing my mod (as all my mod does is just add a loading
71+
* bar) */
6772
AbstractInsnNode node = m.instructions.get(i);
73+
if (node instanceof MethodInsnNode) {
74+
MethodInsnNode method = (MethodInsnNode) node;
75+
if (method.owner.equals("com/mumfrey/liteloader/client/gui/startup/LoadingBar")) {
76+
m.instructions.remove(method);
77+
continue;
78+
}
79+
else if (method.owner.startsWith("com/mumfrey")) {
80+
System.out.println("Started with \"com/mumfrey\", was actually \"" + method.owner + "\"");
81+
}
82+
else
83+
System.out.println("Started with \"" + method.owner + "\"");
84+
}
85+
86+
// LiteLoader removing end
6887
if (node instanceof MethodInsnNode) {
6988
MethodInsnNode method = (MethodInsnNode) node;
7089
if (method.owner.equals(Type.getInternalName(FMLClientHandler.class)) && method.name.equals("instance")) {

0 commit comments

Comments
 (0)