Equivalent Exchange 3

Equivalent Exchange 3

2M Downloads

Objects with WILD_CARD meta data will not always return the lowest energy value from the EnergyValueRegistry

pahimar opened this issue ยท 0 comments

commented

Old code:

/**
* FIXME If the object being checked has a WILD_CARD meta value, then it will match any similar object.
* We must ensure that it returns the LOWEST possible value from the map
*/
if (valueMap.containsKey(wrappedStack)) {
return valueMap.get(wrappedStack);
}

ItemStacks with a WILDCARD_VALUE meta value would match ItemStack in the energy value map, and return the first value it finds (which may not be the lowest value). This would cause objects to have incorrect energy values computed for them (higher than they should)