Extract the boss-heart-drop blacklist into the config.

Closes #1787
This commit is contained in:
Bernhard Bonigl committed 2015-10-27 18:45:54 +01:00
1 parent f5f60ec588
commit 75b97cf4f9
2 files changed
+8 -3

No files matched your search

@@ -17,9 +17,12 @@ import tconstruct.armor.items.TravelWings;
import tconstruct.armor.player.ArmorExtended;
import tconstruct.armor.player.TPlayerStats;
import tconstruct.library.modifier.IModifyable;
import tconstruct.util.config.PHConstruct;
import tconstruct.util.network.ArmourGuiSyncPacket;
import tconstruct.world.entity.BlueSlime;
import java.util.Locale;
public class TinkerArmorEvents
{
@@ -43,8 +46,9 @@ public class TinkerArmorEvents
if (event.entityLiving instanceof IBossDisplayData)
{
String entityName = event.entityLiving.getClass().getSimpleName().toLowerCase();
if (entityName.contains("entitynpc") || entityName.contains("entitycustomnpc"))
return;
for(String name : PHConstruct.heartDropBlacklist)
if (name.toLowerCase(Locale.US).equals(entityName))
return;
int count = event.entityLiving instanceof EntityDragon ? 5 : 1;
for (int i = 0; i < count; i++)