Posted June 22, 201411 yr I created a block with it's own GUI. What the GUI dose is that creates an explosion based on number you input in the text box. Everything works on singleplayer, but on multiplayer, the server crashes when i click on the button Here's the method protected void actionPerformed(GuiButton button) { World world = null; WorldServer[] list = MinecraftServer.getServer().worldServers; // in console it says this line crashes for (WorldServer ins : list) { if (ins.provider.dimensionId == entity.worldObj.provider.dimensionId) world = ins; } if (world == null) world = list[0]; if (button.id == 0) { if (true) { if (power.getText().isEmpty()) power.setText(""); else if (power.getText().matches("[a-zA-Z]+")) power.setText(""); else if (power.getText().matches("[0-9]+")) { this.mc.displayGuiScreen((GuiScreen) null); world.createExplosion((Entity) null, i, j - 10, k, Integer.parseInt(power.getText().trim()), true); } else power.setText(""); } } } _ ___ ___| |__ _ __ / __/ __| '_ \| '_ \ \__ \__ \ | | | | | | |___/___/_| |_|_| |_|
June 22, 201411 yr Author How can I do that? I never mess around with packets before, I heard, but don't know what it is. _ ___ ___| |__ _ __ / __/ __| '_ \| '_ \ \__ \__ \ | | | | | | |___/___/_| |_|_| |_|
June 22, 201411 yr Author Alright. Thank you for leading me on what is causing the problem _ ___ ___| |__ _ __ / __/ __| '_ \| '_ \ \__ \__ \ | | | | | | |___/___/_| |_|_| |_|
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.