My friends asked me to make a small javascript mod that would let them appear in the mcpe game as mobs.
The idea was similar to the Steve mod so I figured it wouldn't be that difficult, but for some reason Blocklauncher gives me "failed to import patch" messages every time I try.
So, could anybody tell me what is wrong with the following script?
Script:
ModPE.setItem(339,"cookie",0,"Uneme Spawner");
ModPE.setItem(341,"slimeball",0,"Jun Spawner");
Item.addCraftRecipe(339, 1, 0[0, 0, 0, 3, 3, 3, 3, 17, 3, 3, 3, 3 ]);
Item.addCraftRecipe(341, 1, 0[0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3 ]);
function newLevel(){
}
print("Welcome to The Stupid People Spawner Mod");
function useItem (x,y,z,itemId,blockId,side)
{
if(itemId==341)
{
var jun = Level.spawnMob(x,y+1,z,11,"mob/Junboca.png");
Entity.setRenderType(jun,3);
Entity.setHealth(jun,5);
clientMessage("You have now spawned Junboca");
}
if(itemId==339)
{
var uneme = Level.spawnMob(x,y+1,z,11,"mob/Uneme.png");
Entity.setRenderType(uneme,3);
Entity.setHealth(uneme,5);
clientMessage("You have now spawned Uneme");
}
}
ModPE.setItem(339,"cookie",0,"Uneme Spawner");
ModPE.setItem(341,"slimeball",0,"Jun Spawner");
Item.addShapedRecipe(339, 1, 0,[iii,ihi,iii],[i,3,0,h,17,0]);
Item.addShapedRecipe(341, 1, 0,[iii,iii,iii],[i,3,0]);
function newLevel(){
print("Welcome to The Stupid People Spawner Mod");
}
function useItem (x,y,z,itemId,blockId,side)
{
if(itemId==341)
{
var jun = Level.spawnMob(x,y+1,z,11,"mob/Junboca.png");
Entity.setRenderType(jun,3);
Entity.setHealth(jun,5);
clientMessage("You have now spawned Junboca");
}
if(itemId==339)
{
var uneme = Level.spawnMob(x,y+1,z,11,"mob/Uneme.png");
Entity.setRenderType(uneme,3);
Entity.setHealth(uneme,5);
clientMessage("You have now spawned Uneme");
}
}
The idea was similar to the Steve mod so I figured it wouldn't be that difficult, but for some reason Blocklauncher gives me "failed to import patch" messages every time I try.
So, could anybody tell me what is wrong with the following script?
Script:
ModPE.setItem(339,"cookie",0,"Uneme Spawner");
ModPE.setItem(341,"slimeball",0,"Jun Spawner");
Item.addCraftRecipe(339, 1, 0[0, 0, 0, 3, 3, 3, 3, 17, 3, 3, 3, 3 ]);
Item.addCraftRecipe(341, 1, 0[0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3 ]);
function newLevel(){
}
print("Welcome to The Stupid People Spawner Mod");
function useItem (x,y,z,itemId,blockId,side)
{
if(itemId==341)
{
var jun = Level.spawnMob(x,y+1,z,11,"mob/Junboca.png");
Entity.setRenderType(jun,3);
Entity.setHealth(jun,5);
clientMessage("You have now spawned Junboca");
}
if(itemId==339)
{
var uneme = Level.spawnMob(x,y+1,z,11,"mob/Uneme.png");
Entity.setRenderType(uneme,3);
Entity.setHealth(uneme,5);
clientMessage("You have now spawned Uneme");
}
}
Thanks in advance.
Yuugen0127
|MCPE Modder, Mapmaker, Mediocre Skinmaker, Update Maniac, Problem-Solver, and Texture-Pack Beginner|
Biggest Update thread for MCPE 0.12.x :
http://www.minecraftforum.net/forums/minecraft-pocket-edition/mcpe-recent-upcoming-pe-updates/2436094-minecraft-pe-the-upcoming-0-12-0-minecraft-peits
Biggest Update thread for MCPE 0.13.0 :
http://www.minecraftforum.net/forums/minecraft-pocket-edition/mcpe-recent-upcoming-pe-updates/2504717-topic-updated-minecraft-pe-the-upcoming-0-13-0
Contact: @GenBrianSuzuki (Twitter), email address on request.
ModPE.setItem(341,"slimeball",0,"Jun Spawner");
Item.addShapedRecipe(339, 1, 0,[iii,ihi,iii],[i,3,0,h,17,0]);
Item.addShapedRecipe(341, 1, 0,[iii,iii,iii],[i,3,0]);
function newLevel(){
print("Welcome to The Stupid People Spawner Mod");
}
function useItem (x,y,z,itemId,blockId,side)
{
if(itemId==341)
{
var jun = Level.spawnMob(x,y+1,z,11,"mob/Junboca.png");
Entity.setRenderType(jun,3);
Entity.setHealth(jun,5);
clientMessage("You have now spawned Junboca");
}
if(itemId==339)
{
var uneme = Level.spawnMob(x,y+1,z,11,"mob/Uneme.png");
Entity.setRenderType(uneme,3);
Entity.setHealth(uneme,5);
clientMessage("You have now spawned Uneme");
}
}
Tap the link below to sub to my youtube channel:
https://m.youtube.com/channel/UCDPTTeHo67o7-mZiiGh_XKg?debug_prerolls=false&layout=mobile&tsp=1&utcoffset=480