Merge branch 'MrBretze-1.9' into 1.9
This commit is contained in:
commit
0cb6cf1fc0
2 changed files with 1101 additions and 858 deletions
|
@ -4,14 +4,28 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import techreborn.Core;
|
||||||
|
|
||||||
public class ScrapboxList
|
public class ScrapboxList
|
||||||
{
|
{
|
||||||
|
|
||||||
public static List<ItemStack> stacks = new ArrayList<ItemStack>();
|
public static List<ItemStack> stacks = new ArrayList<>();
|
||||||
|
|
||||||
public static void addItemStackToList(ItemStack stack)
|
public static void addItemStackToList(ItemStack stack)
|
||||||
|
{
|
||||||
|
if (!hasItems(stack))
|
||||||
{
|
{
|
||||||
stacks.add(stack);
|
stacks.add(stack);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean hasItems(ItemStack stack)
|
||||||
|
{
|
||||||
|
for (ItemStack s : stacks)
|
||||||
|
{
|
||||||
|
if (stack.getDisplayName().equals(s.getDisplayName()))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue