Equivalent Exchange 3

Equivalent Exchange 3

2M Downloads

We should use EmcDataProviders instead of Static maps

undergroundminer3 opened this issue ยท 3 comments

commented

In the 1.6.4 branch, I see that we are using ImmutableSortedMap s.

The thing that is worst here is the "immutable" part.
It closes lots of possibilities that we could use emc for,
for example, a different emc for ic2's power crystal when fully charged, and not.

I suggest that we consider my attempt at a dynamic registry:

https://github.com/undergroundminer3/Unequal-Exchange-4-Base/blob/master/src/main/java/me/undergroundminer3/uee4/emc/EmcDataRegistry.java

commented

Some early work was done on this before in the 1.6.4 branch (https://github.com/pahimar/Equivalent-Exchange-3/blob/1.6.4/src/main/java/com/pahimar/ee3/api/ICustomEmcValueProvider.java) and this idea has been reported before as well (#631)

It's an enhancement I'll be making sure makes into the 1.7 version

commented

In case it's needed, here's the formula for getting EMC of damaged item, considered that item with damage 0 (broken item - no longer exists) has 0 EMC:
(int) Item.getItemDamage() / (Item.getMaxDamage() / {ITEM_EMC})
I hope I helped a bit.