diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index a2cddd7cc..d95a00f06 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -1022,15 +1022,10 @@ opencomputers { # Radius in blocks of the disintegration behavior for each active input. disintegrationRange: 1 - # Blacklisted potions, i.e. potions that won't be used for the potion + # Whitelisted potions, i.e. potions that will be used for the potion # behaviors nanomachines may trigger. This can contain strings or numbers. # In the case of strings, it has to be the internal name of the potion, - # in case of a number it has to be the potion ID. Use this to disable - # *bad* potion effects, since they will all be enabled by default. - potionBlacklist: [ - ] - - # Whitelisted potions, see potionBlacklist. Add *good* potion effects + # in case of a number it has to be the potion ID. Add any potion effects # to make use of here, since they will all be disabled by default. potionWhitelist: [ "potion.moveSpeed", @@ -1042,7 +1037,17 @@ opencomputers { "potion.waterBreathing", "potion.nightVision", "potion.healthBoost", - "potion.absorption" + "potion.absorption", + + "potion.blindness", + "potion.confusion", + "potion.digSlowDown", + "potion.harm", + "potion.hunger", + "potion.moveSlowdown", + "potion.poison", + "potion.weakness", + "potion.wither" ] } diff --git a/src/main/scala/li/cil/oc/common/nanomachines/provider/PotionProvider.scala b/src/main/scala/li/cil/oc/common/nanomachines/provider/PotionProvider.scala index 452ba552c..45affc130 100644 --- a/src/main/scala/li/cil/oc/common/nanomachines/provider/PotionProvider.scala +++ b/src/main/scala/li/cil/oc/common/nanomachines/provider/PotionProvider.scala @@ -14,7 +14,6 @@ import scala.collection.convert.WrapAsScala._ object PotionProvider extends ScalaProvider("c29e4eec-5a46-479a-9b3d-ad0f06da784a") { // Lazy to give other mods a chance to register their potions. lazy val PotionWhitelist = filterPotions(Settings.get.nanomachinePotionWhitelist) - lazy val PotionBlacklist = filterPotions(Settings.get.nanomachinePotionBlacklist) def filterPotions[T](list: Iterable[T]) = { list.map { @@ -26,7 +25,7 @@ object PotionProvider extends ScalaProvider("c29e4eec-5a46-479a-9b3d-ad0f06da784 }.toSet } - def isPotionEligible(potion: Potion) = potion != null && (if (potion.isBadEffect) !PotionBlacklist.contains(potion) else PotionWhitelist.contains(potion)) + def isPotionEligible(potion: Potion) = potion != null && PotionWhitelist.contains(potion) override def createScalaBehaviors(player: EntityPlayer) = { Potion.potionTypes.filter(isPotionEligible).map(new PotionBehavior(_, player))