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;
|
|
|
|
|
|
|
|
public class OreRefrence
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
|
|
|
public Collection<ItemStack> getEquivilients()
|
|
|
|
{
|
|
|
|
return otherOptions;
|
|
|
|
}
|
|
|
|
|
2014-08-12 05:56:57 +02:00
|
|
|
public List<IAEItemStack> getAEEquivilients()
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|