Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

biouxtai

Members
  • Posts

    6
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

biouxtai's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. There is a feature built into FML called getRequirements that consists of a string that tells FML when to load your mod. If the mod authors use this string correctly then the order is handled by FML. If not, then it resorts to alphabetical. To handle the situation right now, I just prefix all of the mods I am loading with a number. This forces them to load in the correct order if being done by alpha. Prime example is the mod for forestry Extra Bees. This one does not correctly depend on Forestry, so I have to force it to load last so that forestry gets in there and gets all set up before extra bees does. Otherwise I get an error with a 'class not found' looking for forestry.
  2. I found the github for FML and had a chat with Cpw and Pahimar. They would rather that the mod developers use the dependencies correctly and not try to correct for those that are not doing so. This request will not be implemented. Oh well.
  3. Thanks for the note. Which forum or where should I go to make this request?
  4. I have run into a situation with my server that requires certain mods load before others. To handle this, I usually rename my mods to 0<modname>, 1<modname>, etc.. this enables me to control load order and resolves many conflicts and issues I have run into. I tried to handle this in a sensible way first by creating folders in mods called mods/0, mods/1, etc.. This did not work as when FML is looking for mods to load it hits the /0 or /1 and looks for a class file to load. It doesn't seem to care that I have 3-4 mods in that folder. Is it possible to get FML to recognize at least the first level of nesting? This would enable me to have a set of folders, 0-3, that could handle the ordering without going through the trouble of renaming. This issue is very visible when using forestry and also the plugin pluginsForForestry with extraBees. extraBees tries to load first and freaks out. By using the numbered prefix, I can get all my mods to load without issue, but using a structured folder setup would be cleaner. My server is run on a Mac. OS X Lion. Thanks, ~b
  5. hey OvermindDL1, Thanks for replying. The Classname is exactly what I am looking for. More specifically a usable classname. I tried the reflection idea, but that didn't work so well to determine of the class was an instanceof EntityLiving. I kept getting cannot convert from Class<? extends Entity> to EntityLiving.. really aggravating. This is what I wound up doing. It works, but probably not the cleanest. What I was hoping for was a simple way of getting the living entities by the name they are registered with in ModLoader. For example, Mo'Creatures (only mod I have that adds creatures right now) using call like this: ModLoader.registerEntityID(MoCEntityHorse.class, "Horse", ModLoader.getUniqueEntityId()); I would live it if there was a function that allowed me to request the entities that are based off of EntityLiving like: ModLoader.getRegisteredEntities(<baseClass>); and it returns a list of strings that would be the second parameter to the register function of only the entities that are based off the class I pass in. My code is below. It works, but I am not happy with it and would like to improve it. Iterator<Entry<String, Class<? extends Entity>>> iter = EntityTypes.getEntityToClassMapping().entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, Class<? extends Entity>> mapEntry = iter.next(); eName = mapEntry.getKey(); try { Class<?> c = mapEntry.getValue().getSuperclass(); boolean done = false; eClass = "F"; while (!done) { String en = c.getSimpleName(); if (en.equalsIgnoreCase("LivingEntity") ||en.equalsIgnoreCase("EntityLiving")){ eClass = "T"; done = true; this.getLogger().info("Entity: " + eName); } else if (en.equalsIgnoreCase("Entity") && !eName.equalsIgnoreCase("fakeBlock")) done = true; c = c.getSuperclass(); if (c.getCanonicalName().equalsIgnoreCase("java.lang.object")) done = true; } } catch (Exception ex) { this.getLogger().info("Exception! "+ex.getMessage()); } }
  6. I am working on a mod that when an op issues a command, I would like to get a list of all the entities that have been registered through modloader using the registerEntityId call. Specifically, I am looking to get their classname and the string identifier that was passed to write out to a datafile. I have been looking through the code and I am probably missing it, but I can't seem to find a function like getRegisiteredEntities that would return me a list. I don't want to get the list out of the world as the entities that are available may not have all spawned. I would like to be able to be mod agnostic in this so that *any* mod that registers a new entity will have it show up in this list. I currently run a bukkit server with forge. When I can my event handler and try to access the mobs names through the bukkit api they always come back as null. I can get an unique id out of that api, but no other information. As the modloader getUniqueId function will return different ids per server, this function is designed to map out the class names without having to resort to IDs to make config of my mod easier. The ultimate goal is to get the list of names/classes so I can put them into a config file for my mod that will be used to make comparisons to entity events allowing for custom entities. Thanks for any info. ~b
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.