I have this code that kills the player when he steps on a certain block.But I wanna make it to kill all the entity's not only the player.I been trying to figure out almost 1 day but it seems I can't make it.Can someone help me.Also
Merry Christmas to y'all
function modTick(){
if (Level.getTile(Player.getX(), Player.getY()-2,Player.getZ())== 159 && Level.getData(Player.getX(), Player.getY()-2,Player.getZ()) == 14)
Player.setHealth(0);
}
function modTick(){
if (Level.getTile(Player.getX(), Player.getY()-2,Player.getZ())== 159 && Level.getData(Player.getX(), Player.getY()-2,Player.getZ()) == 14){
menu = new android.widget.PopupWindow(menuLayout1, ctx.getWindowManager().getDefaultDisplay().getWidth()/2, ctx.getWindowManager().getDefaultDisplay().getHeight());
Hello! I've been working on this mod for over a year now (on and off), but I still can't figure out how to fix this issue:
org.mozilla.javascript.WrappedException: Wrapped java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to java.lang.Number (The Essentials v0.9.2 test 24-1.js#12)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.FunctionObject.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(The Essentials v0.9.2 test 24-1.js:12)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:253)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to java.lang.Number
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeItemApi.addShapedRecipe(ScriptManager.java:3045)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
... 11 more
If you would like to see the code, please go here. Thanks in advance.
What you did:
Item.addShapedRecipe("?", 461, 1, 0, ["bab","b b"," c "],["b", 337, 0,"a", 260, 0,"c", 280, 0]);
How it has to be:
Item.addShapedRecipe(461, 1, 0, ["bab","b b"," c "],["b", 337, 0,"a", 260, 0,"c", 280, 0]);
WellYeah , If I Can Help Stop Useing DroidEdit, Usse ModPE IDE Becouse U Can See All Functions, Hooks And Sounds Too,It Sais What U Add In Tjere Like Shaped Recipe Is Like This
Item.addShapedRecipe(id, count, damage,[recipe]);
THATS alll, its Simple
Rollback Post to RevisionRollBack
Hey, There
Check Out My YT Channel And Dont Forget To Subscribe
http://bit.ly/1oDas1b
Also I Have A Website, There Are Lots Of Things There
The Meaning of Life, the Universe, and Everything.
Join Date:
11/8/2015
Posts:
52
Member Details
Help me...
I tried to import this mod to BL but its error...
// --==MOD MADE USING MODEZ BY TEMENA==-- \\
//**DO NOT REDISTRIBUTE THIS MOD WITHOUT WRITTEN CONSENT FROM THE MAKER**\\
//**THIS MOD WAS MADE BY SilverHaing!**\\
Anyone care to explain what this means to me as I can't see the error in the code?
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object org.mozilla.javascript.Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)' on a null object reference (SoonToBeCommingModName.js#31)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.FunctionObject.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(SoonToBeCommingModName.js:31)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:253)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object org.mozilla.javascript.Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)' on a null object reference
at org.mozilla.javascript.ScriptableObject.getProperty(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeItemApi.addShapedRecipe(ScriptManager.java:3045)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
... 11 more
Anyone care to explain what this means to me as I can't see the error in the code?
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object org.mozilla.javascript.Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)' on a null object reference (SoonToBeCommingModName.js#31)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.FunctionObject.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(SoonToBeCommingModName.js:31)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:253)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object org.mozilla.javascript.Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)' on a null object reference
at org.mozilla.javascript.ScriptableObject.getProperty(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeItemApi.addShapedRecipe(ScriptManager.java:3045)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
... 11 more
Thiss Is Exmpl. Item.addShapedRecipe(id, count, damage/data,[
" d ",
" d ",
" s ",],["d", 57, 0, "s", 280, 0]):
"d" is Diamond Block And ID Is 57 A d "s" is Stick And ID Is280
Now See The Error And If Its Not That Then Send Me Mod
Rollback Post to RevisionRollBack
Hey, There
Check Out My YT Channel And Dont Forget To Subscribe
http://bit.ly/1oDas1b
Also I Have A Website, There Are Lots Of Things There
Quote from PikaCreeperBoy>> Thiss Is Exmpl. Item.addShapedRecipe(id, count, damage/data," d "," d "," s ",],["d", 57, 0, "s", 280, 0]):"d" is Diamond Block And ID Is 57 A d "s" is Stick And ID Is280. Now See The Error And If Its Not That Then Send Me Mod
Found it. Forgot to make one of the crafting ingredients actually exist. Had item ID and all planed out but forgot to add the actual item. Thanks.
function modTick(){
if (Level.getTile(Player.getX(), Player.getY()-2,Player.getZ())== 159 && Level.getData(Player.getX(), Player.getY()-2,Player.getZ()) == 14){
var ents=Entity.getAll();
for(var i=0;i<ents.length;i++){
Entitiy.setHealth(ents[i], 0);
}
}
}
i have prob with custom blocks and textures of it and armor tooo
im making mod and i need armor and ore now pls someone help
Example for armor:
https://github.com/zhuowei/ModPEScripts/blob/master/armortest.js
Ore-Spawn Tutorial:
http://www.minecraftforum.net/forums/minecraft-pocket-edition/mcpe-mods-tools/2560455-how-to-generate-random-ores-with-modpe-lagless-and
Hello Again, I Made Armor Work And Thanks. I Need Help From A Great Modder To Help Me With New Mod Im Making (Porting) Its Called WinterCraft
Its PC Mod That Adds Tons And Tons Of Christmas Stuff, I Have Textures Of Mobs, Armors And Items...
If You Can Help Me Just Send Your GMail With Private Message, Thanks.
Lol, /i dont know GUI but i have something and when u see problem help me...
Hello! I've been working on this mod for over a year now (on and off), but I still can't figure out how to fix this issue:
org.mozilla.javascript.WrappedException: Wrapped java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to java.lang.Number (The Essentials v0.9.2 test 24-1.js#12)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.FunctionObject.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(The Essentials v0.9.2 test 24-1.js:12)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:253)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassCastException: org.mozilla.javascript.UniqueTag cannot be cast to java.lang.Number
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeItemApi.addShapedRecipe(ScriptManager.java:3045)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
... 11 more
If you would like to see the code, please go here. Thanks in advance.
can u send me mod???
WellYeah , If I Can Help Stop Useing DroidEdit, Usse ModPE IDE Becouse U Can See All Functions, Hooks And Sounds Too,It Sais What U Add In Tjere Like Shaped Recipe Is Like This
Item.addShapedRecipe(id, count, damage,[recipe]);
THATS alll, its Simple
I Think
1. DONT ADD DESTROY TIME, thats my first thought
2. ADD DESTROY TIME Milion Or Something (Thats My Second Thought)
Block.setDestroyTime(Id, -1);
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
Help me...
I tried to import this mod to BL but its error...
// --==MOD MADE USING MODEZ BY TEMENA==-- \\
//**DO NOT REDISTRIBUTE THIS MOD WITHOUT WRITTEN CONSENT FROM THE MAKER**\\
//**THIS MOD WAS MADE BY SilverHaing!**\\
ModPE.setItem(500, "bede", 0, "Ultimate Sword");
Item.setMaxDamage(500, 50);
Item.addCraftRecipe(500, 1, 0 [0, 0, 264, 0, 276, 0, 264, 0, 0]);
Item.setCategory(500, ItemCategory.TOOL);
Player.addItemCreativeInv(500, 1, 0);
function attackHook(attacker, victim){
if(Player.getCarriedItem( ) == 500){
var dmg = 20;
Entity.setHealth(victim, Entity.getHealth(victim) - dmg);
}
}
oh ok then
Guys Can U Tell Me When We Do
Block.setDestroyTime(id, 25); It Will Take 25 Seconds Hand To Break Right?
Yes, 25 is the hardness of the block. It´ll take 25 seconds to be destroyed by hand, but only 12.5 with stone tools and so on, see here: http://minecraft.gamepedia.com/Hardness#speed and here: https://github.com/Connor4898/ModPE-Scripts/wiki/Custom-blocks
thanks bro i know that Exmpls
Hand - 24
Wood - 12
Stone - 6
Iron - 3
Diamond - 1.5
Gold - 1.2
Anyone care to explain what this means to me as I can't see the error in the code?
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object org.mozilla.javascript.Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)' on a null object reference (SoonToBeCommingModName.js#31)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.FunctionObject.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(SoonToBeCommingModName.js:31)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:253)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object org.mozilla.javascript.Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)' on a null object reference
at org.mozilla.javascript.ScriptableObject.getProperty(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeItemApi.addShapedRecipe(ScriptManager.java:3045)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
... 11 more
Thiss Is Exmpl. Item.addShapedRecipe(id, count, damage/data,[
" d ",
" d ",
" s ",],["d", 57, 0, "s", 280, 0]):
"d" is Diamond Block And ID Is 57 A d "s" is Stick And ID Is280
Now See The Error And If Its Not That Then Send Me Mod
No, this sets the blocks hardness. To calculate how long it will take to destroy it, you must do Hardness * 1.5
Next you check if you are using the correct tool, if not, multiply this by 3.33
Then you check if the player is in water or not on the ground. That would multiply by 5
With a hand and a destroy time of 25, it would take 37.5 seconds to destroy the block.
to take 25 seconds to destroy something just divide 25 by 1.5, which will give you 16.6
Hardness is not destroy time in seconds.
http://minecraft.gamepedia.com/Breaking
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
Found it. Forgot to make one of the crafting ingredients actually exist. Had item ID and all planed out but forgot to add the actual item. Thanks.
Error Said That It Was addShapedRecipe Nah I Kust Said That