Buggy code:
public class ChatRegisterEntity extends TileEntity { private MenuDisplay spaceshipMenu ; private MenuDisplay noSpaceshipMenu ; private static String dimension = "dimension" ; private static String shipKey = "SpaceshipKey" ; private IMenuInterface terminal ; public ChatRegisterEntity ( ) { } public void setSpaceshipMenu ( MenuDisplay display ) { } public void setNoSpaceshipMenu ( MenuDisplay display ) { } public MenuDisplay getSpaceshipMenu ( ) { } public MenuDisplay getNoSpaceshipMenu ( ) { } @ Override public void setPos ( BlockPos pos ) { } @ Override public void invalidate ( ) { } @ Override public void writeToNBT ( NBTTagCompound par1 ) { } @ Override public void readFromNBT ( NBTTagCompound par1 ) { } @ SideOnly ( Side . SERVER ) @ Override public Packet getDescriptionPacket ( ) { } @ SideOnly ( Side . CLIENT ) @ Override public void onDataPacket ( NetworkManager net , S35PacketUpdateTileEntity pkt ) { } public void Activate ( EntityPlayer player ) { } public void onCommand ( String command , EntityPlayer player ) { } public void onCommandForced ( String command ) { } public Spaceship getShip ( ) { } public void executeCommand ( String command , EntityPlayer player ) { Side side = FMLCommonHandler . instance ( ) . getEffectiveSide ( ) ; if ( ( terminal ) == null ) { <START_BUG> proxy . makeTerminal ( player , this ) ; <END_BUG> } boolean isMenu = executeMenu ( command ) ; if ( isMenu ) { return ; } else if ( command . equals ( "hello" ) ) { if ( player != null ) player . addChatComponentMessage ( new ChatComponentText ( "I<seq2seq4repair_space>love<seq2seq4repair_space>you!" ) ) ; } else if ( command . startsWith ( "calc" ) ) { Calculator . calc ( command , player ) ; } else if ( command . startsWith ( "init" ) ) { SpaceshipCommands . init ( command , worldObj , this , player , getShip ( ) ) ; } else if ( command . startsWith ( "move" ) ) { SpaceshipCommands . move ( command , worldObj , this , player , getShip ( ) ) ; } else if ( command . equals ( "test1" ) ) { SpaceshipCommands . init ( "init<seq2seq4repair_space>-4;-4;-4<seq2seq4repair_space>to<seq2seq4repair_space>4;4;4" , worldObj , this , player , getShip ( ) ) ; SpaceshipCommands . move ( "move<seq2seq4repair_space>0;15;0" , worldObj , this , player , getShip ( ) ) ; } else if ( command . startsWith ( "turn<seq2seq4repair_space>" ) ) { command = command . substring ( 4 ) . trim ( ) ; if ( command . equals ( "left" ) ) { Turn . ninetyDeg ( worldObj , pos , LEFT ) ; } else if ( command . equals ( "right" ) ) { Turn . ninetyDeg ( worldObj , pos , RIGHT ) ; } else if ( command . equals ( "around" ) ) { Turn . around ( worldObj , pos ) ; } else { if ( player != null ) player . addChatComponentMessage ( new ChatComponentText ( "Invalid<seq2seq4repair_space>direction!<seq2seq4repair_space>Only<seq2seq4repair_space>left,<seq2seq4repair_space>right<seq2seq4repair_space>or<seq2seq4repair_space>around!" ) ) ; } } else if ( command . equals ( "status" ) ) { SpaceshipCommands . status ( worldObj , this , player , getShip ( ) ) ; } else if ( command . startsWith ( "shoot" ) ) { SpaceshipCommands . shoot ( command , worldObj , this , player , getShip ( ) ) ; } else if ( command . equals ( help ) ) { SpaceshipCommands . help ( player ) ; } else if ( command . startsWith ( energy ) ) { SpaceshipCommands . energy ( command , worldObj , this , player , getShip ( ) ) ; } else { terminalMenu . onCommand ( command , player , this , this . terminal ) ; spaceshipMenu . display ( command , this . terminal , player ) ; } terminalMenu . onCommand ( command , player , this , this . terminal ) ; } public void sendFunctionalMenu ( FunctionalMenu menu ) { } public void sendFunctionalParamMenu ( FunctionalParamMenu menu , String parameters ) { } public boolean executeMenu ( String menuCommand ) { } }

Fix:
terminal = proxy . makeTerminal ( player , this ) ;