First, you will need an add-on template. You can get this from http://zhuoweizhang.net/addongen/ (Created by 500_Internal_Server_Error).
Put this in main.cpp:
I have a question how to create a creature in addons because i want to create a godzillacraft resurgence and it will be so cool because shin godzilla was there and its a enemy for mcpe and he will be a golem that shoots fire
Can you help me for that addons just tell me how and can you give me the code of the golem to i edit the size of it and its attack skills and power
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Put this in main.cpp:
#include <jni.h> #include <dlfcn.h> #include <android/log.h> #include <stdlib.h> #include <Substrate.h> #include <string> #include <map> class Item { public: static Item* items[512]; }; class Minecraft; class LevelSettings; static void (*Minecraft_selectLevel_real)(Minecraft*, std::string const&, std::string const&, LevelSettings const&); static void(*Item_item)(Item*, int); static void(*Item_setIcon)(Item*, std::string const&, int); static void(*Item_setDescriptionId)(Item*, std::string const&); std::map <std::string, std::string>* I18n_strings; static void(*Item_setMaxStackSize)(Item*, int); static Item* createItem(int id, std::string name, std::string icon, int addTextures, int maxStackSize) { Item* newItem=(Item*) ::operator new((std::size_t) 76); Item_item(newItem, id-0x100); Item_setIcon(newItem, icon, addTextures); Item_setDescriptionId(newItem, name); (*I18n_strings)["item."+name+".name"]=name; Item_setMaxStackSize(newItem, maxStackSize); Item::items[id]=newItem; return newItem; } static void Minecraft_selectLevel_hook(Minecraft* mc, std::string const& str1, std::string const& str2, LevelSettings const& settings) { createItem(500, "Test", "stick", 0, 1); Minecraft_selectLevel_real(mc, str1, str2, settings); } JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { void* Minecraft_selectLevel = dlsym(RTLD_DEFAULT, "_ZN9Minecraft11selectLevelERKSsS1_RK13LevelSettings"); Item_item=(void(*)(Item*, int)) dlsym(RTLD_DEFAULT, "_ZN4ItemC2Ei"); Item_setIcon=(void(*)(Item*, std::string const&, int)) dlsym(RTLD_DEFAULT, "_ZN4Item7setIconERKSsi"); Item_setDescriptionId=(void(*)(Item*, std::string const&)) dlsym(RTLD_DEFAULT, "_ZN4Item16setDescriptionIdERKSs"); I18n_strings = (std::map <std::string, std::string>*) dlsym(RTLD_DEFAULT, "_ZN4I18n8_stringsE"); Item_setMaxStackSize=(void(*)(Item*, int)) dlsym(RTLD_DEFAULT, "_ZN4Item15setMaxStackSizeEi"); MSHookFunction(Minecraft_selectLevel, (void*) &Minecraft_selectLevel_hook, (void**) &Minecraft_selectLevel_real); return JNI_VERSION_1_2; }That's not his mod, it is MyNameIsDan's. And it's not out yet. Nevermind.
I tried out the better way (creating a derived class) and it is much better than my old way.
http://www.minecraftforum.net/members/Ender_Pe
Please make a tutorial in making a bow item in cpp please.
It's really simple, just use BowItem(id). You'll need a BowItem header though.
I'm making a project from scratch
How to compile it in apk
I have a question how to create a creature in addons because i want to create a godzillacraft resurgence and it will be so cool because shin godzilla was there and its a enemy for mcpe and he will be a golem that shoots fire
Can you help me for that addons just tell me how and can you give me the code of the golem to i edit the size of it and its attack skills and power