Here are Soul Sand, Pumpkins, and Sponge added to MCPE, all running on new block IDs. This version of BlockLauncher has not been released yet to support custom blocks, so you'll have to compile the github source yourself to use these mods, But If you do so, enjoy
Here's the code:
function newLevel() { ModPE.defineBlock(23, "Sponge", [48, 48, 48, 48, 48, 48], false, 0); //48 is the location of spong on terrain.png read from //Left to right, top to bottom, like a book } function useItem(x, y, z, itemId, blockId) { Level.setTile(x, y + 1, z, 23, 0); //Set our block 1 block up }
WARNING: DO NOT ADD THE BLOCK TO YOUR INVENTORY IN SURVIVAL. YOUR GAME WILL CRASH INSTANTLY AND CORRUPT YOUR WORLD. ALSO, IF YOU USE Entity.setCarriedItem() TO ADD IT TO YOUR INVENTORY IN CREATIVE, DO NOT CHANGE OUT OF ITS SLOT THEN BACK ONTO IT, FOR SOME REASON DISPLAYING THE BLOCKS NAME WILL CRASH THE GAME
Anyway, this is the only method involving custom blocks, because it is an incomplete build of BlockLauncher(explaining the major bugs above) and Zhuowei will be adding a proper ModPE API soon. This is only used to really create some test blocks. Anyway, enjoy!
1
no problem with functions, but missing . after block, and I have to ask myself
"can block Id exceed 255? doesnt day have only 00 to ff?"
And I think no prob with ; cuz javascript will add it by it self,
and Im not sure he is meaning if itemId==255&&blockId==2
so I found two(blockId, missing.).
1
ah! tahts okay!
sorry for bad words lol
22
you can pick blocks, entities, and move them around.
5
1
pic.twitter.com/2vOMUXd2gc
pic.twitter.com/vQxfO6UurT
thats enough! dosent it!
Just ModPE script(well its kinddu fake)