4/15/2019»»Monday

Block Launcher For Mcpe

4/15/2019
    49 - Comments

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.

FunctionIf it is on this WikiParameters (String = text, int = integer, float & double = decimal number, NativeEntity = local specified entity, boolean = true/false, null = no parameters)Returns
addItemInventoryYesint itemId, int count, int damagenull
bl_setMobSkinYesNativeEntity entity, String urlnull
bl_spawnMobYesfloat x, float y, float z, int entityType, String skinUrlNativeEntity for the spawned mob
clientMessageYesString messagenull
explodeYesfloat x, float y, float y, float radiusnull
getCarriedItemYesnullid of the carried item
getLevelNonull
getPitchYesnullpitch of player
getPlayerEntYesnullNativeEntity for the player
getPlayerXYesnullthe player's x-axis location
getPlayerYYesnullthe player's y-axis location
getPlayerZYesnullthe player's z-axis location
getTileYesint x, int y, int zid of the block at (x,y,z)
getYawYesnullyaw of player
preventDefaultYesnullnull
printYesString messagenull
rideAnimalYesNativeEntity rider, NativeEntity mountnull
setNightModeYesboolean isNightnull
setPositionYesNativeEntity entityToMove, double x, double y, double znull
setPositionRelativeYesNativeEntity entity, double x, double y, double znull
setRotYesNativeEntity entity, double yaw, double pitchnull
setTileYesint x, int y, int z, int blockId, int damagenull
setVelXYesNativeEntity ent, double amountnull
setVelYYesNativeEntity ent, double amountnull
setVelZYesNativeEntity ent, double amountnull
spawnChickenYesdouble x, double y, double z (texture not supported in BlockLauncher)NativeEntity for the spawned chicken
spawnCowYesdouble x, double y, double z (texture not supported in BlockLauncher)NativeEntity for the spawned cow
spawnPigZombieYesdouble x, double y, double z , int item (texture not supported in BlockLauncher)NativeEntity for the spawned zombie pigzombie
ModPE.joinServerYesString serverAddress, int port
ModPE.langeditNoString option, String datanull
ModPE.leaveGameYesnullnull
ModPE.logNoString
ModPE.overrideTextureYesString filepath, String urlnull
ModPE.readDataYesString dataNamedata of dataName
ModPE.removeDataYesString dataNamenull
ModPE.resetImagesYesnullnull
ModPE.saveDataYesString dataName, String dataValuenull
ModPE.selectLevelYesString levelDir, String levelName, String levelSeed, int gamemodenull
ModPE.setFoodItemYesint unusedId, int itemPngY, int itemPnX, int halfhearts, String namenull
ModPE.setGameSpeedYesdouble ticksPerSecond (default is 20)null
ModPE.setGuiBlocksYesString urlnull
ModPE.setItemYesint unusedId, int itemPngY, int itemPngX, String newNamenull
ModPE.setItemsYesString urlnull
ModPE.setTerrainYesString urlnull
ModPE.takeScreenshotYesString fileName
Item.addCraftRecipeYesint id, int count, int damage, Array ingredientsnull
Item.addFurnaceRecipeYesint id, int damage, int inputidnull
Item.addShapedRecipeYesint id, int count, int damage, Array ingredientsnull
Item.setCategoryYesint id, itemCategorynull
Item.setEnchantTypeYesint id, type, int valuenull
Level.addParticleNoint particleType, double x, double y, double z, double velX, double velY, double velZ, double sizenull
Level.destroyBlockYesint x, int y, int z, boolean shouldDropnull
Level.dropItemNodouble x, double y, double z, double range, int id, int count, int damageNativeEntity for the dropped item
Level.explodeYesdouble x, double y, double z, double radiusnull
Level.getAddressNonull(nobody knows)
Level.getChestSlotNoint x, int y, int z, int slotid of item at slot slot in chest at (x,y,z), or null/0 if not a chest
Level.getChestSlotCountNoint x, int y, int z, int slotcount of item at slot slot in chest at (x,y,z), or null/0 if not a chest
Level.getChestSlotDataNoint x, int y, int z, int slotdamage value of item at slot slot in chest at (x,y,z), or null/0 if not a chest
Level.getDataYesint x, int y, int zdamage value of block at (x,y,z)
Level.getGameModeYesnull0 or 1 for survival or creative
Level.getSignTextNoint x, int y, int z, int linesign text at line line at (x,y,z), or '/null/0 if not a sign
Level.getTileYesint x, int y, int zid of block (x,y,z)
Level.getTimeNonulltime (with reference to PocketInvEditor 'Edit World Info')
Level.getWorldDirYesnulldirectory name of world
Level.getWorldNameYesnullname of world
Level.playSoundYesdouble x, double y, double z, String sound, double volume, double pitchnull
Level.playSoundEntYesNativeEntity ent, String sound, double volume, double pitchnull
Level.setChestSlotYesint x, int y, int z, int slot, int id, int damage, int amountnull
Level.setGameModeYesint gameModenull
Level.setNightModeYesbooleannull
Level.setSignTextNoint x, int y, int z, int line, String textnull
Level.setSpawnNoint x, int y, int znull
Level.setTileYesint x, int y, int z, int idnull
Level.setTimeNoint timenull
Level.spawnChickenYesdouble x, double y, double z, String textureNativeEntity for spawned chicken
Level.spawnCowYesdouble x, double y, double z, String textureNativeEntity for spawned cow
Level.spawnMobNodouble x, double y, double z, int EntityId, String textureNativeEntity for spawned mob
Level.getBrightnessNoint x, int y, int zBrightness at position (x,y,z)
Player.addItemCreativeInvYesint id, int amount, int damagenull
Player.addItemInventoryYesint id, int amount, int damagenull
Player.clearInventorySlotNoint slotnull
Player.getArmorSlotNoint slotid of armor at slot slot
Player.getArmorSlotDamageNoint slotdamage value of armor at slot slot
Player.getCarriedItemYesnullid of holding item
Player.getCarriedItemCountNonullcount of holding item
Player.getCarriedItemDataNonulldamage value of holding item
Player.getEntityYesnullgetPlayerEnt()
Player.getInventorySlotNoint slotid of item in player inventory slot slot
Player.getInventorySlotCountNoint slotcount of item in player inventory slot slot
Player.getInventorySlotDataNoint slotdamage value of item in player inventory slot slot
Player.getPointedBlockIdNonull
Player.getSelectedSlotIdNonull
Player.getXYesnullplayer's x-axis
Player.getYYesnullplayer's y-axis
Player.getZYesnullplayer's z-axis
Player.setCanFlyYesintPlayer will able to fly
Player.setArmorSlotNoint slot, int id, int damagenull
Player.setHealthNoint halfheartsnull
Entity.addEffectYesNativeEntity animal, int EffectId, int duration, int amplification, boolean ambient, boolean showParticlesnull
Entity.getAnimalAgeYesNativeEntity animalanimal age
Entity.getEntityTypeIdYesNativeEntity animaltype id of animal, with reference to http://minecraftwiki.net/wiki/Data_values_(Pocket_Edition)
Entity.getHealthNoNativeEntity animalhalf-hearts of animal
Entity.getPitchYesNativeEntity animalpitch of animal
Entity.getXYesNativeEntity animalanimal x-axis
Entity.getYYesNativeEntity animalanimal y-axis
Entity.getYawYesNativeEntity animalanimal yaw
Entity.getZYesNativeEntity animalanimal z-axis
Entity.removeYesNativeEntity animalnull
Entity.rideAnimalYesNativeEntity rider, NativeEntity mountnull
Entity.setAnimalAgeYesNativeEntity animal, int age (Age ranges from -24000 to 0null
Entity.setCarriedItemYesNativeEntity ent, int id, int count, int damagenull
Entity.setFireTicksNoNativeEntity ent, int howLong (seconds)null
Entity.setHealthNoNativeEntity ent, int halfheartsnull
Entity.setMobSkinNoNativeEntity entity, String texturenull
Entity.setPositionYesNativeEntity ent, double x, double y, double znull
Entity.setPositionRelativeYesNativeEntity ent, double x, double y, double znull
Entity.setRenderTypeYesNativeEntity ent, int renderType, with reference to https://github.com/Connor4898/ModPE-Scripts/wiki/Render-typesnull
Entity.setRotYesNativeEntity ent, double yaw, double pitchnull
Entity.setVelXYesNativeEntity ent, double amountnull
Entity.setVelYYesNativeEntity ent, double amountnull
Entity.setVelZYesNativeEntity ent, double amountnull
Entity.spawnMobYesdouble x, double y, double z, int EntityId, String textureNativeEntity of spawned mob
Entity.setNameTagYesEntityId, namenull
Block.defineBlockYesint id, String name, String texture, int materialSourceId, boolean opaque, int render typenull
Block.setShapeYesint id, double x1, double y1, double z1, double x2, double y2, double z2null
Block.setColorYesint id, array htmlColornull
Block.setDestroyTimeYesint id, double timenull
Block.setExplosionResistanceYesint id, double resistancenull
Block.setLightLevelYesint id, int levelnull
Block.setLightOpacityYesint id, int darknessnull
Block.setRenderLayerYesint id, int renderLayernull

#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 and function 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, and function 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 and function 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 and function 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