Posted January 17, 20169 yr Hi, I'm trying to add a waypoint to JourneyMap with a custom button; now, because it appears that there is no easy way of accessing a field of another mod, I would appreciate some suggestions on how I may do this (It seems like the important class is journeymap.client.waypoint.WaypointStore, but how do I access it?). I'll be using this mod only privately, so it doesn't have to be the cleanest code. Thanks for helping!
January 17, 20169 yr I know the mod (I translated it to German), but I don't know exactly how this should work. I could imagine, that you need to get the class as a new Object and then you can access this object. Bringing the best mod back alive! Our mod REFORGED! Balkon's Weapons for 1.8: https://github.com/TheOnlySilverClaw/Reforged/releases
January 17, 20169 yr Well, if author doesn't provide dev-source which you can use to direct-reference his classes, then your best shot is to use Reflection. You will simply need to check if Mod is loaded and then use Method/Field to change stuff. Note that you should reflect method/field once and then reuse it. Google Reflection tutorial. 1.7.10 is no longer supported by forge, you are on your own.
January 18, 20169 yr Well, I thought about using reflection, but I hoped for some (reflection-)integration in Forge itself; it seems like Reflection is my best bet right now. Anyway, thanks for the help!
January 18, 20169 yr Maybe this helps you (bukkit programming, but you could adjust it): When you want to edit the banlist of a server you can't do BanList.pardon(); because it's not static. You have to do BanList.getBanList(Type.NAME).pardon(); Mabe in JourneyMap there is somethig like: WaypointManager.getWapoints().addWaypoint(...); Bringing the best mod back alive! Our mod REFORGED! Balkon's Weapons for 1.8: https://github.com/TheOnlySilverClaw/Reforged/releases
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.