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.

UmCaraQualquer

Members
  • Joined

  • Last visited

Everything posted by UmCaraQualquer

  1. In general, I already know and I managed to create a command that creates a Fireball using "/mkt fireball <strenght>", but I think I'm doing it the wrong way: My command is "/mkt", and I'm creating others using the first argument, like "fireball". Onwards I can create a "/mkt build <shape>", with "build" being the argument. I'm pretty sure this is wrong, and that there is a way to create a command from a better command, such as "/rftdim safedel <dimId>" from RFTools Dimensions. In short, I want to implement something similar to "/rftdim" in my mod, which after that I can call my command. This shortcut is easier for the player to find out where the commands come from. In Main.java, i am using this to register: @EventHandler public static void serverStarting(FMLServerStartingEvent event) { ModCommands.registerCommands(event); } Herei i register: public class ModCommands{ public static void registerCommands(FMLServerStartingEvent event) { event.registerServerCommand(new BaseCommand()); } } And here i use the first argument to call a command, like Fireball or Build: public class BaseCommand extends CommandBase { @Override public String getCommandName() { return "mkt"; } @Override public String getCommandUsage(ICommandSender sender) { return "/mkt <command>"; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { List<String> commands = new ArrayList<String>(); commands.add("help"); commands.add("fireball"); if (args.length > 0) { if(args[0].equals("fireball")){ new Fireball().execute(server, sender, args); } } else{ String formatted = ""; formatted += TextFormatting.BLUE; formatted += "/mkt help"; String notFormated = ""; notFormated += TextFormatting.WHITE; notFormated += "to help."; sender.addChatMessage(new TextComponentString(formatted + " " + notFormated)); } if(args.length > 0) { if (!commands.contains(args[0])) { String formatted = ""; formatted += TextFormatting.BLUE; formatted += "'" + args[0] + "'"; String notFormated = ""; notFormated += TextFormatting.WHITE; notFormated += "are not a Mekatronic command."; sender.addChatMessage(new TextComponentString(formatted + " " + notFormated)); } } } } All my others command extends CommandBase, my BaseCommand just decides which command to call. I tried to find out in RFToolsDim's .jar how they implemented the commands, but I'm new to java, and I don't understand anything.

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.