Attempt to fix repository

This commit is contained in:
WayofTime 2015-07-31 12:09:09 -04:00
parent e242207d50
commit 1aac4686db
932 changed files with 39272 additions and 11544 deletions

View file

@ -11,14 +11,14 @@ import WayofTime.alchemicalWizardry.ModItems;
public class DemonVillageLootRegistry
{
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList<WeightedRandomChestContent>();
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList();
public static void init()
{
String[] tier1Strings = new String[]{ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST};
for(String str : tier1Strings)
{
List<WeightedRandomChestContent> contents = ChestGenHooks.getItems(str, new Random());
WeightedRandomChestContent[] contents = ChestGenHooks.getItems(str, new Random());
if(contents != null)
{
for(WeightedRandomChestContent content : contents)
@ -34,6 +34,16 @@ public class DemonVillageLootRegistry
public static void populateChest(IInventory tile, int tier)
{
WeightedRandomChestContent.generateChestContents(new Random(), list1, tile, tile.getSizeInventory() / 3);
WeightedRandomChestContent.generateChestContents(new Random(), toArray(list1), tile, tile.getSizeInventory() / 3);
}
public static WeightedRandomChestContent[] toArray(List<WeightedRandomChestContent> aList)
{
int size = aList.size();
WeightedRandomChestContent[] contents = new WeightedRandomChestContent[size];
contents = aList.toArray(contents);
return contents;
}
}