2014-02-13 06:24:07 +01:00
|
|
|
package appeng.util.item;
|
|
|
|
|
2014-08-12 05:56:57 +02:00
|
|
|
import java.util.ArrayList;
|
2014-02-13 06:24:07 +01:00
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.LinkedList;
|
2014-08-12 05:56:57 +02:00
|
|
|
import java.util.List;
|
2014-02-13 06:24:07 +01:00
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import appeng.api.storage.data.IAEItemStack;
|
|
|
|
|
2014-09-20 23:35:55 +02:00
|
|
|
public class OreReference
|
2014-02-13 06:24:07 +01:00
|
|
|
{
|
|
|
|
|
2014-08-12 05:56:57 +02:00
|
|
|
private LinkedList<ItemStack> otherOptions = new LinkedList();
|
|
|
|
private ArrayList aeotherOptions = null;
|
|
|
|
private HashSet<Integer> ores = new HashSet<Integer>();
|
2014-02-13 06:24:07 +01:00
|
|
|
|
2014-09-21 02:37:37 +02:00
|
|
|
public Collection<ItemStack> getEquivalents()
|
2014-02-13 06:24:07 +01:00
|
|
|
{
|
|
|
|
return otherOptions;
|
|
|
|
}
|
|
|
|
|
2014-09-21 02:37:37 +02:00
|
|
|
public List<IAEItemStack> getAEEquivalents()
|
2014-02-13 06:24:07 +01:00
|
|
|
{
|
2014-08-12 05:56:57 +02:00
|
|
|
if ( aeotherOptions == null )
|
|
|
|
{
|
|
|
|
aeotherOptions = new ArrayList( otherOptions.size() );
|
|
|
|
|
|
|
|
// SUMMON AE STACKS!
|
|
|
|
for (ItemStack is : otherOptions)
|
|
|
|
if ( is.getItem() != null )
|
|
|
|
aeotherOptions.add( AEItemStack.create( is ) );
|
|
|
|
}
|
|
|
|
|
2014-02-13 06:24:07 +01:00
|
|
|
return aeotherOptions;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Collection<Integer> getOres()
|
|
|
|
{
|
|
|
|
return ores;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|