Skip to content

Commit

Permalink
Add a config option to disable Tinker Villagers trading. They'll have…
Browse files Browse the repository at this point in the history
… normal villager trades then. #1291
  • Loading branch information
bonii-xx committed Jan 2, 2015
1 parent 22e9f49 commit dd4e165
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/tconstruct/TConstruct.java
Expand Up @@ -170,7 +170,9 @@ public void preInit (FMLPreInitializationEvent event)
// adds to the villager spawner egg
VillagerRegistry.instance().registerVillagerId(78943);
// moved down, not needed if 'addToVillages' is false
VillagerRegistry.instance().registerVillageTradeHandler(78943, new TVillageTrades());
if(PHConstruct.allowVillagerTrading)
VillagerRegistry.instance().registerVillageTradeHandler(78943, new TVillageTrades());

VillagerRegistry.instance().registerVillageCreationHandler(new VillageToolStationHandler());
VillagerRegistry.instance().registerVillageCreationHandler(new VillageSmelteryHandler());
MapGenStructureIO.func_143031_a(ComponentToolWorkshop.class, "TConstruct:ToolWorkshopStructure");
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/tconstruct/util/config/PHConstruct.java
Expand Up @@ -8,6 +8,7 @@
public class PHConstruct
{


public static void initProps (File location)
{

Expand Down Expand Up @@ -116,6 +117,7 @@ public static void initProps (File location)
generateAluminumBush = config.get("Worldgen Disabler", "Generate Aluminum Bushes", true).getBoolean(true);
generateEssenceBush = config.get("Worldgen Disabler", "Generate Essence Bushes", true).getBoolean(true);
addToVillages = config.get("Worldgen Disabler", "Add Village Generation", true).getBoolean(true);
allowVillagerTrading = config.get("Worldgen Disabler", "Enable the Tinkers Villager to trade for oreberries", true).getBoolean(true);

copperuDensity = config.get("Worldgen", "Copper Underground Density", 2, "Density: Chances per chunk").getInt(2);
tinuDensity = config.get("Worldgen", "Tin Underground Density", 2).getInt(2);
Expand Down Expand Up @@ -239,6 +241,7 @@ public static void initProps (File location)
public static boolean generateEssenceBush;

public static boolean addToVillages;
public static boolean allowVillagerTrading;

public static int copperuDensity;
public static int tinuDensity;
Expand Down

0 comments on commit dd4e165

Please sign in to comment.