77 lines
1.8 KiB
Markdown
77 lines
1.8 KiB
Markdown
# IScriptFactory.vector4
|
|
|
|
[← IScriptFactory](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 4/11 · [önceki](vector4-3.md) · [sonraki](vector4-5.md)
|
|
|
|
// {id:"minecraft:diamond",Count:64b,Damage:0s}
|
|
c.send(item.serialize());
|
|
|
|
|
|
Returns:
|
|
an item stack with an item specified by ID, or an empty item stack if the block doesn't exist
|
|
|
|
createItem
|
|
|
|
IScriptItemStack createItem(java.lang.String itemId,
|
|
int count,
|
|
int meta)
|
|
|
|
Create an item stack with item ID, count and meta
|
|
|
|
var damaged_hoe = mappet.createItem("minecraft:diamond_hoe", 64, 5);
|
|
|
|
// {id:"minecraft:diamond_hoe",Count:64b,Damage:5s}
|
|
c.send(damaged_hoe.serialize());
|
|
|
|
|
|
Returns:
|
|
an item stack with an item specified by ID, or an empty item stack if the block doesn't exist
|
|
|
|
createBlockItem
|
|
|
|
default IScriptItemStack createBlockItem(java.lang.String blockId)
|
|
|
|
Create an item stack with block ID.
|
|
|
|
var stone = mappet.createBlockItem("minecraft:stone");
|
|
|
|
// {id:"minecraft:stone",Count:1b,Damage:0s}
|
|
c.send(stone.serialize());
|
|
|
|
|
|
Returns:
|
|
an item stack with an item specified by ID, or an empty item stack if the block doesn't exist
|
|
|
|
createBlockItem
|
|
|
|
default IScriptItemStack createBlockItem(java.lang.String blockId,
|
|
int count)
|
|
|
|
Create an item stack with block ID and count.
|
|
|
|
var stone = mappet.createBlockItem("minecraft:stone", 64);
|
|
|
|
// {id:"minecraft:stone",Count:64b,Damage:0s}
|
|
c.send(stone.serialize());
|
|
|
|
|
|
Returns:
|
|
an item stack with an item specified by ID, or an empty item stack if the block doesn't exist
|
|
|
|
createBlockItem
|
|
|
|
IScriptItemStack createBlockItem(java.lang.String blockId,
|
|
int count,
|
|
int meta)
|
|
|
|
Create an item stack with block ID, count and meta.
|
|
|
|
var andesite = mappet.createBlockItem("minecraft:stone", 64, 5);
|
|
|
|
// {id:"minecraft:stone",Count:64b,Damage:5s}
|
|
c.send(andesite.serialize());
|
|
|
|
|
|
Returns:
|