Bad Fuzzy Logic for Non-Damageable Items.

This commit is contained in:
AlgorithmX2 2014-05-21 21:08:13 -05:00
parent 0f781cebba
commit 569ed2f99e
2 changed files with 37 additions and 34 deletions

View file

@ -18,7 +18,6 @@ import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAETagCompound;
import appeng.util.Platform;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -483,6 +482,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return bottom;
}
if ( newDef.item.isDamageable() )
{
if ( fuzzy == FuzzyMode.IGNORE_ALL )
{
newDef.dspDamage = 0;
@ -493,8 +494,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
newDef.dspDamage = low < def.dspDamage ? low : 0;
}
if ( newDef.item.isDamageable() )
newDef.damageValue = newDef.dspDamage;
}
newDef.tagCompound = AEItemDef.lowTag;
newDef.reHash();
@ -513,6 +514,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return top;
}
if ( newDef.item.isDamageable() )
{
if ( fuzzy == FuzzyMode.IGNORE_ALL )
{
newDef.dspDamage = def.maxDamage + 1;
@ -523,8 +526,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
newDef.dspDamage = high > def.dspDamage ? high : def.maxDamage + 1;
}
if ( newDef.item.isDamageable() )
newDef.damageValue = top.def.dspDamage;
}
newDef.tagCompound = AEItemDef.highTag;
newDef.reHash();

View file

@ -190,7 +190,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
{
StackType low = (StackType) filter.getLow( fuzzy, ignoreMeta );
StackType high = (StackType) filter.getHigh( fuzzy, ignoreMeta );
return records.subMap( low, high ).values();
return records.subMap( low, true, high, true ).values();
}
@Override