Repository navigation
Main Namespace
Mrkwtkr edited this page Apr 16, 2018
·
3 revisions
function addItemInventory(id, amount, damage);
- This adds any amount of any item/block to the player's inventory
- (Integer)
id: The data value of the desired item/block - (Integer)
amount: The amount of the item/block you want to add - (Integer)
damage: The damage value of the item/block
function setMobSkin(entity, image);
- This sets the image of any entity
- An image found in the assets folder of the Minecraft Pocket Edition archive can be used as the parameter
image - (Entity)
entity: The desired entity that will have its skin changed - (String)
image: The image that the entity will use as its skin
function bl_spawnMob(x, y, z, typeId, image);
- Deprecated (shows toast/clientMessage "Nag: update to Level.spawnMob"), use Level.spawnMob instead
- This can spawn any entity found in Minecraft Pocket Edition, specified by the entity ID, at the specified x, y, and z coordinates
- An image found in the assets folder of the Minecraft Pocket Edition archive can be used as the parameter
image - (Number)
x, y, z: The desired coordinates of where the entity will be placed - (Integer)
typeId: The entity ID of the entity you want to spawn - (String)
image: The image that the entity will use as its skin
function clientMessage(text);
- This displays the specified text in the chat
- (String)
text: The text that should be displayed
function explode(x, y, z, radius);
- This causes an explosion, where the centre is at the specified x, y and z coordinates
- The size of the explosion is based upon the specified radius
- The parameters
xyzradiusaccept a number - (Number)
x, y, z: The coordinates of the centre of the explosion - (Number)
radius: The radius of the explosion
function getCarriedItem();
- This returns the data value of the item/block the player is currently holding
- Accepts no parameters
function getLevel();
- No information available
function getPitch(entity);
- This returns the entity's current pitch (up/down head rotation)
- Highest and lowest values are 90 and -90 respectively
- If no parameter is specified, it will default to the player
- (Entity)
entity: The target entity that holds the pitch value
function getPlayerEnt();
- This returns the player's native entity ID
- Accepts no parameters
function getPlayerX();
- This returns the player's current x coordinate
- Accepts no parameters
function getPlayerY();
- This returns the player's current y coordinate
- Accepts no parameters
function getPlayerZ();
- This returns the player's current z coordinate
- Accepts no parameters
function getTile(x, y, z);
- This returns the data value of the block at the specified coordinates
- (Integer)
x, y, z: The desired coordinates to get the block ID
function getYaw(entity);
- This returns the entity's current yaw (left/right head rotation)
- Has an infinite highest and lowest value
- If no parameter is specified, this will default to the player
- (Entity)
entity: The target entity that holds the yaw value
function preventDefault();
- This prevents the default response of the action from occuring
- Accepts no parameters
function print(text);
- This displays the specified text as a pop-up toast message
- (String)
text: The text to show on the pop-up toast
function rideAnimal(rider, target);
- This makes the
riderride the target - (Entity)
rider: The entity that will ride the target - (Entity)
target: The entity that will be ridden by the rider
function setNightMode(isNight);
- No information available
function setPosition(entity, x, y, z);
- This sets the location of the specified entity to the specified coordinates
- If attackHook is not used, getPlayerEnt() can be used as the entity parameter
- (Entity)
entity: The target entity that will be teleported - (Number)
x, y, z: The desired coordinates of which the entity will be teleported to
function setPositionRelative(entity, x, y, z);
- This sets the location of the specified entity relative to the current coordinates
- If attackHook is not used, getPlayerEnt() should be used as the
entityparameter - (Entity)
entity: The target entity that will be teleported - (Number)
x, y, z: The desired relative coordinates of which the entity will be teleported to
function setRot(entity, yaw, pitch);
- This sets the rotation of the specified entity's head to the specified yaw and pitch
- If attackHook is not used, getPlayerEnt() should be used as the entity parameter
- (Entity)
entity: The target entity that will have its head rotation modified - (Number)
yaw, pitch: The desired yaw and pitch of the entity
function setTile(x, y, z, blockId, damage);
- This sets the specified Block ID at the specified x, y, and z coordinates
- (Integer)
x, y, z: The desired coordinates to change the block - (Integer)
blockId: The desired ID of the block it will be changed to - (Integer)
damage: The desired damage value of the new block
function setVelX(entity, velocity);
- This sets the x velocity of the specified entity
- (Entity)
entity: The desired entity to have its velocity modified - (Number)
velocity: The desired strength of the entity's velocity
function setVelY(entity, velocity);
- This sets the y velocity of the specified entity
- (Entity)
entity: The desired entity to have its velocity modified - (Number)
velocity: The desired strength of the entity's velocity
function setVelZ(entity, velocity);
- This sets the z velocity of the specified entity
- (Entity)
entity: The desired entity to have its velocity modified - (Number)
velocity: The desired strength of the entity's velocity
function spawnCow(x, y, z, image);
- This spawns a cow at the specified x, y, and z coordinates
- An image found in the assets folder of the Minecraft Pocket Edition archive can be used as the parameter image
- Returns the entity spawned
- (Number)
x, y, z: The desired coordinates of where the cow will be spawned - (String)
image: The skin that the cow will use
function spawnChicken(x, y, z, image);
- This spawns a chicken at the specified x, y, and z coordinates
- An image found in the assets folder of the Minecraft Pocket Edition archive can be used as the parameter image
- Returns the entity spawned
- (Number)
x, y, z: The desired coordinates of where the chicken will be spawned - (String)
image: The skin that the chicken will use
function spawnPigZombie(x, y, z, heldItemId, image);
- This spawns a zombie pigman at the specified x, y, and z coordinates
- Accepts a data value for the heldItemId parameter
- An image found in the assets folder of the Minecraft Pocket Edition archive can be used as the parameter image
- Returns the entity spawned
- (Number)
x, y, z: The desired coordinates of where the pigman will be spawned - (Integer)
heldItemId: The ID of the desired item/block the pigman will hold - (String)
image: The skin that the pigman will use
addItemInventory(id, amount, damage);
bl_setMobSkin(entity, skin);
bl_spawnMob(x, y, z, typeId, skin);
clientMessage(text);
explode(x, y, z, radius);
getCarriedItem();
getLevel();
getPitch(entity);
getPlayerEnt();
getPlayerX();
getPlayerY();
getPlayerZ();
getTile(x, y, z);
getYaw(entity);
preventDefault();
print(text);
rideAnimal(rider, mount);
setNightMode(isNight);
setPosition(entity, x, y, z);
setPositionRelative(entity, x, y, z);
setRot(entity, yaw, pitch);
setTile(x, y, z, id, damage);
setVelX(entity, amount);
setVelY(entity, amount);
setVelZ(entity, amount);
spawnChicken(x, y, z, skin);
spawnCow(x, y, z, skin);
spawnPigZombie(x, y, z, itemId, skin);