35 lines
866 B
Markdown
35 lines
866 B
Markdown
# IScriptTileEntity — giriş
|
|
|
|
[← IScriptTileEntity](index.md) · [← Master](../../wiki.md)
|
|
|
|
mchorse.mappet.api.scripts.user.blocks
|
|
|
|
Interface IScriptTileEntity
|
|
|
|
public interface IScriptTileEntity
|
|
|
|
Tile entity interface.
|
|
|
|
This interface represents Minecraft tile entities, which are special kind of entities that exist within blocks (like crafting tables, chests,
|
|
furnance, etc.).
|
|
|
|
function main(c)
|
|
{
|
|
var te = c.getWorld().getTileEntity(371, 4, -100);
|
|
|
|
if (te.getId() === "mappet:region")
|
|
{
|
|
var data = te.getData();
|
|
|
|
// Replace on enter trigger of the tile entity to /toggledownfall
|
|
data.getCompound("Region").setNBT("OnEnter", '{Blocks:[{Command:"/toggledownfall",Type:"command"}]}');
|
|
te.setData(data);
|
|
}
|
|
}
|
|
|
|
|
|
Method Summary
|
|
All Methods Instance Methods Abstract Methods
|
|
|
|
Modifier and Type Method and Description
|