Alright, jetpack is now up and running, starting to create some explosives and weapons of destruction. Drop a comment telling what u want us to add, THX
Hi there, I need a mod that I really like it. Make a plasma cannon mod that if you touch a block, it would explode like a tnt but in this mod, you'll just tap a block and it will explode, I think this is pretty hard but I think it would be great. And make a range up to infinite range, I mean you can explode blocks in far range. Thanks...
One of the features I am adding to Industrial PE, me and JV will work on it soon
I've been trying to get a GUI to pop up if the player is holding a custom item with the id of 504, and it would dismiss if the player is holding an other item, but everytime i switch to an item other then 504 an error pops up saying:
Error:
Error occurred in script: Industrialcraft.js
org.mozilla.javascript.WrappedException: Wrapped android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. (Industrialcraft.js#116)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script.modTick(Industrialcraft.js:116)
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.call(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.callScriptMethod(ScriptManager.java:233)
at net.zhuoweizhang.mcpelauncher.ScriptManager.tickCallback(ScriptManager.java:302)
at dalvik.system.NativeStart.run(Native Method)
Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4746)
at android.view.ViewRootImpl.doDie(ViewRootImpl.java:4084)
at android.view.ViewRootImpl.die(ViewRootImpl.java:4071)
at android.view.WindowManagerGlobal.removeViewLocked(WindowManagerGlobal.java:336)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:286)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84)
at android.widget.PopupWindow.dismiss(PopupWindow.java:1270)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
... 11 more
Code:
modTick(){
if (getCarriedItem()==504)
{
Test();
}
if(getCarriedItem()!=504&&TestGUI!=null){
TestGUI.dismiss();
}
}
function Test()
{
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function() { try{
TestGUI = new android.widget.PopupWindow();
var Testuplayout = new android.widget.RelativeLayout(ctx);
var TestUp = new android.widget.Button(ctx);
TestUp.setText("△");
TestUp.setTextSize(40);
TestUp.setOnClickListener(new android.view.View.OnClickListener(
{ onClick: function(viewarg) {
setVelY( getPlayerEnt() ,1);
if(Player.getCarriedItemData() < 299){ Entity.setCarriedItem(getPlayerEnt(), 504, Player.getCarriedItemCount(), Player.getCarriedItemData() + 1);}
else { //Otherwise
Level.playSoundEnt(attacker, "random.break", 100, 100); //Play the break sound
Player.clearInventorySlot(Player.getSelectedSlotId()); //Remove the tool from the player's inventory
}
0
0
One of the features I am adding to Industrial PE, me and JV will work on it soon
0
0
0
0
0
0
0
0
0
0
0
Error:
Error occurred in script: Industrialcraft.js
org.mozilla.javascript.WrappedException: Wrapped android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. (Industrialcraft.js#116)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.NativeJavaMethod.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script.modTick(Industrialcraft.js:116)
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.call(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.callScriptMethod(ScriptManager.java:233)
at net.zhuoweizhang.mcpelauncher.ScriptManager.tickCallback(ScriptManager.java:302)
at dalvik.system.NativeStart.run(Native Method)
Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:4746)
at android.view.ViewRootImpl.doDie(ViewRootImpl.java:4084)
at android.view.ViewRootImpl.die(ViewRootImpl.java:4071)
at android.view.WindowManagerGlobal.removeViewLocked(WindowManagerGlobal.java:336)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:286)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84)
at android.widget.PopupWindow.dismiss(PopupWindow.java:1270)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
... 11 more
Code:
modTick(){
if (getCarriedItem()==504)
{
Test();
}
if(getCarriedItem()!=504&&TestGUI!=null){
TestGUI.dismiss();
}
}
function Test()
{
var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get(); ctx.runOnUiThread(new java.lang.Runnable({ run: function() { try{
TestGUI = new android.widget.PopupWindow();
var Testuplayout = new android.widget.RelativeLayout(ctx);
var TestUp = new android.widget.Button(ctx);
TestUp.setText("△");
TestUp.setTextSize(40);
TestUp.setOnClickListener(new android.view.View.OnClickListener(
{ onClick: function(viewarg) {
setVelY( getPlayerEnt() ,1);
if(Player.getCarriedItemData() < 299){ Entity.setCarriedItem(getPlayerEnt(), 504, Player.getCarriedItemCount(), Player.getCarriedItemData() + 1);}
else { //Otherwise
Level.playSoundEnt(attacker, "random.break", 100, 100); //Play the break sound
Player.clearInventorySlot(Player.getSelectedSlotId()); //Remove the tool from the player's inventory
}
} }));
Testuplayout.addView(TestUp);
TestGUI.setContentView(Testuplayout);
TestGUI.setWidth(80);
TestGUI.setHeight(80);
TestGUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT));
TestGUI.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 90); }
catch(err)
{ print("Error: "+err); } } })); }
0
0