Logistics Pipes

Logistics Pipes

13M Downloads

Look into backport item out of range fix from 0.9 to 0.8.

davboecki opened this issue ยท 2 comments

commented

Is it even possible with out to much trouble?
Look into the fixes stability.

commented

Thanks for fixing this.

commented

Done.

Don't quite like the consequences, damageIdentifiers doesn't use weakrefs, so we end up keeping a ItemIdentifier around for every variant encountered. For items with possibly millions of damage variants that seems problematic.

The main reason damageIdentifiers exists at all is to avoid ItemIdentifier object churn and the overhead of getUndamaged(), so we might look into improving this for 0.9.

Possible approach: Only use damageIdentifiers for undamageable items with no tag and maxDamage < some arbitrary small-ish value (32768 or possibly something smaller, maybe 4096 or 256).
That way we'd still avoid identifier churn for things that use meta for item variants (e.g. logs, planks, stained glass) without the potential for sitting on millions of ItemIdentifiers forever.