Less chance for overworld TR loot and made in configurable. CLoses #1572

This commit is contained in:
drcrazy 2018-08-10 15:33:59 +03:00
parent c3979610a9
commit d37f52a0ce
14 changed files with 110 additions and 114 deletions

View file

@ -123,5 +123,12 @@ public class ConfigTechReborn {
@ConfigRegistry(config = "generators", category = "solarPanelQuantum", key = "quantumNightRate", comment = "Generation rate during night for Quantum Solar Panel (Value in EU)")
public static int quantumGenerationRateN = 64;
@ConfigRegistry(config = "worlds", category = "loot", key = "enableOverworldLoot", comment = "When true TechReborn will add ingots, machine frames and circuits to OverWorld loot chests.")
public static boolean enableOverworldLoot = true;
@ConfigRegistry(config = "worlds", category = "loot", key = "enableNetherLoot", comment = "When true TechReborn will add ingots, machine frames and circuits to Nether loot chests.")
public static boolean enableNetherLoot = true;
@ConfigRegistry(config = "worlds", category = "loot", key = "enableEndLoot", comment = "When true TechReborn will add ingots, machine frames and circuits to The End loot chests.")
public static boolean enableEndLoot = true;
}

View file

@ -37,6 +37,7 @@ import net.minecraft.world.storage.loot.conditions.LootCondition;
import net.minecraftforge.event.LootTableLoadEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import techreborn.Core;
import techreborn.config.ConfigTechReborn;
import techreborn.lib.ModInfo;
public class ModLoot {
@ -44,18 +45,24 @@ public class ModLoot {
public static List<ResourceLocation> lootTables = new ArrayList<ResourceLocation>();
public static void init() {
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/abandoned_mineshaft"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/desert_pyramid"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/end_city_treasure"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/igloo_chest"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/jungle_temple"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/nether_bridge"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/simple_dungeon"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/stronghold_corridor"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/stronghold_crossing"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/stronghold_library"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/village_blacksmith"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/woodland_mansion"));
if (ConfigTechReborn.enableOverworldLoot) {
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/abandoned_mineshaft"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/desert_pyramid"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/igloo_chest"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/jungle_temple"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/simple_dungeon"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/stronghold_corridor"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/stronghold_crossing"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/stronghold_library"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/village_blacksmith"));
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/woodland_mansion"));
}
if (ConfigTechReborn.enableNetherLoot) {
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/nether_bridge"));
}
if (ConfigTechReborn.enableEndLoot) {
lootTables.add(new ResourceLocation(ModInfo.MOD_ID, "chests/end_city_treasure"));
}
for (ResourceLocation lootTable : lootTables) {
LootTableList.register(lootTable);

View file

@ -2,16 +2,13 @@
"pools": [
{
"name": "techreborn",
"rolls": {
"min": 1,
"max": 3
},
"rolls": 1,
"entries": [
{
"type": "item",
"name": "techreborn:ingot",
"entryName": "bronze_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -30,7 +27,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "copper_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -49,7 +46,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "lead_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -68,7 +65,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "silver_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -87,7 +84,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "tin_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -106,7 +103,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "refined_iron_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -125,7 +122,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "advanced_alloy_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -144,7 +141,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "mixed_metal_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -163,7 +160,7 @@
"type": "item",
"name": "techreborn:machine_frame",
"entryName": "basic_frame",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -173,9 +170,9 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "basic_circuit",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -185,7 +182,7 @@
},
{
"type": "empty",
"weight": 20
"weight": 50
}
]
}

View file

@ -2,16 +2,13 @@
"pools": [
{
"name": "techreborn",
"rolls": {
"min": 1,
"max": 3
},
"rolls": 1,
"entries": [
{
"type": "item",
"name": "techreborn:ingot",
"entryName": "bronze_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -30,7 +27,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "copper_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -49,7 +46,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "lead_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -68,7 +65,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "silver_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -87,7 +84,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "tin_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -106,7 +103,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "refined_iron_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -125,7 +122,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "advanced_alloy_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -144,7 +141,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "mixed_metal_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -163,7 +160,7 @@
"type": "item",
"name": "techreborn:machine_frame",
"entryName": "basic_frame",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -173,9 +170,9 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "basic_circuit",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -185,7 +182,7 @@
},
{
"type": "empty",
"weight": 20
"weight": 50
}
]
}

View file

@ -173,7 +173,7 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "energy_flow_circuit",
"weight": 30,
"functions": [

View file

@ -2,16 +2,13 @@
"pools": [
{
"name": "techreborn",
"rolls": {
"min": 1,
"max": 3
},
"rolls": 1,
"entries": [
{
"type": "item",
"name": "techreborn:ingot",
"entryName": "bronze_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -30,7 +27,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "copper_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -49,7 +46,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "lead_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -68,7 +65,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "silver_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -87,7 +84,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "tin_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -106,7 +103,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "refined_iron_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -125,7 +122,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "advanced_alloy_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -144,7 +141,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "mixed_metal_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -163,7 +160,7 @@
"type": "item",
"name": "techreborn:machine_frame",
"entryName": "basic_frame",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -173,9 +170,9 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "basic_circuit",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -185,7 +182,7 @@
},
{
"type": "empty",
"weight": 20
"weight": 50
}
]
}

View file

@ -2,16 +2,13 @@
"pools": [
{
"name": "techreborn",
"rolls": {
"min": 1,
"max": 3
},
"rolls": 1,
"entries": [
{
"type": "item",
"name": "techreborn:ingot",
"entryName": "bronze_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -30,7 +27,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "copper_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -49,7 +46,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "lead_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -68,7 +65,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "silver_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -87,7 +84,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "tin_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -106,7 +103,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "refined_iron_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -125,7 +122,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "advanced_alloy_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -144,7 +141,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "mixed_metal_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -163,7 +160,7 @@
"type": "item",
"name": "techreborn:machine_frame",
"entryName": "basic_frame",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -173,9 +170,9 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "basic_circuit",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -185,7 +182,7 @@
},
{
"type": "empty",
"weight": 20
"weight": 50
}
]
}

View file

@ -166,7 +166,7 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "data_storage_circuit",
"weight": 15,
"functions": [

View file

@ -2,16 +2,13 @@
"pools": [
{
"name": "techreborn",
"rolls": {
"min": 1,
"max": 3
},
"rolls": 1,
"entries": [
{
"type": "item",
"name": "techreborn:ingot",
"entryName": "bronze_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -30,7 +27,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "copper_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -49,7 +46,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "lead_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -68,7 +65,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "silver_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -87,7 +84,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "tin_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -106,7 +103,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "refined_iron_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -125,7 +122,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "advanced_alloy_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -144,7 +141,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "mixed_metal_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -163,7 +160,7 @@
"type": "item",
"name": "techreborn:machine_frame",
"entryName": "basic_frame",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -173,9 +170,9 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "basic_circuit",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -185,7 +182,7 @@
},
{
"type": "empty",
"weight": 20
"weight": 50
}
]
}

View file

@ -166,7 +166,7 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "data_storage_circuit",
"weight": 15,
"functions": [

View file

@ -166,7 +166,7 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "data_storage_circuit",
"weight": 15,
"functions": [

View file

@ -166,7 +166,7 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "data_storage_circuit",
"weight": 15,
"functions": [

View file

@ -2,16 +2,13 @@
"pools": [
{
"name": "techreborn",
"rolls": {
"min": 1,
"max": 3
},
"rolls": 1,
"entries": [
{
"type": "item",
"name": "techreborn:ingot",
"entryName": "bronze_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -30,7 +27,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "copper_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -49,7 +46,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "lead_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -68,7 +65,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "silver_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -87,7 +84,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "tin_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -106,7 +103,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "refined_iron_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -125,7 +122,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "advanced_alloy_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -144,7 +141,7 @@
"type": "item",
"name": "techreborn:ingot",
"entryName": "mixed_metal_ingot",
"weight": 10,
"weight": 5,
"functions": [
{
"function": "set_count",
@ -163,7 +160,7 @@
"type": "item",
"name": "techreborn:machine_frame",
"entryName": "basic_frame",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -173,9 +170,9 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "basic_circuit",
"weight": 30,
"weight": 5,
"functions": [
{
"function": "set_data",
@ -185,7 +182,7 @@
},
{
"type": "empty",
"weight": 20
"weight": 50
}
]
}

View file

@ -173,7 +173,7 @@
},
{
"type": "item",
"name": "techreborn:machine_frame",
"name": "techreborn:part",
"entryName": "energy_flow_circuit",
"weight": 30,
"functions": [