» » 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 [718 b]

Recommend:

Nhutan (Today, 17:23)
Group: Guest
hay day


Name:*
E-Mail:
Comment:
Bold Italic Underline Strike | Align left Center Align right | Insert smilies Insert link URLInsert protected URL Select color | Add Hidden Text Insert Quote Convert selected text from selection to Cyrillic (Russian) alphabet Insert spoiler
Enter the two words shown in the image: *
Up © 2017 Copyright. For-Minecraft.com