develop-bloodmoon #10
@@ -13,6 +13,7 @@ import net.kyori.adventure.bossbar.BossBar;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.format.TextDecoration;
|
||||
import net.kyori.adventure.util.Ticks;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
@@ -30,6 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
public class Bloodmoon extends Appliance {
|
||||
// für alle Dimensionen? einstellbar machen?
|
||||
|
Pupsi marked this conversation as resolved
Outdated
|
||||
|
||||
@@ -64,9 +66,9 @@ public class Bloodmoon extends Appliance {
|
||||
new MobEffect.PotionMobEffect(PotionEffectType.SLOWNESS, 2.5, 2)
|
||||
)
|
||||
);
|
||||
public final int expMultiplier = 4;
|
||||
public final double mobDamageMultipier = 2;
|
||||
public final double mobHealthMultiplier = 3;
|
||||
public final int expMultiplier = 3;
|
||||
public final double mobDamageMultiplier = 2;
|
||||
public final double mobHealthMultiplier = 2;
|
||||
|
||||
private boolean isActive = false;
|
||||
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)
|
||||
);
|
||||
private final boolean hordesEnabled = true;
|
||||
private final int hordeSpawnRateTicks = 800;
|
||||
private final int hordeSpawnRateVariationTicks = 800;
|
||||
private final int hordeSpawnRateTicks = 40 * Ticks.TICKS_PER_SECOND;
|
||||
private final int hordeSpawnRateVariationTicks = 40 * Ticks.TICKS_PER_SECOND;
|
||||
private final int hordeMinPopulation = 3;
|
||||
private final int hordeMaxPopulation = 10;
|
||||
private final int hordeSpawnDistance = 10;
|
||||
@@ -88,11 +90,11 @@ public class Bloodmoon extends Appliance {
|
||||
EntityType.SPIDER
|
||||
);
|
||||
private final Map<Player, @Nullable BukkitTask> hordeSpawnTasks = new HashMap<>();
|
||||
|
Pupsi marked this conversation as resolved
Outdated
MineTec
commented
WeakHashMap implementierung verwenden WeakHashMap implementierung verwenden
|
||||
public final int bloodmoonLength = 12000;
|
||||
public final int ticksPerDay = 24000;
|
||||
public final int bloodmoonLength = ticksPerDay/2;
|
||||
private final int bloodmoonFreeDaysAtStart = 3;
|
||||
private final int bloodmoonStartTime = 12000;
|
||||
private final int bloodmoonDayInterval = 2;
|
||||
private final int bloodmoonStartTime = ticksPerDay/2;
|
||||
private final int bloodmoonDayInterval = 30;
|
||||
private final int minBonusDrops = 1;
|
||||
private final int maxBonusDrops = 4;
|
||||
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().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));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user
?