Skip to content

Commit

Permalink
Enforce LiteLoader progress bar override
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIIL committed Apr 13, 2015
1 parent bb5a72e commit 564406d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mc_version=1.8
forge_version=11.14.1.1354

mod_version=1.2.7
mod_version=1.2.8
fallback_build_number=1
alexiil_lib_version=1.0.+
7 changes: 7 additions & 0 deletions src/main/java/alexiil/mods/load/LiteLoaderProgress.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ public class LiteLoaderProgress extends LoadingBar {
private int totalLiteProgress = 0;
private int liteProgress = 0;

public LiteLoaderProgress() {
super();
}

@Override
protected void _incrementProgress() {}

@Override
protected void _dispose() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,26 @@ private byte[] transformMinecraft(byte[] before, boolean dev) {
}
if (m.name.equals(minecraftStartGame)) {
for (int i = 0; i < m.instructions.size(); i++) {
/* LiteLoader disabling -NOTE TO ANYONE FROM LITELOADER OR ANYONE ELSE: I am disabling liteloader's
* overlay simply because otherwise it switches between liteloader's bar and mine. I can safely
* assume that people won't wont LiteLoader's as they are using my mod, which is just a progress
* bar, they can disable this behaviour by removing my mod (as all my mod does is just add a loading
* bar) */
AbstractInsnNode node = m.instructions.get(i);
if (node instanceof MethodInsnNode) {
MethodInsnNode method = (MethodInsnNode) node;
if (method.owner.equals("com/mumfrey/liteloader/client/gui/startup/LoadingBar")) {
m.instructions.remove(method);
continue;
}
else if (method.owner.startsWith("com/mumfrey")) {
System.out.println("Started with \"com/mumfrey\", was actually \"" + method.owner + "\"");
}
else
System.out.println("Started with \"" + method.owner + "\"");
}

// LiteLoader removing end
if (node instanceof MethodInsnNode) {
MethodInsnNode method = (MethodInsnNode) node;
if (method.owner.equals(Type.getInternalName(FMLClientHandler.class)) && method.name.equals("instance")) {
Expand Down

0 comments on commit 564406d

Please sign in to comment.