Added config for Rubber Tree plantations in villages. Closes #1639
This commit is contained in:
parent
3b1b0b59da
commit
e2c8284bc5
2 changed files with 20 additions and 5 deletions
|
@ -54,6 +54,7 @@ import techreborn.client.GuiHandler;
|
||||||
import techreborn.command.TechRebornDevCommand;
|
import techreborn.command.TechRebornDevCommand;
|
||||||
import techreborn.compat.CompatManager;
|
import techreborn.compat.CompatManager;
|
||||||
import techreborn.compat.ICompatModule;
|
import techreborn.compat.ICompatModule;
|
||||||
|
import techreborn.config.ConfigTechReborn;
|
||||||
import techreborn.dispenser.BehaviorDispenseScrapbox;
|
import techreborn.dispenser.BehaviorDispenseScrapbox;
|
||||||
import techreborn.entities.EntityNukePrimed;
|
import techreborn.entities.EntityNukePrimed;
|
||||||
import techreborn.events.BlockBreakHandler;
|
import techreborn.events.BlockBreakHandler;
|
||||||
|
@ -135,23 +136,27 @@ public class Core {
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
|
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
|
||||||
// Registers Chest Loot
|
|
||||||
ModLoot.init();
|
ModLoot.init();
|
||||||
MinecraftForge.EVENT_BUS.register(new ModLoot());
|
MinecraftForge.EVENT_BUS.register(new ModLoot());
|
||||||
// Sounds
|
|
||||||
ModSounds.init();
|
ModSounds.init();
|
||||||
|
|
||||||
// Compat
|
// Compat
|
||||||
for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
|
for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
|
||||||
compatModule.init(event);
|
compatModule.init(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Client only init, needs to be done before parts system
|
// Client only init, needs to be done before parts system
|
||||||
proxy.init(event);
|
proxy.init(event);
|
||||||
|
|
||||||
// WorldGen
|
// WorldGen
|
||||||
worldGen.load();
|
worldGen.load();
|
||||||
GameRegistry.registerWorldGenerator(worldGen, 0);
|
GameRegistry.registerWorldGenerator(worldGen, 0);
|
||||||
GameRegistry.registerWorldGenerator(new OilLakeGenerator(), 0);
|
GameRegistry.registerWorldGenerator(new OilLakeGenerator(), 0);
|
||||||
|
|
||||||
// Register Gui Handler
|
// Register Gui Handler
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new GuiHandler());
|
||||||
|
|
||||||
// Event busses
|
// Event busses
|
||||||
MinecraftForge.EVENT_BUS.register(new StackWIPHandler());
|
MinecraftForge.EVENT_BUS.register(new StackWIPHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(new BlockBreakHandler());
|
MinecraftForge.EVENT_BUS.register(new BlockBreakHandler());
|
||||||
|
@ -160,10 +165,16 @@ public class Core {
|
||||||
MinecraftForge.EVENT_BUS.register(new MultiblockServerTickHandler());
|
MinecraftForge.EVENT_BUS.register(new MultiblockServerTickHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(new TRTickHandler());
|
MinecraftForge.EVENT_BUS.register(new TRTickHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(worldGen.retroGen);
|
MinecraftForge.EVENT_BUS.register(worldGen.retroGen);
|
||||||
|
|
||||||
//Village stuff
|
//Village stuff
|
||||||
|
if (ConfigTechReborn.enableRubberTreePlantation) {
|
||||||
VillagerRegistry.instance().registerVillageCreationHandler(new VillagePlantaionHandler());
|
VillagerRegistry.instance().registerVillageCreationHandler(new VillagePlantaionHandler());
|
||||||
MapGenStructureIO.registerStructureComponent(VillageComponentRubberPlantaion.class, new ResourceLocation(ModInfo.MOD_ID, "rubberplantation").toString());
|
MapGenStructureIO.registerStructureComponent(VillageComponentRubberPlantaion.class,
|
||||||
ModLootTables.CHESTS_RUBBER_PLANTATION.toString(); //Done to make it load, then it will be read from disk
|
new ResourceLocation(ModInfo.MOD_ID, "rubberplantation").toString());
|
||||||
|
// Done to make it load, then it will be read from disk
|
||||||
|
ModLootTables.CHESTS_RUBBER_PLANTATION.toString();
|
||||||
|
}
|
||||||
|
|
||||||
// Scrapbox
|
// Scrapbox
|
||||||
if (BehaviorDispenseScrapbox.dispenseScrapboxes) {
|
if (BehaviorDispenseScrapbox.dispenseScrapboxes) {
|
||||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(ModItems.SCRAP_BOX, new BehaviorDispenseScrapbox());
|
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(ModItems.SCRAP_BOX, new BehaviorDispenseScrapbox());
|
||||||
|
|
|
@ -131,4 +131,8 @@ public class ConfigTechReborn {
|
||||||
|
|
||||||
@ConfigRegistry(config = "world", category = "loot", key = "enableEndLoot", comment = "When true TechReborn will add ingots, machine frames and circuits to The End loot chests.")
|
@ConfigRegistry(config = "world", 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;
|
public static boolean enableEndLoot = true;
|
||||||
|
|
||||||
|
@ConfigRegistry(config = "world", category = "village", key = "enableRubberTreePlantation", comment = "When true TechReborn will add Rubber tree farm to villages.")
|
||||||
|
public static boolean enableRubberTreePlantation = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue