Skip to content

Commit

Permalink
Add a config option if villagers are meltable into emeralds. #1400
Browse files Browse the repository at this point in the history
If disabled they'll give blood. And horses will do that too now if the option for glue is disabled.
  • Loading branch information
bonii-xx committed Feb 14, 2015
1 parent 3473d7a commit 4611e2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java
Expand Up @@ -333,7 +333,7 @@ void detectEntities ()
{
if (moltenMetal.size() >= 1)
{
if (o instanceof EntityVillager)
if (o instanceof EntityVillager && PHConstruct.meltableVillagers)
{
EntityVillager villager = (EntityVillager) o;
if (villager.attackEntityFrom(new SmelteryDamageSource(), 5))
Expand Down Expand Up @@ -367,10 +367,10 @@ else if (o instanceof EntityIronGolem)
}
}
}
else if (o instanceof EntityHorse)
else if (o instanceof EntityHorse && PHConstruct.meltableHorses)
{
EntityHorse horse = (EntityHorse) o;
if (PHConstruct.meltableHorses && horse.attackEntityFrom(new SmelteryDamageSource(), 5))
if (horse.attackEntityFrom(new SmelteryDamageSource(), 5))
{
if (currentLiquid + 108 < maxLiquid)
{
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/util/config/PHConstruct.java
Expand Up @@ -189,6 +189,7 @@ public static void initProps (File location)
throwableSmeltery = config.get("Experimental", "Items can be thrown into smelteries", true).getBoolean(true);
newSmeltery = config.get("Experimental", "Use new adaptive Smeltery code", false, "Warning: Very buggy").getBoolean(false);
meltableHorses = config.get("Experimental", "Allow horses to be melted down for glue", true).getBoolean(true);
meltableVillagers = config.get("Experimental", "Allow villagers to be melted down for emeralds", true).getBoolean(true);
minimalTextures = config.get("Experimental", "Minimal Textures", false).getBoolean(false);
extraBlockUpdates = config.get("Experimental", "Send additional block updates when using AOE tools", true,"This fixes very fast tools sometimes resulting in ghost blocks, but causes a bit more network traffic. Should be fine in theory.").getBoolean(true);

Expand Down Expand Up @@ -362,6 +363,7 @@ public static void initProps (File location)
public static boolean throwableSmeltery;
public static boolean newSmeltery;
public static boolean meltableHorses;
public static boolean meltableVillagers;
public static boolean minimalTextures;
public static boolean extraBlockUpdates;

Expand Down

0 comments on commit 4611e2b

Please sign in to comment.