org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: The item icon black_material_sword:0 does not exist (FirstMod.js#10)
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(FirstMod.js:10)
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:252)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.IllegalArgumentException: The item icon black_material_sword:0 does not exist
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeModPEApi.setItem(ScriptManager.java:2735)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
... 11 more
I have already added the texture to the items-opaque and changed the items.meta.
I am also really want to know how to add new block texture and why when I use my weapons to kill a mob, it doesn't drop anything????
Thank you a lot for your helps!
And I also want to know why the shaped recipes don't work???
i know functions i need for now i said that i dont want to use item opaque and in modpe ModPE.setItems("location of items paque") this i wanna use extracted txture and i dont know ow that works i tried but false. tools nothing i have that fixed
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
is that from xp chest mod, i dont know but stay away
Guys can someone help me with my mods gui, but block gui like furnace okay? if you have that exp. then contact to me with private message...
its really important becouse 50% of my mod is on that block and gui , the block is called freezer and i wanna remake it becouse we cant get that kinda inventory it mcpe so heper needed.
I am not sure what this function does (I think it returns the dimensions of the display multiplied with one variable of the mod and the parameter of the function and that this function is used to find the correct size of the GUI, dp could mean dip2px), but as it is a part of the Exp-Chest-Mod you should not copy it!
If you want to make GUI you can look here, there is also a dip2px(dips)-function, it should work, too: https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
I am not sure what this function does (I think it returns the dimensions of the display multiplied with one variable of the mod and the parameter of the function and that this function is used to find the correct size of the GUI, dp could mean dip2px), but as it is a part of the Exp-Chest-Mod you should not copy it!
If you want to make GUI you can look here, there is also a dip2px(dips)-function, it should work, too: https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
Okay, Can U Help Me Make Custom GUI Block Like Furnace , But Its Called Freezer And My Mod Needs It, Also I Need To Make It Like Furnace Like Theres two Inputs And One Fuel Bar But Fuels Are ICE, SNOW AND SNOWBALL And Its Crazy Mod Lol I Know Its Hard But I Have 3 Days Left Only, I Need To Complete It And Can U Make It PE Like Ill Send Picture... Thanks
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
Okay, Can U Help Me Make Custom GUI Block Like Furnace , But Its Called Freezer And My Mod Needs It, Also I Need To Make It Like Furnace Like Theres two Inputs And One Fuel Bar But Fuels Are ICE, SNOW AND SNOWBALL And Its Crazy Mod Lol I Know Its Hard But I Have 3 Days Left Only, I Need To Complete It And Can U Make It PE Like Ill Send Picture... Thanks
You could make a GUI with pictures to make it look like a PE-GUI and when you click on a slot of the furnace (a button) it searches the inventory of the Player for the item, but that is not easy, you should try to make something like that (maybe you add images later) on your own first.
---
You know what loops are (for, while, do-while)? You need for-loops to search the inventory of the Player.
You could make a GUI with pictures to make it look like a PE-GUI and when you click on a slot of the furnace (a button) it searches the inventory of the Player for the item, but that is not easy, you should try to make something like that (maybe you add images later) on your own first.
---
You know what loops are (for, while, do-while)? You need for-loops to search the inventory of the Player.
IIm Not In GUI But Ill Send That PC GUI Pic, I Have No Idea How To Remake It To PE Or To Make GUI Block, Its Really Hard For Me, Im Makeing Armor Define And That Kinda Stuff
ATTACHMENTS
freezerGUI
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
Does Anyone Know How To Create Custom Crop And Growing Time, Like Wheat ? AND To Get Seeds Like Wheat And Breaking Grass, If You Guys Know 5That Help Me, I Need To Make One Funny Mod, Its Funny
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
Ok 1 Q Again, So If We Make Custom Item Pickaxe And Its Better Then Diamond, How To Break Ore Faster
Anyone help me please!!!
I'm new to modding MCPE and I am trying to make something like blocks, materials, weapons and something moreeeee...
My code is like this:
//**THIS MOD WAS MADE BY SilverHaing!**\\
//ITEMS
ModPE.setItem(500, "diamond_battle_axe",0, "Diamond Battle Axe");
ModPE.setItem(498, "black_material_sword",0, " Black Material Sword");
ModPE.setItem(499, "black_material",0,"Black Material");
Item.setMaxDamage(500, 1500);
Item.setMaxDamage(498, 1500);
//ORE BLOCK
Block.defineBlock(255," Black Material Ore"," black_material_ore");
Block.setDestroyTime(255,5);
Block.setLightLevel(255, 5);
Block.setLightOpacity(255, 1);
//CREATIVE INVENTORY
Player.addItemCreativeInv(500, 1,0);
Player.addItemCreativeInv(498, 1,0);
Player.addItemCreativeInv(255, 1,0);
Player.addItemCreativeInv(499, 1,0);
Item.setCategory(500, ItemCategory.TOOL);
Item.setCategory(498, ItemCategory.TOOL);
Item.setCategory(255, ItemCategory.TOOL);
Item.setCategory(499, ItemCategory.TOOL);
//SHAPE / CRAFT / FURNACE RECIPE
Item.addShapedRecipe(500,1,0,[
"aaa",
"aba",
" b "],["a",264,0,"b",280,0]);
Item.addShapedRecipe(498,1,0,[
" a ",
"aaa",
" b "],["a", 499,0,"b", 280,0]);
Item.addFurnaceRecipe(499,1,0, [255,1,0]);
//JOIN / LEAVE GAME
function newLevel(){
print("Logging in...");
clientMessage(ChatColor.GREEN+"Welcome Player");
}
function leaveGame(){
print("Logged Out");
}
//ATTACK
function attackHook(attacker, victim){
if(Player.getCarriedItem()==500){
if(Player.getCarriedItemData() < 1500){
Entity.setCarriedItem(attacker, 500,Player.getCarriedItemCount(),Player.getCarriedItemData()+1);
}
else {
Level.playSoundEnt(attacker, "random.break", 100, 100);
Player.clearInventorySlot(Player.getSelectedSlotId());
}
Entity.setHealth(victim,Entity.getHealth(victim) - 15);
Entity.setFireTicks(10);
}
}
function attackHook(attacker, victim){
if(Player.getCarriedItem()==498){
if(Player.getCarriedItemData() < 1500){
Entity.setCarriedItem(attacker, 501,Player.getCarriedItemCount(),Player.getCarriedItemData()+1);
}
else {
Level.playSoundEnt(attacker, "random.break", 100, 100);
Player.clearInventorySlot(Player.getSelectedSlotId());
}
Entity.setHealth(victim,Entity.getHealth(victim) - 16);
}
}
//DEATH / DROP
function deathHook(attacker,victim)
{
if(mob==victim)
{
Level.dropItem(Entity.getX(victim), Entity.getY(victim), Entity.getZ(victim), 1, ItemID, ammount, damage);
}
}
And the error is like this:
org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: The item icon black_material_sword:0 does not exist (FirstMod.js#10)
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(FirstMod.js:10)
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:252)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.IllegalArgumentException: The item icon black_material_sword:0 does not exist
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeModPEApi.setItem(ScriptManager.java:2735)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
... 11 more
I have already added the texture to the items-opaque and changed the items.meta.
I am also really want to know how to add new block texture and why when I use my weapons to kill a mob, it doesn't drop anything????
Thank you a lot for your helps!
And I also want to know why the shaped recipes don't work???
Very very very sorry about my bad English.
The texture black_material_sword doesn´t exist. You have to make a texture pack with this texture and import the texture pack first and then the mod.
See here: https://github.com/zhuowei/MCPELauncher/wiki/Texture-packs
I would go for something simple. Though if you were to add multiple tools you would need to go about it differently.
Single tool:
MultipleTools:
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
Can you help me with my mod because I don't get anything, pls help me, I Have big problems...Texture pack and tools and etc.
If You Have kik or gmail
Does anyone know how to create an automatic silk touch pickaxe using ModPE?
What Do You Mean ? Like Modded Pick? I thinks thats posible, but I dont know that
Like whe n you craft it you dont need enchantment its alrady silktouch
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
Try using this GitHub Page because it says what each function is and what you need to do to make it work. https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List
i know functions i need for now i said that i dont want to use item opaque and in modpe ModPE.setItems("location of items paque") this i wanna use extracted txture and i dont know ow that works i tried but false. tools nothing i have that fixed
I want to use minecraft gui style in my mod
But i dont understand how to use
Because the functions is hard
(Crop function- set layout function- button function &....)
Plz give me a library to use the mcpe gui style in my mod
Im have question again
Look to this function
function dp(pixels){
return android.util.TypedValue.applyDimension(android.util.TypedValue.COMPLEX_UNIT_DIP,2,ctx.getResources().getDisplayMetrics())*pixels*ExpChest.data.guiSize;
}
Expchest.data.guisize = 1
What is function work?
What is dp?
is that from xp chest mod, i dont know but stay away
Guys can someone help me with my mods gui, but block gui like furnace okay? if you have that exp. then contact to me with private message...
its really important becouse 50% of my mod is on that block and gui , the block is called freezer and i wanna remake it becouse we cant get that kinda inventory it mcpe so heper needed.
I am not sure what this function does (I think it returns the dimensions of the display multiplied with one variable of the mod and the parameter of the function and that this function is used to find the correct size of the GUI, dp could mean dip2px), but as it is a part of the Exp-Chest-Mod you should not copy it!
If you want to make GUI you can look here, there is also a dip2px(dips)-function, it should work, too: https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
Okay, Can U Help Me Make Custom GUI Block Like Furnace , But Its Called Freezer And My Mod Needs It, Also I Need To Make It Like Furnace Like Theres two Inputs And One Fuel Bar But Fuels Are ICE, SNOW AND SNOWBALL And Its Crazy Mod Lol
You could make a GUI with pictures to make it look like a PE-GUI and when you click on a slot of the furnace (a button) it searches the inventory of the Player for the item, but that is not easy, you should try to make something like that (maybe you add images later) on your own first.
---
You know what loops are (for, while, do-while)? You need for-loops to search the inventory of the Player.
IIm Not In GUI But Ill Send That PC GUI Pic, I Have No Idea How To Remake It To PE Or To Make GUI Block, Its Really Hard For Me, Im Makeing Armor Define And That Kinda Stuff
Ok but why dip and not pixel?
And how to stretch button image from texture pack use this?
(Sorry for copy function from exp-chest mod but I really need to tell my question)
(I creating a mod and I want include mcpe style gui in this mod)
Does Anyone Know How To Create Custom Crop And Growing Time, Like Wheat ? AND To Get Seeds Like Wheat And Breaking Grass, If You Guys Know 5That Help Me, I Need To Make One Funny Mod, Its Funny