Skip to content

Instantly share code, notes, and snippets.

@native-m
Last active January 18, 2016 08:15
Show Gist options
  • Save native-m/a7df93f50e8c76327851 to your computer and use it in GitHub Desktop.
Save native-m/a7df93f50e8c76327851 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <jni.h>
#include <dlfcn.h>
#include <string.h>
#include <string>
#include "mcpelauncher.h"
using namespace std;
string (*VersiAsli)(void* gusti);
string versiHook(void* gusti) {
return "v0.14.0 alpha"; //utk nipu org klo kita sebenernya masih pake mcpe 0.13.1
}
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
void* hookVersiPalsu(RTLD_DEFAULT,"_ZN6Common20getGameVersionStringEv");
mcpelauncher_hook(hookVersiPalsu,(void*)&versiHook,(void**)&VersiAsli);
return JNI_VERSION_1_2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment