-
Notifications
You must be signed in to change notification settings - Fork 192
Info for addon authors
Genbu Hase edited this page Mar 8, 2016
·
6 revisions
BlockLauncher offers support for custom armor textures: here's how it works. (yeah I know it's kinda sketchy)
bool bl_setArmorTexture(int, std::string const&);
// you should use the above, but if you really need it:
bool bl_setArmorTexture(int, mce::TexturePtr*);
void init() {
Item* orangePeel = new ArmorItem("orangePeel", 3777 - 0x100, *(static_cast<ArmorItem*>(Item::mItems[310])->armorMaterial),
42 /* special render type */, (ArmorSlot)0);
if (!bl_setArmorTexture(3777, "mob/zombie.png")) {
// failed to set armor texture :(
}
}
For a sample addon that defines an armor item, see https://github.com/zhuowei/MCPELauncher-addons/commit/9bd9bac5d7d1f4abe97f3b28779b30e696d2923a
Thanks to @jose-vm for the suggestion.