28 lines
655 B
Markdown
28 lines
655 B
Markdown
# IScriptFactory — giriş
|
|
|
|
[← IScriptFactory](index.md) · [← Master](../../wiki.md)
|
|
|
|
mchorse.mappet.api.scripts.user
|
|
|
|
Interface IScriptFactory
|
|
|
|
public interface IScriptFactory
|
|
|
|
Scripting API factory that allows to initialize/create different stuff.
|
|
|
|
You can access it in the script as mappet global variable. Here is a code example:
|
|
|
|
function main(c) {
|
|
// Create a diamond hoe using Mappet's factory
|
|
var item = mappet.createItem("minecraft:diamond_hoe");
|
|
|
|
c.getSubject().setMainItem(item);
|
|
}
|
|
|
|
|
|
Method Summary
|
|
All Methods Instance Methods Abstract Methods Default Methods
|
|
|
|
Modifier and
|
|
Type Method and Description
|