ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DungeonLoot.java

52 lines
2.4 KiB
Java
Raw Normal View History

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
2016-01-03 16:05:51 +01:00
* http://ellpeck.de/actaddlicense/
2015-11-15 19:24:36 +01:00
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2016-01-03 16:05:51 +01:00
* © 2016 Ellpeck
2015-11-15 19:24:36 +01:00
*/
2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.misc;
2015-11-15 19:24:36 +01:00
2016-01-05 04:47:35 +01:00
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.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);
}
}
}