Posted October 25, 201410 yr I have no idea what's going on, I'm new to TEs so any help is appreciated! The stacktrace: http://pastebin.com/xVfTx8F1 The (likely) problem classes: the Block/TEProvider class https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src%2Fmain%2Fjava%2Fcom%2Faustinv11%2Fperipheralsplusplus%2Fblocks%2FChatBox.java , the TE class https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src%2Fmain%2Fjava%2Fcom%2Faustinv11%2Fperipheralsplusplus%2Ftiles%2FTileEntityChatBox.java Thanks!
October 25, 201410 yr Your tile entity needs a no-arg constructor, I think. Don't set the world in the constructor, that happens automatically for you anyway. BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
October 25, 201410 yr Author That has fixed it, but now I'm getting an NPE because the world object is null.
October 25, 201410 yr Post the stack-trace. BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
October 26, 201410 yr Author callMethod get's called from a ComputerCraft thread, you cannot interact with the world in it. You need to enqueue any actions and perform them in the actual server thread (from updateEntity). Edit: Also, in gerPeripheral don't create a new TE. Get the one from the world. How exactly would I get the TE from the world?
October 26, 201410 yr World#getTileEntity(int, int, int) BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
October 26, 201410 yr Author How could I get the list of players without the world object? I've tried getting the TE to update an array of players each tick and save it to a private variable, but I get an NPE whenever I try to access it from within the callMethod() method.
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.