2015-11-15 19:24:36 +01:00
|
|
|
/*
|
|
|
|
* This file ("DungeonLoot.java") is part of the Actually Additions Mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
|
|
|
* © 2015 Ellpeck
|
|
|
|
*/
|
|
|
|
|
2015-12-30 22:02:15 +01:00
|
|
|
package de.ellpeck.actuallyadditions.misc;
|
2015-11-15 19:24:36 +01:00
|
|
|
|
2015-12-30 22:02:15 +01:00
|
|
|
import de.ellpeck.actuallyadditions.blocks.InitBlocks;
|
|
|
|
import de.ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
|
|
|
import de.ellpeck.actuallyadditions.items.InitItems;
|
|
|
|
import de.ellpeck.actuallyadditions.items.metalists.TheCrystals;
|
|
|
|
import de.ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
|
|
|
import de.ellpeck.actuallyadditions.util.ModUtil;
|
2015-11-15 19:24:36 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.util.WeightedRandomChestContent;
|
|
|
|
import net.minecraftforge.common.ChestGenHooks;
|
|
|
|
|
|
|
|
public class DungeonLoot{
|
|
|
|
|
|
|
|
public static void init(){
|
|
|
|
if(ConfigBoolValues.DUNGEON_LOOT.isEnabled()){
|
|
|
|
ModUtil.LOGGER.info("Initializing Dungeon Loot...");
|
|
|
|
|
|
|
|
ChestGenHooks dungeon = ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST);
|
|
|
|
ChestGenHooks mineshaft = ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR);
|
|
|
|
ChestGenHooks blacksmith = ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH);
|
|
|
|
|
|
|
|
for(int i = 0; i < TheCrystals.values().length; i++){
|
2015-12-20 01:55:30 +01:00
|
|
|
WeightedRandomChestContent item = new WeightedRandomChestContent(new ItemStack(InitItems.itemCrystal, 1, i), 2, 4, 5);
|
|
|
|
WeightedRandomChestContent block = new WeightedRandomChestContent(new ItemStack(InitBlocks.blockCrystal, 1, i), 1, 3, 1);
|
2015-11-15 19:24:36 +01:00
|
|
|
dungeon.addItem(item);
|
|
|
|
dungeon.addItem(block);
|
|
|
|
mineshaft.addItem(item);
|
|
|
|
mineshaft.addItem(block);
|
|
|
|
}
|
2015-12-20 01:55:30 +01:00
|
|
|
WeightedRandomChestContent drillCore = new WeightedRandomChestContent(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 1, 1, 3);
|
2015-11-15 19:24:36 +01:00
|
|
|
dungeon.addItem(drillCore);
|
|
|
|
mineshaft.addItem(drillCore);
|
|
|
|
blacksmith.addItem(drillCore);
|
|
|
|
|
2015-12-20 01:55:30 +01:00
|
|
|
WeightedRandomChestContent quartz = new WeightedRandomChestContent(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 3, 4, 30);
|
2015-11-15 19:24:36 +01:00
|
|
|
dungeon.addItem(quartz);
|
|
|
|
blacksmith.addItem(quartz);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|