«    April 2024    »
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930 
April 2024 (26)
March 2024 (25)
February 2024 (20)
January 2024 (18)
December 2023 (19)
November 2023 (34)
 
For-Minecraft.com » Mods for Minecraft Pocket Edition » ToolLib API - Creating Your Own Tools for IC Mods
1

ToolLib API - Creating Your Own Tools for IC Mods




At the moment when you have played enough industrial mods and want to create something of your own, ToolLib will help you with this. This library allows you to create your own unique tools working in the Inner Core environment. If you have an interesting idea and you need to add a customized set of tools, here is a small script where there are variables.

By: abdulla000n

ToolLib API - Creating Your Own Tools for IC Mods

Import:
importLib("ToolLib", "*");

Lesson: How to create a tool?:

ToolLIB.register({
params: {
uid: "tool ID",
name: "tool name",
textures: {
name: "texture"
meta: the index number, if 0 is not necessary.
}
},
localize: {
ru: "name (for Russian localization"
},
funcs: {
prototype: {
damage:tool damage,
blockTypes: ["material ID"]
},
material: "tool material",
isTool: holding in hand,
enchantType: enchant.
}
});

The prototype has other methods: destroyBlock, useItem, modifilyEnchant etc.

[spoiler:Example:]

ToolLIB.register({
params: {
uid: "darkSteelPickaxe",
name: "Dark Steel Pickaxe",
textures: {
name: "darkSteel_pickaxe"
}
},
localize: {
ru: "darkSteel_pickaxe"
},
funcs: {
prototype: {
damage: 2,
blockTypes: ["stone", "dirt"]
},
material: "darkSteel",
isTool: true,
enchantType: Native.EnchantType.pickaxe
}
});


If you make an addon to some IC mod that already has the library, then it is enough to import it. You can see the example above or Ender IO PE tools.

How to install the ToolLib API?


1. For stable operation, you need to download and install Inner Core.
2. After installation, move "ToolLib.js" from the archive to games/com.mojang/mods/mod_name/lib/.


Download ToolLib API - Creating Your Own Tools for IC Mods


Recommend:

Nhutan (13 December 2017 17:23)
Group: Guest
hay day


Name:*
E-Mail:
Captcha: *
Up © 2024 For-Minecraft.com