• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Merivo

  • Rank
  1. Eclipse is my favourite IDE for Java development specifically (any other language and it falls down a bit). My reasons: 1. It makes exporting to jars really easy. For a wurm mod project, click File>Export, JAR file (not Runnable but the basic one), tick your project, where to put the jar (in your mod folder) and what to name it, and you're done! 2. It also has an inbuilt backup system which allows you to recover and compare files with their history in a properly intuitive interface (shows you the changes between versions and allows you to go through and apply/revert specific changes). 3. These days, it automates plug-and-play coding, so you can run a program in debug mode, change it's code and not even have to restart the program to test it. This isn't true for wurm modding though, since you'll be relying on modloader. 4. Keyboard shortcuts. The following are a few examples: a ) Ctrl+Shift+O will tidy up and automatically import whatever files are needed for the class you're viewing. So if you reference some wurm spell, you don't need to worry about where you're importing it from, Ctrl+Shift+O will find it for you! If there are multiple possibilities, Eclipse will prompt you to pick one. b ) Ctrl+Shift+NUMPAD_/ will 'fold' all your methods and inner classes, so you can view just the method declarations (from a C++ perspective, you could think of this as header mode). You can then click to expand whichever methods you're interested in (Or press Ctrl+Shift+NUMPAD_* to unfold all again). c ) Ctrl+O will provide a little dialog for you to start typing a method name and provides a list of matching names for you to select one from. Eclipse will then take you straight to that method! d ) Alt+Shift+R will rename the selected variable/method/class name not just where you're editing, but every reference of that variable/method/class in your entire project as well! Got a method that's used in 100 places? Only rename it in one place using this command! e ) Ctrl+Alt+H will find every reference to whatever variable/method you have selected, and allow you to see it's entire call hierarchy, examine all the places its called (this doesn't work for compiled code calls though). f ) Ctrl+I automatically corrects indentation for the currently viewed file. It won't correct indentation as you type (unless you tell it to), which is good for people like myself who prefer to control the way it looks. By the way, the rules it uses for this is configurable. g ) Ctrl+Q takes you to the last bit of code you edited 5. Starts up in 30 seconds and doesn't even require installing 6. Configurability. So many things are configurable. You can specify commands that allow you to type "blah" in a file, hit Ctrl+Space and have it generate template code that you've specified. The way your interface is set up is also configurable, and has multiple perspectives that you can quickly flip between or create. You can change the font that it uses, the size, the colours of everything (syntax, background colours), and more. 7. Further automation. If you have an error in your code and you hover your mouse over it, eclipse will pop up with a menu with up to 5 ways to automatically solve it for you. Note that if it's a logical error it may not be able to, but if it's simply a bit of code your missing, incorrect spelling, or you forgot to import something, it can do that for you. It can also auto-generate getters, setters, delegate methods, and constructors at the click of a button. Note that I'm not saying other IDE's don't have any of these features, and some have features Eclipse doesn't have, but these are the reasons I like Eclipse.
  2. Thank you very much ago, that information was very helpful! The mod's now working
  3. So, I've been having a look at your LoadingUnchainedMod source, and this code throws an exception when I try this out in my own class, but not in yours: ClassPool pool = HookManager.getInstance().getClassPool(); CtClass ctcSelf = pool.makeClass("Default"); try { ctcSelf = pool.get(this.getClass().getName()); } catch (NotFoundException e) { e.printStackTrace(); } javassist.NotFoundException: org.gotti.wurmunlimited.mods.configuredirt.ConfigureDirtMod.. Any ideas?
  4. Thanks for the replies! Sorry about the delay, I was out all day yesterday. If try/catch isn't supported, is throws{}? As for your different approach joedobo, I would certainly rather do it the way you suggest but the only thing I can't figure out is how to give doEffect the value of my variable amount; since it's going in a different class how's that going to work? Back to the original approach, I've wrapped {} around the method, and am now using setbody. That fixed the old exceptions, now I'm getting a new exception: "CannotCompileException: no such class: ItemTemplate". I didn't come up with that part of the code myself, this was from the original Dirt.class, shouldn't it already have imported ItemTemplate? Or is it that my ConfigureDirtMod needs to import ItemTemplate? Oh and, quick question. Which is called first, configure or preInit?
  5. I've been trying to modify a spell to make it's effects more flexible (using a property file). However I've been getting exceptions when I run Mod Loader "compile error: no such class: $4" .. this is repeated for the 4 parameters $1 through $4. I've been following the footsteps of another mod, and I'm stumped as to why mine isn't working.. see the full source below: