Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

so ive been working on a custom command and it doesn't seem to work i cant use the command in game. am i doing this right? or am i missing something.

 

 

heres my common proxy:

 

public class CommonProxy {

public void registerRenders(){



	RecipesInit.smeltingRCP();


}


@EventHandler
public void serverLoad(FMLServerStartingEvent event)
{
    // register server commands

event.registerServerCommand(new msssg());
}

}

 

 

 

and heres the command class:

 

public class msssg extends CommandBase {

@Override
public int compareTo(Object arg0) {
	// TODO Auto-generated method stub
	return 0;
}

@Override
public String getName() {
	// TODO Auto-generated method stub
	return "mssssg";
}

@Override
public String getCommandUsage(ICommandSender sender) {
	// TODO Auto-generated method stub
	return "mssssg messa";
}

@Override
public List getAliases() {
	// TODO Auto-generated method stub
	return this.getAliases();
}

@Override
public void execute(ICommandSender sender, String[] args)
		throws CommandException {

	EntityPlayer playerIn1 = (EntityPlayer) sender;
    	
	sender.addChatMessage(new ChatComponentText("TEST2345234234234234"));




}

@Override
public boolean canCommandSenderUse(ICommandSender sender) {
	// TODO Auto-generated method stub
	return true;
}

@Override
public List addTabCompletionOptions(ICommandSender sender, String[] args,
		BlockPos pos) {
	// TODO Auto-generated method stub
	return null;
}

@Override
public boolean isUsernameIndex(String[] args, int index) {
	// TODO Auto-generated method stub
	return false;
}

}

 

 

 

for 1.8 you want to implement ICommand

 

 

Also I can not see a constructor, should add one with no parameters but inside the constructor add your aliases you want it to allow.

  • Author

now i get this every time i try to play the game

 

 

[18:34:41] [server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED. Errors may have been discarded.

[18:34:41] [server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state AVAILABLE. Errors may have been discarded.

 

for 1.8 you want to implement ICommand

What? No!

 

you're not? that's how I did all of my commands and they work, what's the better way?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.