Hoard demons no longer 1HKO'd by dagger
This commit is contained in:
parent
574f43010d
commit
22afbcbd11
18 changed files with 130 additions and 51 deletions
|
@ -4,22 +4,41 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
public class DemonVillageLootRegistry
|
||||
{
|
||||
public static ArrayList<WeightedRandomChestContent> list = new ArrayList();
|
||||
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList();
|
||||
|
||||
static
|
||||
public static void init()
|
||||
{
|
||||
list.add(new WeightedRandomChestContent(Items.iron_ingot, 0, 1, 5, 10));
|
||||
ItemStack lifeShardStack = new ItemStack(ModItems.baseItems, 1, 28);
|
||||
ItemStack soulShardStack = new ItemStack(ModItems.baseItems, 1, 29);
|
||||
|
||||
String[] tier1Strings = new String[]{ChestGenHooks.DUNGEON_CHEST, ChestGenHooks.PYRAMID_DESERT_CHEST};
|
||||
for(String str : tier1Strings)
|
||||
{
|
||||
WeightedRandomChestContent[] contents = ChestGenHooks.getItems(str, new Random());
|
||||
if(contents != null)
|
||||
{
|
||||
for(WeightedRandomChestContent content : contents)
|
||||
{
|
||||
list1.add(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list1.add(new WeightedRandomChestContent(ModItems.baseItems, 28, 1, 2, 5));
|
||||
list1.add(new WeightedRandomChestContent(ModItems.baseItems, 29, 1, 2, 5));
|
||||
}
|
||||
|
||||
public static void populateChest(IInventory tile, int tier)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(new Random(), toArray(list), tile, 10);
|
||||
WeightedRandomChestContent.generateChestContents(new Random(), toArray(list1), tile, tile.getSizeInventory() / 3);
|
||||
}
|
||||
|
||||
public static WeightedRandomChestContent[] toArray(List<WeightedRandomChestContent> aList)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue