mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2025-02-24 08:11:24 +01:00
Adds End and other biomes to dry biomes list
Stops acid rain damage in dry biomes https://github.com/BentoBoxWorld/AcidIsland/issues/32
This commit is contained in:
parent
02232fde3b
commit
8ee81763d1
@ -43,7 +43,7 @@ public class AcidEffect implements Listener {
|
|||||||
private final AcidIsland addon;
|
private final AcidIsland addon;
|
||||||
private final List<Player> burningPlayers = new ArrayList<>();
|
private final List<Player> burningPlayers = new ArrayList<>();
|
||||||
private final List<Player> wetPlayers = new ArrayList<>();
|
private final List<Player> wetPlayers = new ArrayList<>();
|
||||||
private final static List<PotionEffectType> EFFECTS = Arrays.asList(
|
private static final List<PotionEffectType> EFFECTS = Arrays.asList(
|
||||||
PotionEffectType.BLINDNESS,
|
PotionEffectType.BLINDNESS,
|
||||||
PotionEffectType.CONFUSION,
|
PotionEffectType.CONFUSION,
|
||||||
PotionEffectType.HUNGER,
|
PotionEffectType.HUNGER,
|
||||||
@ -51,6 +51,28 @@ public class AcidEffect implements Listener {
|
|||||||
PotionEffectType.SLOW_DIGGING,
|
PotionEffectType.SLOW_DIGGING,
|
||||||
PotionEffectType.WEAKNESS);
|
PotionEffectType.WEAKNESS);
|
||||||
|
|
||||||
|
private static final List<Biome> DRY_BIOMES = Arrays.asList(
|
||||||
|
Biome.BADLANDS,
|
||||||
|
Biome.BADLANDS_PLATEAU,
|
||||||
|
Biome.DESERT,
|
||||||
|
Biome.DESERT_HILLS,
|
||||||
|
Biome.DESERT_LAKES,
|
||||||
|
Biome.END_BARRENS,
|
||||||
|
Biome.END_HIGHLANDS,
|
||||||
|
Biome.END_MIDLANDS,
|
||||||
|
Biome.ERODED_BADLANDS,
|
||||||
|
Biome.MODIFIED_BADLANDS_PLATEAU,
|
||||||
|
Biome.MODIFIED_WOODED_BADLANDS_PLATEAU,
|
||||||
|
Biome.NETHER,
|
||||||
|
Biome.SAVANNA,
|
||||||
|
Biome.SAVANNA_PLATEAU,
|
||||||
|
Biome.SHATTERED_SAVANNA,
|
||||||
|
Biome.SHATTERED_SAVANNA_PLATEAU,
|
||||||
|
Biome.SMALL_END_ISLANDS,
|
||||||
|
Biome.THE_END,
|
||||||
|
Biome.THE_VOID,
|
||||||
|
Biome.WOODED_BADLANDS_PLATEAU);
|
||||||
|
|
||||||
public AcidEffect(AcidIsland addon) {
|
public AcidEffect(AcidIsland addon) {
|
||||||
this.addon = addon;
|
this.addon = addon;
|
||||||
// Burn monsters or animals that fall into the acid
|
// Burn monsters or animals that fall into the acid
|
||||||
@ -91,10 +113,7 @@ public class AcidEffect implements Listener {
|
|||||||
Location playerLoc = player.getLocation();
|
Location playerLoc = player.getLocation();
|
||||||
Biome biome = playerLoc.getBlock().getBiome();
|
Biome biome = playerLoc.getBlock().getBiome();
|
||||||
// Check for acid rain
|
// Check for acid rain
|
||||||
if (addon.getSettings().getAcidRainDamage() > 0D && addon.getOverWorld().hasStorm()
|
if (addon.getSettings().getAcidRainDamage() > 0D && addon.getOverWorld().hasStorm() && !DRY_BIOMES.contains(biome)) {
|
||||||
&& !biome.name().contains("DESERT")
|
|
||||||
&& !biome.equals(Biome.NETHER)
|
|
||||||
&& !biome.name().contains("SAVANNA")) {
|
|
||||||
if (isSafeFromRain(player)) {
|
if (isSafeFromRain(player)) {
|
||||||
wetPlayers.remove(player);
|
wetPlayers.remove(player);
|
||||||
} else if (!wetPlayers.contains(player)) {
|
} else if (!wetPlayers.contains(player)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user