Block Launcher For Mcpe
If you have any ideas for new Functions and Hooks put them here : https://github.com/Anonymous52/Function-and-Hook-Suggestions/wiki
######Here is a list of all the ModPE Scripts functions available on BlockLauncher:
######Hook functions are to be defined by the script, Get functions are used in a script and they return a datum, and others are run in the script.
#Contents
- [Hook Functions] (#hook-functions)
- [Text Functions] (#text-functions)
- [GET Functions] (#get-functions)
- [SET Functions] (#set-functions)
- [Spawn Functions] (#spawn-functions)
- [Miscellaneous Functions] (#miscellaneous-functions)
- [BlockLauncher-only functions] (#blocklauncher-only-functions)
- [Object-Orientated Functions] (#object-orientated-functions)
- [ModPE] (#modpe)
- [Level] (#level)
- [Player] (#player)
- [Entity] (#entity)
- [Block] (#block)
- [Renderer] (#renderer)
- [Item] (#item)
In a commit previously, entities are no longer passed in objects of NativeEntity but in entity ids.
Function | If it is on this Wiki | Parameters (String = text, int = integer, float & double = decimal number, NativeEntity = local specified entity, boolean = true/false, null = no parameters) | Returns |
---|---|---|---|
addItemInventory | Yes | int itemId, int count, int damage | null |
bl_setMobSkin | Yes | NativeEntity entity, String url | null |
bl_spawnMob | Yes | float x, float y, float z, int entityType, String skinUrl | NativeEntity for the spawned mob |
clientMessage | Yes | String message | null |
explode | Yes | float x, float y, float y, float radius | null |
getCarriedItem | Yes | null | id of the carried item |
getLevel | No | null | |
getPitch | Yes | null | pitch of player |
getPlayerEnt | Yes | null | NativeEntity for the player |
getPlayerX | Yes | null | the player's x-axis location |
getPlayerY | Yes | null | the player's y-axis location |
getPlayerZ | Yes | null | the player's z-axis location |
getTile | Yes | int x, int y, int z | id of the block at (x,y,z) |
getYaw | Yes | null | yaw of player |
preventDefault | Yes | null | null |
Yes | String message | null | |
rideAnimal | Yes | NativeEntity rider, NativeEntity mount | null |
setNightMode | Yes | boolean isNight | null |
setPosition | Yes | NativeEntity entityToMove, double x, double y, double z | null |
setPositionRelative | Yes | NativeEntity entity, double x, double y, double z | null |
setRot | Yes | NativeEntity entity, double yaw, double pitch | null |
setTile | Yes | int x, int y, int z, int blockId, int damage | null |
setVelX | Yes | NativeEntity ent, double amount | null |
setVelY | Yes | NativeEntity ent, double amount | null |
setVelZ | Yes | NativeEntity ent, double amount | null |
spawnChicken | Yes | double x, double y, double z (texture not supported in BlockLauncher) | NativeEntity for the spawned chicken |
spawnCow | Yes | double x, double y, double z (texture not supported in BlockLauncher) | NativeEntity for the spawned cow |
spawnPigZombie | Yes | double x, double y, double z , int item (texture not supported in BlockLauncher) | NativeEntity for the spawned zombie pigzombie |
ModPE.joinServer | Yes | String serverAddress, int port | |
ModPE.langedit | No | String option, String data | null |
ModPE.leaveGame | Yes | null | null |
ModPE.log | No | String | |
ModPE.overrideTexture | Yes | String filepath, String url | null |
ModPE.readData | Yes | String dataName | data of dataName |
ModPE.removeData | Yes | String dataName | null |
ModPE.resetImages | Yes | null | null |
ModPE.saveData | Yes | String dataName, String dataValue | null |
ModPE.selectLevel | Yes | String levelDir, String levelName, String levelSeed, int gamemode | null |
ModPE.setFoodItem | Yes | int unusedId, int itemPngY, int itemPnX, int halfhearts, String name | null |
ModPE.setGameSpeed | Yes | double ticksPerSecond (default is 20) | null |
ModPE.setGuiBlocks | Yes | String url | null |
ModPE.setItem | Yes | int unusedId, int itemPngY, int itemPngX, String newName | null |
ModPE.setItems | Yes | String url | null |
ModPE.setTerrain | Yes | String url | null |
ModPE.takeScreenshot | Yes | String fileName | |
Item.addCraftRecipe | Yes | int id, int count, int damage, Array ingredients | null |
Item.addFurnaceRecipe | Yes | int id, int damage, int inputid | null |
Item.addShapedRecipe | Yes | int id, int count, int damage, Array ingredients | null |
Item.setCategory | Yes | int id, itemCategory | null |
Item.setEnchantType | Yes | int id, type, int value | null |
Level.addParticle | No | int particleType, double x, double y, double z, double velX, double velY, double velZ, double size | null |
Level.destroyBlock | Yes | int x, int y, int z, boolean shouldDrop | null |
Level.dropItem | No | double x, double y, double z, double range, int id, int count, int damage | NativeEntity for the dropped item |
Level.explode | Yes | double x, double y, double z, double radius | null |
Level.getAddress | No | null | (nobody knows) |
Level.getChestSlot | No | int x, int y, int z, int slot | id of item at slot slot in chest at (x,y,z), or null/0 if not a chest |
Level.getChestSlotCount | No | int x, int y, int z, int slot | count of item at slot slot in chest at (x,y,z), or null/0 if not a chest |
Level.getChestSlotData | No | int x, int y, int z, int slot | damage value of item at slot slot in chest at (x,y,z), or null/0 if not a chest |
Level.getData | Yes | int x, int y, int z | damage value of block at (x,y,z) |
Level.getGameMode | Yes | null | 0 or 1 for survival or creative |
Level.getSignText | No | int x, int y, int z, int line | sign text at line line at (x,y,z), or '/null/0 if not a sign |
Level.getTile | Yes | int x, int y, int z | id of block (x,y,z) |
Level.getTime | No | null | time (with reference to PocketInvEditor 'Edit World Info') |
Level.getWorldDir | Yes | null | directory name of world |
Level.getWorldName | Yes | null | name of world |
Level.playSound | Yes | double x, double y, double z, String sound, double volume, double pitch | null |
Level.playSoundEnt | Yes | NativeEntity ent, String sound, double volume, double pitch | null |
Level.setChestSlot | Yes | int x, int y, int z, int slot, int id, int damage, int amount | null |
Level.setGameMode | Yes | int gameMode | null |
Level.setNightMode | Yes | boolean | null |
Level.setSignText | No | int x, int y, int z, int line, String text | null |
Level.setSpawn | No | int x, int y, int z | null |
Level.setTile | Yes | int x, int y, int z, int id | null |
Level.setTime | No | int time | null |
Level.spawnChicken | Yes | double x, double y, double z, String texture | NativeEntity for spawned chicken |
Level.spawnCow | Yes | double x, double y, double z, String texture | NativeEntity for spawned cow |
Level.spawnMob | No | double x, double y, double z, int EntityId, String texture | NativeEntity for spawned mob |
Level.getBrightness | No | int x, int y, int z | Brightness at position (x,y,z) |
Player.addItemCreativeInv | Yes | int id, int amount, int damage | null |
Player.addItemInventory | Yes | int id, int amount, int damage | null |
Player.clearInventorySlot | No | int slot | null |
Player.getArmorSlot | No | int slot | id of armor at slot slot |
Player.getArmorSlotDamage | No | int slot | damage value of armor at slot slot |
Player.getCarriedItem | Yes | null | id of holding item |
Player.getCarriedItemCount | No | null | count of holding item |
Player.getCarriedItemData | No | null | damage value of holding item |
Player.getEntity | Yes | null | getPlayerEnt() |
Player.getInventorySlot | No | int slot | id of item in player inventory slot slot |
Player.getInventorySlotCount | No | int slot | count of item in player inventory slot slot |
Player.getInventorySlotData | No | int slot | damage value of item in player inventory slot slot |
Player.getPointedBlockId | No | null | |
Player.getSelectedSlotId | No | null | |
Player.getX | Yes | null | player's x-axis |
Player.getY | Yes | null | player's y-axis |
Player.getZ | Yes | null | player's z-axis |
Player.setCanFly | Yes | int | Player will able to fly |
Player.setArmorSlot | No | int slot, int id, int damage | null |
Player.setHealth | No | int halfhearts | null |
Entity.addEffect | Yes | NativeEntity animal, int EffectId, int duration, int amplification, boolean ambient, boolean showParticles | null |
Entity.getAnimalAge | Yes | NativeEntity animal | animal age |
Entity.getEntityTypeId | Yes | NativeEntity animal | type id of animal, with reference to http://minecraftwiki.net/wiki/Data_values_(Pocket_Edition) |
Entity.getHealth | No | NativeEntity animal | half-hearts of animal |
Entity.getPitch | Yes | NativeEntity animal | pitch of animal |
Entity.getX | Yes | NativeEntity animal | animal x-axis |
Entity.getY | Yes | NativeEntity animal | animal y-axis |
Entity.getYaw | Yes | NativeEntity animal | animal yaw |
Entity.getZ | Yes | NativeEntity animal | animal z-axis |
Entity.remove | Yes | NativeEntity animal | null |
Entity.rideAnimal | Yes | NativeEntity rider, NativeEntity mount | null |
Entity.setAnimalAge | Yes | NativeEntity animal, int age (Age ranges from -24000 to 0 | null |
Entity.setCarriedItem | Yes | NativeEntity ent, int id, int count, int damage | null |
Entity.setFireTicks | No | NativeEntity ent, int howLong (seconds) | null |
Entity.setHealth | No | NativeEntity ent, int halfhearts | null |
Entity.setMobSkin | No | NativeEntity entity, String texture | null |
Entity.setPosition | Yes | NativeEntity ent, double x, double y, double z | null |
Entity.setPositionRelative | Yes | NativeEntity ent, double x, double y, double z | null |
Entity.setRenderType | Yes | NativeEntity ent, int renderType, with reference to https://github.com/Connor4898/ModPE-Scripts/wiki/Render-types | null |
Entity.setRot | Yes | NativeEntity ent, double yaw, double pitch | null |
Entity.setVelX | Yes | NativeEntity ent, double amount | null |
Entity.setVelY | Yes | NativeEntity ent, double amount | null |
Entity.setVelZ | Yes | NativeEntity ent, double amount | null |
Entity.spawnMob | Yes | double x, double y, double z, int EntityId, String texture | NativeEntity of spawned mob |
Entity.setNameTag | Yes | EntityId, name | null |
Block.defineBlock | Yes | int id, String name, String texture, int materialSourceId, boolean opaque, int render type | null |
Block.setShape | Yes | int id, double x1, double y1, double z1, double x2, double y2, double z2 | null |
Block.setColor | Yes | int id, array htmlColor | null |
Block.setDestroyTime | Yes | int id, double time | null |
Block.setExplosionResistance | Yes | int id, double resistance | null |
Block.setLightLevel | Yes | int id, int level | null |
Block.setLightOpacity | Yes | int id, int darkness | null |
Block.setRenderLayer | Yes | int id, int renderLayer | null |
#Hook Functions#####These functions are used to execute other functions when certain actions are performed
###useItem
- This executes a specified function when an item is used, or when a block is tapped
- This can be used to find out:
- On which block an item was used on
- The item's ID
- The block's ID
- On which side of the block the item was used
- The item's Damage/Data/Durability
- The block's Damage/Data
- The parameters
x, y, z, itemId, blockId, side, itemDamage, blockDamage
accept numbers
example:
###attackHook
- This executes a specified function when the player taps or attacks another mob
- This can be used to execute functions on the player, as well as the victim
- The parameters
attacker, victim
accept a native entity
example:
###modTick
- This can be used for executing timed functions
- This executes a specified function once every twentienth of a second (20 times per second)
- Accepts no parameters
- preventDefault() in this hook is useless
example:
###procCmd
- This executes the specified command when something is entered into the chat
example:
###newLevel and leaveGame
- preventDefault() in these two hooks is useless
- This executes the specified function when the world starts generating
- Accepts no parameters
example:
- This executes the specified function when the player leaves the world
- Accepts no parameters
example:
###entityAdded and entityRemoved
- This hook is called when a new entity is added.
- Also includes arrows and falling blocks.
example:
- This hook is called when an entity despawns or dies.
example:
###deathHook
- This hook is called when a mob dies.
- Both parameters are NativeEntity.
example:
###levelEvent and blockEvent
- Called when a door is opened or closed.
- The first parameter is equal to getPlayerEnt();
- All other parameters are int.
- Called every three seconds for chests to announce their opened/closed state.
- All parameters are int.
Note: if you are adding a BlockLauncher-specific method, please add it to one of the namespaces (Entity, Level, ModPE, Player) instead of the top-level namespace.
#Text Functions#####These functions are used to display text###print
- This displays the specified text as a pop-up toast message
- The parameter
text
accepts a string
###clientMessage
- This displays the specified text in the chat
- The parameter
text
accepts a string
#GET Functions#####These functions are used to get specified information, and do not make on screen changes###getPlayerX, getPlayerY, getPlayerZ
- This gets the player's current X, Y and Z coordinate
- Accepts no parameters
###getPlayerEnt
- This gets the player's native entity ID
- Accepts no parameters
###getYaw and getPitch
- These functions get values from the player's head rotation in degrees
- This gets the entity's current yaw (left/right head rotation)
- Has an infinite highest and lowest value
- The parameter
ent
accepts a native entity - If no parameter is specified, this will default to the player
- This gets the entities's current pitch (up/down head rotation)
- Highest and lowest values are 90 and -90 respectively
- The parameter
ent
accepts a native entity - If no parameter is specified, this will default to the player
###getGamemode
- Gets the world gamemode
- The parameter 'gamemode' accepts a number
- Returns a string
###getCarriedItem
- This gets the Data Value of the item or block the player is currently holding
- Accepts no parameters
###getTile
- This gets the data value of the block at the specified coordinates
- The parameters
x, y, z
accept a number
#SET Functions#####These functions are used to set information and values###setPosition
- This sets the location of the specified entity to the specified coordinates
- The parameter
ent
accepts a native entity - The parameters
x, y, z
accept a number - If attackHook is not used, getPlayerEnt() can be used as the ent parameter
###setPositionRelative
- This sets the location of the specified entity relative to the current coordinates.
- The parameter
ent
accepts a native entity - The parameters
x, y, z
accept a number - If attackHook is not used, getPlayerEnt() should be used as the ent parameter
###setRot
- This sets the rotation of the specified entity's head to the specified yaw and pitch
- The parameter
ent
accepts a native entity - The parameters
yaw, pitch
accept a number - If attackHook is not used, getPlayerEnt() should be used as the ent parameter
###setVelX, setVelY, setVelZ
- This sets the X, Y, and Z velocities of the specified entity (respectively)
- The parameter
ent
accepts a native entity - The parameter
velocity
accepts a number - If attackHook is not used, getPlayerEnt() should be used as the ent parameter
###setGamemode
- Changes the player gamemode
###setTile
- This sets the specified Block ID at the specified X, Y, and Z coordinates
- The parameters
x, y, z, blockID, damageValue
accept a number
###setPlayerHealth
- This sets the specified health of the player
- The parameter
halfHearts
accepts a number
#Spawn Functions#####These are functions used to spawn entities###spawnCow, spawnChicken, and spawnPigZombie
- These spawn a cow or 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'
- The parameters
x, y, z
accept a number - The parameter
image
accepts a string - Returns the entity spawned
- 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'
- The parameters
x, y, z, heldItemID
accept a number - The parameter
image
accepts a string - Returns the entity spawned
#Miscellaneous Functions#####These are functions that don't fit in other categories, and are more random than other functions###explode
- 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 raduis
- The parameters
x, y, z, radius
accept a number
###rideAnimal
- This makes the player ride the target mob
- The parameters
player, target
accept a native entity
###addItemInventory
- This adds the specified amount of the specified item/block to the player's inventory
- The parameters
ID, amount, damageValue
accept a number
###preventDefault
- This prevents the default response of the action from occuring
- Accepts no parameters
#BlockLauncher-only Functions#####These functions are only available on BlockLauncher, and can be identified by the bl_
before the function name###bl_spawnMob
- Deprecated (shows toast/clientMessage 'Nag: update to Level.spawnMob'), use Level.spawnMob instead
- This can spawn any mob found in Minecraft Pocket Edition, specified by the mobID, 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
- The parameters
x, y, z, mobID
accept a number - The parameter
image
accepts a string
###bl_setMobSkin
- This sets the image of the specified mob
- An image found in the assets folder of the Minecraft Pocket Edition archive can be used as the parameter
image
- If getPlayerEnt is not used, [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook) must be used
- The parameter
mob
accepts a native entity - The parameter
image
accepts a string
#Object-Orientated Functions##ModPE###leaveGame
- Quits to the title screen. (warning: your script will cease to execute one tick later)
- Accepts no parameters
###overrideTexture
- This overrides the specified target texture, and replaces it with the desired texture
- Not implemented in BlockLauncher as of version 1.4.5
###readData
- This returns the value of the specified key, created by saveData
- This was bl_readData before BlockLauncher 1.4.5
- The parameter
key
accepts a string
###removeData
- Removes data stored with ModPE.saveData
- The parameter
key
accepts a string
###resetImages
- Resets all textures and images to their defaults
- Accepts no parameters
###saveData
- This function can save any data
- Can be recalled by using the key on readData
- The parameters
key, value
accept a string - This was bl_saveData before BlockLauncher 1.4.5
###setItem
- This is used to create new, custom textured items, with custom names
- The texture's parameter use MCPE texture names, and is used to create the texture of the new item, based upon the items_opaque.png file
###setFoodItem
- This is used to create new, custom textured food items, with custom names
- The parameters
ID, imageX, imageY, halfHeartsHealed
accept a number - The parameter
name
accepts a string - Only works on BlockLauncher 1.4.5 and later
###addCraftRecipe
- This is used to add new crafting recipes
- The last parameter is an array of input materials.
- Only works on BlockLauncher 1.6.7 beta 2 and later
- Named ModPE.addCraftRecipe() In 1.6.7 beta 2
example:
###addShapedRecipe
- This is used to add new shaped crafting recipes
- Only works on BlockLauncher 1.7.1 or later
example:
###addFurnaceRecipe
- This is used to add new smelting recipes
- You can only specify item id in input (no damage)
- Only works on BlockLauncher 1.6.7 beta 2 and later
- Called ModPE.addFurnaceRecipe() Prior From 1.6.8+
example:
###setCategory
- This is used to set the category the item appears in when the crafting table user interface appears.
- Item categories are ints but you should use the static constants from the ItemCategory class instead.
- ItemCategory.INTERNAL (int -1), ItemCategory.MATERIAL (int 1), ItemCategory.TOOL (int 2), ItemCategory.FOOD (int 4) or ItemCategory.DECORATION (int 8).
- ItemCategory class found here https://github.com/zhuowei/MCPELauncher/blob/master/src/net/zhuoweizhang/mcpelauncher/ItemCategory.java
example:
###setGuiBlocks, setItems, setTerrain
- This overrides the current texture with the specified one.
- Must be a HTTP URL to a .png file
- Not implemented in BlockLauncher as of version 1.4.5
- Only Blocklauncher pro users can use these functions.
###joinServer
- This lets you join a server at any time.
- Type in the Port and IP and make it push and you will be put on the specified server.
###setGameSpeed
- Set the ticks in a second.
- The default is 20 ticks per second.
- Using this will reduce the time modTick() takes to push a function.
- This will speed up everything in the game when ticks are more than 20.
###takeScreenshot
- Take a screenshot using BlockLauncher's screenshot feature.
- The fileName parameter lets you change what you want the screenshot name to be.
##Level
###getGamemode
- This is the same as [
function getGamemode
]
###explode
- This is the same as [
function explode
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#explode)
###getTile
- This is the same as [
function getTile
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#gettile)
###Level.playSound
- Plays a sound
- 'sound' accepts any of the sounds from this list of sounds
- 'volume' accepts a number
- 'pitch' accepts a number
example:
###Level.playSoundEnt
- Plays a sound around an entity
- 'ent' accepts a Native entity id
###getData
- This gets the damage value of the block at the specified coordinates
- The parameters
x, y, z
accept a number
###getWorldDir
- This returns the name of the folder which stores the world files
- This was named bl_getWorldDir before BlockLauncher 1.4.5
###getWorldName
- This returns the world name stored in the world files
- Accepts no parameters
- This was named bl_getWorldName before BlockLauncher 1.4.5
###setChestSlot
- All the parameters are integers.
###setTile
- This is the same as [
function setTile
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#settile)
###spawnChicken and spawnCow
- This is the same as [
function spawnChicken
andfunction spawnCow
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#spawncow-spawnchicken-and-spawnpigzombie)
###destroyBlock
- Executes exactly the same as the player long-click a block except that there is no progress circle. Particles are also shown.
- The first 3 parameters are integers.
- shouldDropItem is boolean (true/false)
##Player###addItemInventory
- This is the same as [
function addItemInventory
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#additeminventory)
###getCarriedItem
- This is the same as [
function getCarriedItem
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#getcarrieditem)
###getEntity
- This is the same as [
function getPlayerEnt
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#getplayerent)
###getX, getY, and getZ
- These are the same as [
function getPlayerX
,function getPlayerY
, andfunction getPlayerZ
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#getplayerx-getplayery-getplayerz)
###addItemCreativeInv
- This is the exact same as Player.addItemInventory, except it adds items to the creative inventory.
###setCanFly
- Set Player to able to flying or not
- 1 To Able , 0 to Disable
###setInventorySlot
- Sets the contents of the player's specified inventory slot.
Example:
###enchant
- Tries to add an enchantment to the item held in
slot
. Returns true if the enchantment is added; false if the enchantment is incompatible with the item in the slot.
Example:
List of enchantments:
- Enchantment.PROTECTION
- Enchantment.FIRE_PROTECTION
- Enchantment.FEATHER_FALLING
- Enchantment.BLAST_PROTECTION
- Enchantment.PROJECTILE_PROTECTION
- Enchantment.THORNS
- Enchantment.RESPIRATION
- Enchantment.AQUA_AFFINITY
- Enchantment.DEPTH_STRIDER
- Enchantment.SHARPNESS
- Enchantment.SMITE
- Enchantment.BANE_OF_ARTHROPODS
- Enchantment.KNOCKBACK
- Enchantment.FIRE_ASPECT
- Enchantment.LOOTING
- Enchantment.EFFICIENCY
- Enchantment.SILK_TOUCH
- Enchantment.UNBREAKING
- Enchantment.FORTUNE
- Enchantment.POWER
- Enchantment.PUNCH
- Enchantment.FLAME
- Enchantment.INFINITY
- Enchantment.LUCK_OF_THE_SEA
- Enchantment.LURE
###getEnchantments
- Returns an array of the enchantments on the item in the slot, or null if there is no item in that slot.
- Each item contains two attributes: type (equal to one of the Enchantment.* constants) and level (the level of the enchantment)
Example:
###getItemCustomName
- Returns the custom name of the item in the specified slot of the player's inventory, or null if there is no custom name set on the item.
Example:
###setItemCustomName
- Sets a custom name on the item in the specified slot of the player's inventory.
Example:
##Entity
###Entity.setNameTag
- Set Name Tag in Entites/Mobs Head
###getAnimalAge
- This returns the specified mob's age
- Ranges from -24000 to 0, where -24000 is a 'baby' mob, and 0 is an 'adult' mob
- Must be used with [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook), as the player's age is always 0
###setAnimalAge
- This sets the specified animal's age
- Does not work with hostile mobs, or the player
###getEntityTypeId
- This returns the specified mob's entity ID
- Must be used with [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook)
###getPitch and getYaw
- This is the same as [
function getPitch
andfunction getYaw
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#getyaw-and-getpitch) respectively
###getX, getY, and getZ
- These functions return the X, Y, and Z coordinates of the specified entity
- Must be used with [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook)
###remove
- This removes the specified entity
- Must be used with [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook)
- If the player is removed, the player turns invisible, and cannot move
- The parameter
ent
accepts a native entity - This was bl_removeEntity before BlockLauncher 1.4.5
###rideAnimal
- This is the same as [
function rideAnimal
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#rideanimal)
###setCarriedItem
- Only the player, skeletons and zombie pigmen can be used for the ent parameter
- Must be used with [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook), unless the the specified ent is the player
- Parameter 3,
int
, is unknown
###setPosition and setPositionRelative
- These are the same as [
function setPosition
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#setposition-2) and [function setPositionRelative
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#setpositionrelative-2) respectively
###setRot
- This is the same as [
function setRot
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#setrot)
###setVelX, setVelY, and setVelZ
- These are the same as [
function setVelX
,function setVelY
andfunction setVelZ
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#setvelx-setvely-setvelz) respectively
###spawnMob
- This is the same as [
function bl_spawnMob
] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#bl_spawnmob) - This has been moved again (sorry!) to Level.spawnMob. This still works, however, this variant of spawnMob will be removed soon.
setRenderType
Lets you use a different model for the mob passed in, for mob disguise.
Must be used with [attackHook] (https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List#attackhook), unless the the specified ent is the player or an entity returned from the spawning methods.
For a list of render types, see the current list of known render types.
addEffect
Adds a potion effect to the given mob. Entity passed in must be a mob.
Duration is in ticks - so if you want 30 seconds, put in 30*20 or 600 ticks
* Example:
- The list of valid potion effect IDs:
removeEffect
- Removes a potion effect from a mob.
removeAllEffects
- Removes all potion effects from a mob.
##Block
defineBlock
- Creates a custom block with textures and lots of special options with it.
- The parameter id lets you choose the custom block id, with maximum of 255.
- The parameter 'name' is what you want the item name, although it must be in a string (' ').
- 'texture' lets you choose the texture for the block. To see all the MCPE texture names go to Zhuowei's list of MCPE's texture names.
- The texture can be also put in an array, formatted like this:
- If you wanted to use a type texture, it's simple! Just put an array into the 'texture' param and do the array like this: ['texture name',type]. It's that simple!
- materialSourceId doesn't really work. If it is not set it will not drop anything when the block is broken but nothing really happens (the noise always is walk over stone but all that will happen I believe is that it will become easier to break with axes for example.
- The opaque parameter is simple, if it is set to false, then in the inventory it will be displayed as transparent. If true though, then it will have blackness when held.
- The render types are used to render the block, but something annoying is: the block will still be (in shape) rendered as a full block. If you want to know the render types, go to the render type list and scroll down to block render types.
setShape
- Sets the shape of a block.
- The id parameter lets you specify which block.
- Use all the x,y,z parameters to show shape.
setColor
- Sets the color of a block in HTML.
- id is used to pick the block.
- To set the color, 1. Use an array like this: [] 2. Use 0x instead of # 3. Only use 6 letters/numbers for the HTML color. Example:
setDestroyTime
- Sets the destroy time of a block.
- Does not use seconds per 1 in time.If you need to know the destroy times on blocks in Minecraft, go to the list of block destroy times.
setExplosionResistance
- Sets the explosive resistance of a block.
- In resistance, the resistance you put in, will be the exact same.
- The resistance is measured in how many explosions.
- So for example if you had 15 as it then 15 tnt explosions would destroy it.
setLightLevel
- Changes how much light the block can dispense.
- The maximum is 15 in the level parameter.
- 15 is glowstone brightness and 10 is the brightness of redstone torches.
setLightOpacity
- Changes how much light can pass through the block.
- The maximum is 10 in the darkness parameter.
- 0 is the most amount of light can pass through and 10 is the least amount of light that can pass through.
setRenderLayer
- Sets transparency on blocks.
- Render layer 1 is transparent.
- Render layer 2 is translucent.
- Render layer 0 is opaque.
##Renderer###get
Returns the renderer object with the given render type.
###createHumanoidRenderer
Creates a new render type with a human model.
Methods and propertes on renderer objects
###renderType
A read-only variable holding the render type ID for this renderer.
###model
A read-only variable holding the model object for this renderer.
Methods and properties on model objects
###getPart
Gets the model part by that given name. Currently defined names as of BlockLauncher 1.6.10:
- head
- body
- leftArm
- rightArm
- leftLeg
- rightLeg
Methods and properties on modelPart objects
This API was designed to resemble the Desktop Edition's ModelRenderer object, so documentation on that would help here.
setTextureOffset
Sets the location on the skin file where the texture of this model part should be read from.
addBox
Adds a new box onto the model part.
clear
Removes (clears) a model part.
setTextureSize
setRotationPoint
Sets the point in which the model part rotates from.
##Item
###setEnchantType
- Allows custom items to be enchanted in the enchantment table
- id: the item ID
- type: the type of enchantments supported; one of the EnchantType.* constants
- value: how valuable are the enchantments; usually 1 (a negative or zero value disables enchantment)
- Note: this only works for custom items and blocks.
List of EnchantTypes:
- EnchantType.weapon
- EnchantType.bow
- EnchantType.hoe
- EnchantType.shears
- EnchantType.flintAndSteel
- EnchantType.axe
- EnchantType.pickaxe
- EnchantType.shovel
- EnchantType.fishingRod
- EnchantType.book
Example:
Example:
ON JELLY BEAN, NORMAL MINECRAFT PE TEXTURES CANNOT BE ACCESSED BY THIS APPLICATION! A demonstration texture pack has been provided.THIS APPLICATION IS INCOMPATIBLE WITH SOME SAMSUNG DEVICES! Devices with Samsung Knox or other security solutions may not be able to utilize the live patching and the ModPE Script Runtime of BlockLauncher. Patching .mod-formatted patches and texture packs still work. A fix is being worked on.
BlockLauncher is a custom Minecraft PE launcher that wraps around Minecraft PE and provides loading of patches, texture packs, and mods.
(formerly known as MCPELauncher)
Just choose Options on the main screen, then select mods. It is that easy!
THIS MAY NOT WORK ON ALL DEVICES! If it crashes with your device, please post on the forum thread with your device model and your operating system version for support.
THIS APP REQUIRES THE FULL VERSION OF MINECRAFT PE TO RUN. The demo version or the J version is not supported.
This program loads libminecraftpe.so from the currently installed copy of Minecraft PE, so it should be compatiable with the mod patching features of PocketTool and QuickPatch.
Jelly Bean users: currently, this application cannot load original textures from copies of Minecraft installed by Google Play on Android 4.1 and above. The built-in texture pack will be used.
Features:
- Patch up to 3 patches
- Test the texture pack support with the built-in RepetiCraft texture pack