mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
generate village chests even if dungeon loot is disabled
This commit is contained in:
parent
d0f8ee1dc7
commit
cca76e5020
2 changed files with 45 additions and 42 deletions
|
@ -43,7 +43,7 @@ public enum ConfigBoolValues{
|
||||||
SHOW_BOOKLET_INFO("Booklet Quick Opening Info", ConfigCategories.TOOL_VALUES, true, "If true,'Press key for more information' text should show when the item has a page in the booklet"),
|
SHOW_BOOKLET_INFO("Booklet Quick Opening Info", ConfigCategories.TOOL_VALUES, true, "If true,'Press key for more information' text should show when the item has a page in the booklet"),
|
||||||
GIVE_BOOKLET_ON_FIRST_CRAFT("Give Booklet on First Craft", ConfigCategories.OTHER, true, "If true, the booklet should be given to the player when he first crafts something from the Mod"),
|
GIVE_BOOKLET_ON_FIRST_CRAFT("Give Booklet on First Craft", ConfigCategories.OTHER, true, "If true, the booklet should be given to the player when he first crafts something from the Mod"),
|
||||||
|
|
||||||
DUNGEON_LOOT("Village and Dungeon Loot", ConfigCategories.OTHER, true, "Should Actually Additions Loot generate in dungeons? (This also disables loot in lush caves and village houses!)"),
|
DUNGEON_LOOT("Village and Dungeon Loot", ConfigCategories.OTHER, true, "Should Actually Additions Loot generate in dungeons?"),
|
||||||
GEN_LUSH_CAVES("Generate Lush Caves", ConfigCategories.WORLD_GEN, true, "Should caves with trees and grass randomly generate underground?"),
|
GEN_LUSH_CAVES("Generate Lush Caves", ConfigCategories.WORLD_GEN, true, "Should caves with trees and grass randomly generate underground?"),
|
||||||
|
|
||||||
WATER_BOWL("Water Bowl", ConfigCategories.OTHER, true, "Should right-clicking a bowl on water blocks create a water bowl?"),
|
WATER_BOWL("Water Bowl", ConfigCategories.OTHER, true, "Should right-clicking a bowl on water blocks create a water bowl?"),
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class DungeonLoot{
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onLootTableLoad(LootTableLoadEvent event){
|
public void onLootTableLoad(LootTableLoadEvent event){
|
||||||
if(ConfigBoolValues.DUNGEON_LOOT.isEnabled() && event.getName() != null && event.getTable() != null){
|
if(event.getName() != null && event.getTable() != null){
|
||||||
LootCondition[] noCondition = new LootCondition[0];
|
LootCondition[] noCondition = new LootCondition[0];
|
||||||
|
|
||||||
LootPool pool = event.getTable().getPool("main");
|
LootPool pool = event.getTable().getPool("main");
|
||||||
|
@ -58,47 +58,50 @@ public class DungeonLoot{
|
||||||
boolean addQuartz = false;
|
boolean addQuartz = false;
|
||||||
boolean addBatWings = false;
|
boolean addBatWings = false;
|
||||||
|
|
||||||
if(LootTableList.CHESTS_SIMPLE_DUNGEON.equals(event.getName())){
|
if(ConfigBoolValues.DUNGEON_LOOT.isEnabled()){
|
||||||
addCrystals = true;
|
if(LootTableList.CHESTS_SIMPLE_DUNGEON.equals(event.getName())){
|
||||||
addDrillCore = true;
|
addCrystals = true;
|
||||||
addQuartz = true;
|
addDrillCore = true;
|
||||||
|
addQuartz = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_ABANDONED_MINESHAFT.equals(event.getName())){
|
||||||
|
addCrystals = true;
|
||||||
|
addDrillCore = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_VILLAGE_BLACKSMITH.equals(event.getName())){
|
||||||
|
addDrillCore = true;
|
||||||
|
addQuartz = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_STRONGHOLD_LIBRARY.equals(event.getName())){
|
||||||
|
addBatWings = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_IGLOO_CHEST.equals(event.getName())){
|
||||||
|
addBatWings = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_DESERT_PYRAMID.equals(event.getName())){
|
||||||
|
addDrillCore = true;
|
||||||
|
addBatWings = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_NETHER_BRIDGE.equals(event.getName())){
|
||||||
|
addBatWings = true;
|
||||||
|
addCrystals = true;
|
||||||
|
addDrillCore = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_END_CITY_TREASURE.equals(event.getName())){
|
||||||
|
addBatWings = true;
|
||||||
|
addCrystals = true;
|
||||||
|
addDrillCore = true;
|
||||||
|
addQuartz = true;
|
||||||
|
}
|
||||||
|
else if(LootTableList.CHESTS_WOODLAND_MANSION.equals(event.getName())){
|
||||||
|
addBatWings = true;
|
||||||
|
addCrystals = true;
|
||||||
|
addDrillCore = true;
|
||||||
|
addQuartz = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(LootTableList.CHESTS_ABANDONED_MINESHAFT.equals(event.getName())){
|
|
||||||
addCrystals = true;
|
if(JAM_HOUSE.equals(event.getName())){
|
||||||
addDrillCore = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_VILLAGE_BLACKSMITH.equals(event.getName())){
|
|
||||||
addDrillCore = true;
|
|
||||||
addQuartz = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_STRONGHOLD_LIBRARY.equals(event.getName())){
|
|
||||||
addBatWings = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_IGLOO_CHEST.equals(event.getName())){
|
|
||||||
addBatWings = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_DESERT_PYRAMID.equals(event.getName())){
|
|
||||||
addDrillCore = true;
|
|
||||||
addBatWings = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_NETHER_BRIDGE.equals(event.getName())){
|
|
||||||
addBatWings = true;
|
|
||||||
addCrystals = true;
|
|
||||||
addDrillCore = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_END_CITY_TREASURE.equals(event.getName())){
|
|
||||||
addBatWings = true;
|
|
||||||
addCrystals = true;
|
|
||||||
addDrillCore = true;
|
|
||||||
addQuartz = true;
|
|
||||||
}
|
|
||||||
else if(LootTableList.CHESTS_WOODLAND_MANSION.equals(event.getName())){
|
|
||||||
addBatWings = true;
|
|
||||||
addCrystals = true;
|
|
||||||
addDrillCore = true;
|
|
||||||
addQuartz = true;
|
|
||||||
}
|
|
||||||
else if(JAM_HOUSE.equals(event.getName())){
|
|
||||||
LootFunction jamDamage = new SetMetadata(noCondition, new RandomValueRange(0, TheJams.values().length-1));
|
LootFunction jamDamage = new SetMetadata(noCondition, new RandomValueRange(0, TheJams.values().length-1));
|
||||||
LootFunction jamAmount = new SetCount(noCondition, new RandomValueRange(3, 5));
|
LootFunction jamAmount = new SetCount(noCondition, new RandomValueRange(3, 5));
|
||||||
pool.addEntry(new LootEntryItem(InitItems.itemJams, 2, 0, new LootFunction[]{jamDamage, jamAmount}, noCondition, ModUtil.MOD_ID+":jams"));
|
pool.addEntry(new LootEntryItem(InitItems.itemJams, 2, 0, new LootFunction[]{jamDamage, jamAmount}, noCondition, ModUtil.MOD_ID+":jams"));
|
||||||
|
|
Loading…
Reference in a new issue