Function List - Red-Eagle-Reborn/ModPE-Wiki GitHub Wiki

ModPE Function List


###ModPE ModPE.langEdit(namaLang, namaItem)
Mengedit Nama sebuah item
Contoh :
ModPE.langEdit("item.potato.name","Kentang");
Nama Lang bisa ditemukan di dalam apk mcpe, lang_en.blabla kalau ga salah itu nama filenya

ModPE.leaveGame()
Force / memaksa player keluar dari world.

ModPE.log(message)
Mengirim log / message ke client game, tetapi tidak di output seperti clientMessage, peggunaan tidak diketahui

ModPE.overrideTexture(folderTexture, urlTexture)
Mendownload texture, atau istilahnya memakai mod yg memerlukan texture tanpa memasang texture, texturenya otomatis dari mod.
Contoh :
ModPE.overrideTexture("images/mob/babycreeper.png","https://dl.dropboxusercontent.com/s/uvwjqtxjflyp7s7/babycreeper.png?dl=0")

ModPE.readData(key)
Membaca bekas savean ModPE.saveData, parameter key adalah key yang kamu st di ModPE.saveData.
Contoh :

var exp = 0;
ModPE.saveData("jumlahExp",exp); // nama data, variable exp
ModPE.readData("jumlahExp");

ModPE.removeData(key)
Meremove Data yang sudah disave oleh ModPE.saveData(key);

ModPE.resetFov()
Mereset fov yang sudah di set menjadi fov awal atau default, FOV = zoom in, pembesaran.

ModPE.resetImages()
Tidak Diketahui Cara Penggunaanya dan Apa Gunanya

ModPE.saveData(key, varOrDataName)
Mengesave var atau data, contoh ada di atas bagian ModPE.readData(key).

ModPE.selectLevel(namaWorld)

  • ModPE.setCamera(par1int);
  • ModPE.setFoodItem(par1int, par2String, par3int, par4int, par5String, par6int);
  • ModPE.setFov(par1double);
  • ModPE.setGameSpeed(par1double);
  • ModPE.setGuiBlocks(par1String);
  • ModPE.setItem(par1int, par2String, par3int, par4String, par5int);
  • ModPE.setItems(par1String);
  • ModPE.setTerrain(par1String);
  • ModPE.showTipMessage(par1String);
  • ModPE.takeScreenshot(par1String);

Level


  • Level.addParticle(par1int, par2double, par3double, par4double, par5double, par6double, par7double, par8int);
  • Level.destroyBlock(par1int, par2int, par3int, par4boolean);
  • Level.dropItem(par1double, par2double, par3double, par4double, par5int, par6int, par7int);
  • Level.explode(par1double, par2double, par3double, par4double);
  • Level.getAddress();
  • Level.getBrightness(par1int, par2int, par3int);
  • Level.getChestSlot(par1int, par2int, par3int, par4int);
  • Level.getChestSlotCount(par1int, par2int, par3int, par4int);
  • Level.getChestSlotData(par1int, par2int, par3int, par4int);
  • Level.getData(par1int, par2int, par3int);
  • Level.getFurnaceSlot(par1int, par2int, par3int, par4int);
  • Level.getFurnaceSlotCount(par1int, par2int, par3int, par4int);
  • Level.getFurnaceSlotData(par1int, par2int, par3int, par4int);
  • Level.getGameMode();
  • Level.getSignText(par1int, par2int, par3int, par4int);
  • Level.getTile(par1int, par2int, par3int);
  • Level.getTime();
  • Level.getWorldDir();
  • Level.getWorldName();
  • Level.playSound(par1double, par2double, par3double, par4String, par5double, par6double);
  • Level.playSoundEnt(par1int, par2String, par3double, par4double);
  • Level.setChestSlot(par1int, par2int, par3int, par4int, par5int, par6int, par7int);
  • Level.setFurnaceSlot(par1int, par2int, par3int, par4int, par5int, par6int, par7int);
  • Level.setGameMode(par1int);
  • Level.setNightMode(par1boolean);
  • Level.setSignText(par1int, par2int, par3int, par4int, par5String);
  • Level.setSpawn(par1int, par2int, par3int);
  • Level.setTile(par1int, par2int, par3int, par4int, par5int);
  • Level.setTime(par1int);
  • Level.spawnChicken(par1double, par2double, par3double, par4String);
  • Level.spawnCow(par1double, par2double, par3double, par4String);
  • Level.spawnMob(par1double, par2double, par3double, par4int, par5String);

Player


  • Player.addItemCreativeInv(par1int, par2int, par3int);
  • Player.addItemInventory(par1int, par2int, par3int);
  • Player.clearInventorySlot(par1int);
  • Player.getArmorSlot(par1int);
  • Player.getArmorSlotDamage(par1int);
  • Player.getCarriedItem();
  • Player.getCarriedItemCount();
  • Player.getCarriedItemData();
  • Player.getEntity();
  • Player.getInventorySlot(par1int);
  • Player.getInventorySlotCount(par1int);
  • Player.getInventorySlotData(par1int);
  • Player.getName(par1int);
  • Player.getPointedBlockData();
  • Player.getPointedBlockId();
  • Player.getPointedBlockSide();
  • Player.getPointedBlockX();
  • Player.getPointedBlockY();
  • Player.getPointedBlockZ();
  • Player.getPointedEntity();
  • Player.getSelectedSlotId();
  • Player.getX();
  • Player.getY();
  • Player.getZ();
  • Player.isPlayer(par1int);
  • Player.setArmorSlot(par1int, par2int, par3int);
  • Player.setHealth(par1int);

Entity


  • Entity.getAll();
  • Entity.getAnimalAge(par1int);
  • Entity.getEntityTypeId(par1int);
  • Entity.getHealth(par1int);
  • Entity.getMobSkin(par1int);
  • Entity.getNameTag(par1int);
  • Entity.getPitch(par1int);
  • Entity.getRenderType(par1int);
  • Entity.getRider(par1int);
  • Entity.getRiding(par1int);
  • Entity.getUniqueId(par1int);
  • Entity.getVelX(par1int);
  • Entity.getVelY(par1int);
  • Entity.getVelZ(par1int);
  • Entity.getX(par1int);
  • Entity.getY(par1int);
  • Entity.getYaw(par1int);
  • Entity.getZ(par1int);
  • Entity.remove(par1int);
  • Entity.rideAnimal(par1int, par2int);
  • Entity.setAnimalAge(par1int, par2int);
  • Entity.setCarriedItem(par1int, par2int, par3int, par4int);
  • Entity.setFireTicks(par1int, par2int);
  • Entity.setHealth(par1int, par2int);
  • Entity.setMobSkin(par1int, par2String);
  • Entity.setNameTag(par1int, par2String);
  • Entity.setPosition(par1int, par2double, par3double, par4double);
  • Entity.setPositionRelative(par1int, par2double, par3double, par4double);
  • Entity.setRenderType(par1int, par2int);
  • Entity.setRot(par1int, par2double, par3double);
  • Entity.setSneaking(par1int, par2boolean);
  • Entity.setVelX(par1int, par2double);
  • Entity.setVelY(par1int, par2double);
  • Entity.setVelZ(par1int, par2double);
  • Entity.spawnMob(par1double, par2double, par3double, par4int, par5String);

Item


  • Item.addCraftRecipe(par1int, par2int, par3int, par4Scriptable);
  • Item.addFurnaceRecipe(par1int, par2int, par3int);
  • Item.addShapedRecipe(par1int, par2int, par3int, par4Scriptable, par5Scriptable);
  • Item.getName(par1int, par2int, par3boolean);
  • Item.setCategory(par1int, par2int, par3int);
  • Item.setMaxDamage(par1int, par2int);

Block

  • Block.defineBlock(par1int, par2String, par3Object, par4Object, par5Object, par6Object);
  • Block.getRenderType(par1int);
  • Block.setColor(par1int, par2Scriptable);
  • Block.setDestroyTime(par1int, par2double);
  • Block.setExplosionResistance(par1int, par2double);
  • Block.setLightLevel(par1int, par2int);
  • Block.setRenderLayer(par1int, par2int);
  • Block.setRenderType(par1int, par2int);
  • Block.setShape(par1int, par2double, par3double, par4double, par5double, par6double, par7double);

Server


  • Server.getAddress();
  • Server.getAllPlayerNames();
  • Server.getAllPlayers();
  • Server.getPort();
  • Server.joinServer(par1String, par2int);
  • Server.sendChat(par1String);

Others


  • addItemInventory(par1int, par2int, par3int);
  • bl_setMobSkin(par1int, par2String);
  • bl_spawnMob(par1double, par2double, par3double, par4int, par5String);
  • clientMessage(par1String);
  • explode(par1double, par2double, par3double, par4double);
  • getCarriedItem();
  • getLevel();
  • getPitch(par1Object);
  • getPlayerEnt();
  • getPlayerX();
  • getPlayerY();
  • getPlayerZ();
  • getTile(par1int, par2int, par3int);
  • getYaw(par1Object);
  • preventDefault();
  • print(par1String);
  • rideAnimal(par1int, par2int);
  • setNightMode(par1boolean);
  • setPosition(par1int, par2double, par3double, par4double);
  • setPositionRelative(par1int, par2double, par3double, par4double);
  • setRot(par1int, par2double, par3double);
  • setTile(par1int, par2int, par3int, par4int, par5int);
  • setVelX(par1int, par2double);
  • setVelY(par1int, par2double);
  • setVelZ(par1int, par2double);
  • spawnChicken(par1double, par2double, par3double, par4String);
  • spawnCow(par1double, par2double, par3double, par4String);
  • spawnPigZombie(par1double, par2double, par3double, par4int, par5String);
⚠️ **GitHub.com Fallback** ⚠️