adjusted bloodmoon settings
This commit is contained in:
@@ -13,6 +13,7 @@ import net.kyori.adventure.bossbar.BossBar;
|
|||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
import net.kyori.adventure.text.format.TextDecoration;
|
import net.kyori.adventure.text.format.TextDecoration;
|
||||||
|
import net.kyori.adventure.util.Ticks;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -30,6 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
|
@SuppressWarnings("FieldCanBeLocal")
|
||||||
public class Bloodmoon extends Appliance {
|
public class Bloodmoon extends Appliance {
|
||||||
// für alle Dimensionen? einstellbar machen?
|
// für alle Dimensionen? einstellbar machen?
|
||||||
|
|
||||||
@@ -64,9 +66,9 @@ public class Bloodmoon extends Appliance {
|
|||||||
new MobEffect.PotionMobEffect(PotionEffectType.SLOWNESS, 2.5, 2)
|
new MobEffect.PotionMobEffect(PotionEffectType.SLOWNESS, 2.5, 2)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
public final int expMultiplier = 4;
|
public final int expMultiplier = 3;
|
||||||
public final double mobDamageMultipier = 2;
|
public final double mobDamageMultiplier = 2;
|
||||||
public final double mobHealthMultiplier = 3;
|
public final double mobHealthMultiplier = 2;
|
||||||
|
|
||||||
private boolean isActive = false;
|
private boolean isActive = false;
|
||||||
private final BossBar bossBar = BossBar.bossBar(
|
private final BossBar bossBar = BossBar.bossBar(
|
||||||
@@ -77,8 +79,8 @@ public class Bloodmoon extends Appliance {
|
|||||||
Set.of(BossBar.Flag.CREATE_WORLD_FOG, BossBar.Flag.DARKEN_SCREEN)
|
Set.of(BossBar.Flag.CREATE_WORLD_FOG, BossBar.Flag.DARKEN_SCREEN)
|
||||||
);
|
);
|
||||||
private final boolean hordesEnabled = true;
|
private final boolean hordesEnabled = true;
|
||||||
private final int hordeSpawnRateTicks = 800;
|
private final int hordeSpawnRateTicks = 40 * Ticks.TICKS_PER_SECOND;
|
||||||
private final int hordeSpawnRateVariationTicks = 800;
|
private final int hordeSpawnRateVariationTicks = 40 * Ticks.TICKS_PER_SECOND;
|
||||||
private final int hordeMinPopulation = 3;
|
private final int hordeMinPopulation = 3;
|
||||||
private final int hordeMaxPopulation = 10;
|
private final int hordeMaxPopulation = 10;
|
||||||
private final int hordeSpawnDistance = 10;
|
private final int hordeSpawnDistance = 10;
|
||||||
@@ -88,11 +90,11 @@ public class Bloodmoon extends Appliance {
|
|||||||
EntityType.SPIDER
|
EntityType.SPIDER
|
||||||
);
|
);
|
||||||
private final Map<Player, @Nullable BukkitTask> hordeSpawnTasks = new HashMap<>();
|
private final Map<Player, @Nullable BukkitTask> hordeSpawnTasks = new HashMap<>();
|
||||||
public final int bloodmoonLength = 12000;
|
|
||||||
public final int ticksPerDay = 24000;
|
public final int ticksPerDay = 24000;
|
||||||
|
public final int bloodmoonLength = ticksPerDay/2;
|
||||||
private final int bloodmoonFreeDaysAtStart = 3;
|
private final int bloodmoonFreeDaysAtStart = 3;
|
||||||
private final int bloodmoonStartTime = 12000;
|
private final int bloodmoonStartTime = ticksPerDay/2;
|
||||||
private final int bloodmoonDayInterval = 2;
|
private final int bloodmoonDayInterval = 30;
|
||||||
private final int minBonusDrops = 1;
|
private final int minBonusDrops = 1;
|
||||||
private final int maxBonusDrops = 4;
|
private final int maxBonusDrops = 4;
|
||||||
private final Map<ItemStack, Integer> bonusDropWeightMap = Map.of(
|
private final Map<ItemStack, Integer> bonusDropWeightMap = Map.of(
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class BloodmoonEntityDamageListener extends ApplianceListener<Bloodmoon>
|
|||||||
|
|
||||||
if(this.getAppliance().isAffectedMob(damager) && receiver instanceof Player player) {
|
if(this.getAppliance().isAffectedMob(damager) && receiver instanceof Player player) {
|
||||||
if(!this.getAppliance().getBloodmoonSetting(player)) return;
|
if(!this.getAppliance().getBloodmoonSetting(player)) return;
|
||||||
event.setDamage(event.getDamage() * this.getAppliance().mobDamageMultipier);
|
event.setDamage(event.getDamage() * this.getAppliance().mobDamageMultiplier);
|
||||||
this.getAppliance().affectedMobEffectMap.get(damager.getType()).forEach(mobEffect -> mobEffect.apply(player));
|
this.getAppliance().affectedMobEffectMap.get(damager.getType()).forEach(mobEffect -> mobEffect.apply(player));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user