diff --git a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java index 9364fb267..61e21c61a 100644 --- a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java +++ b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java @@ -84,6 +84,7 @@ public class ActuallyAdditions{ TileEntityBase.init(); InitEvents.init(); InitCrafting.init(); + DungeonLoot.init(); FMLInterModComms.sendMessage("Waila", "register", "ellpeck.actuallyadditions.waila.WailaDataProvider.register"); proxy.init(event); diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java index 2d59a07a7..e1c634d45 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java @@ -58,7 +58,9 @@ public enum ConfigBoolValues{ GIVE_BOOKLET_ON_FIRST_CRAFT("Give Booklet on First Craft", ConfigCategories.OTHER, true, "If the booklet should be given to the player when he first crafts something from the Mod"), ENABLE_SEASONAL("Seasonal Mode", ConfigCategories.OTHER, true, "If Seasonal Mode is enabled"), - LESS_LASER_RELAY_PARTICLES("Laser Relay: Particles", ConfigCategories.MACHINE_VALUES, false, "If the Laser Relay should have less laser particles to prevent lag"); + LESS_LASER_RELAY_PARTICLES("Laser Relay: Particles", ConfigCategories.MACHINE_VALUES, false, "If the Laser Relay should have less laser particles to prevent lag"), + + DUNGEON_LOOT("Dungeon Loot", ConfigCategories.OTHER, true, "Should Actually Additions Loot spawn in Dungeons"); public final String name; public final String category; diff --git a/src/main/java/ellpeck/actuallyadditions/misc/DungeonLoot.java b/src/main/java/ellpeck/actuallyadditions/misc/DungeonLoot.java new file mode 100644 index 000000000..74c7a808b --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/misc/DungeonLoot.java @@ -0,0 +1,51 @@ +/* + * 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 + */ + +package ellpeck.actuallyadditions.misc; + +import ellpeck.actuallyadditions.blocks.InitBlocks; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; +import ellpeck.actuallyadditions.items.InitItems; +import ellpeck.actuallyadditions.items.metalists.TheCrystals; +import ellpeck.actuallyadditions.items.metalists.TheMiscItems; +import ellpeck.actuallyadditions.util.ModUtil; +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++){ + WeightedRandomChestContent item = new WeightedRandomChestContent(new ItemStack(InitItems.itemCrystal, 1, i), 2, 4, 15); + WeightedRandomChestContent block = new WeightedRandomChestContent(new ItemStack(InitBlocks.blockCrystal, 1, i), 1, 3, 5); + dungeon.addItem(item); + dungeon.addItem(block); + mineshaft.addItem(item); + mineshaft.addItem(block); + } + WeightedRandomChestContent drillCore = new WeightedRandomChestContent(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 1, 1, 40); + dungeon.addItem(drillCore); + mineshaft.addItem(drillCore); + blacksmith.addItem(drillCore); + + WeightedRandomChestContent quartz = new WeightedRandomChestContent(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 3, 4, 50); + dungeon.addItem(quartz); + blacksmith.addItem(quartz); + } + } +} diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemDrillPurple.png b/src/main/resources/assets/actuallyadditions/textures/items/itemDrillPurple.png index c9719f257..be8633004 100644 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/itemDrillPurple.png and b/src/main/resources/assets/actuallyadditions/textures/items/itemDrillPurple.png differ