Jump to content

[1.7.10] Forge Nested Configs


Deli_SK

Recommended Posts

Hello

 

I have a question regarding forge config files. As it resembles JSON a bit, is it possible to use nested objects like in JSON?

 

I'm struggling to get this XML structure:

 

 

 
<?xml version="1.0" encoding="UTF-8"?>
<toolGroups>
<toolGroupEntry id="shovels">
	<tool name="item.shovelStone"/>
	<tool name="item.shovelIron"/>
</toolGroupEntry>
<toolGroupEntry id="axes">
	<tool name="item.axeStone" modifier="0.1" />
	<tool name="item.axeIron" modifier="0.5" />
</toolGroupEntry>
<toolGroupEntry id="notTools" />
</toolGroups>
<blockGroups>
<blockGroupEntry forToolGroups="shovels;axes">
	<block name="tile.stone" modifier="0.8" removeVanillaDrop="true"/>
	<block name="tile.leaves" drop="item.stick" dropChance="0.4" dropCount="2"/>
	<block name="tile.leaves:0" drop="item.sapling" dropChance="0.05"/>
</blockGroupEntry>
</blockGroups>

 

 

to somewhat write as config file.

 

I've managed to partially do that using configCategories names in a format ("a.b.c.d"), but that seems to be a bit hacky to me, and negates the effort for the file to be easily used. (both by user and the parsing code).

 

Any help?

 

P.S.: Yes, I was discussing something similar in this thread: http://www.minecraftforge.net/forum/index.php/topic,23132.0.html but the topic was discussion about something else - which I've already locked, because I found answer to that topic. If it is a problem, feel free to move it to previous topic and unlock it.

 

I come here to ask only after several hours of struggling, forum browsing and googling. Please be kind :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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