Jump to content

[1.7.10] Overriding Vanilla behavior


Deli_SK

Recommended Posts

Hello fellow modders.

 

I'm about to alter the vanilla block behavior, namely the break speed and drops with different tools (to harvest dirt, you need a shovel).

I was thinking of creating a config XML where I can set everything I need, and after loading I will attach a HarvestBlock and BreakSpeed events to change the vanilla behavior the way it is configured.

 

So my question is, if this is a good approach, or there is a better solution which I should consider?

 

Thank you in advance.

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

Thank you for your help.

 

I wanted to use XML due to it's structure, which will allow me to set more complex stuff. BTW I'm not doing it for user to change, only if he really wants.

 

Basically I want to create a complex ruleset, something like this:

<?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>

 

Will it be possible in forge config format?

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.