develop-bloodmoon
master
# Conflicts: # craftattack/src/main/java/eu/mhsl/craftattack/spawn/craftattack/appliances/gameplay/bloodmoon/Bloodmoon.java
@@ -0,0 +33,4 @@
@SuppressWarnings("FieldCanBeLocal")
public class Bloodmoon extends Appliance {
// für alle Dimensionen? einstellbar machen?
?
@@ -0,0 +55,4 @@
EntityType.DROWNED, Set.of(
new MobEffect.PotionMobEffect(PotionEffectType.WITHER, 7, 1)
),
EntityType.WITCH, Set.of(),
wenn keine Effekte, wozu der Eintrag?
Damit Hexen trotzdem mehr Schaden machen und mehr Leben haben.
@@ -0,0 +49,4 @@
EntityType.CREEPER, Set.of(
new MobEffect.LightningMobEffect()
EntityType.HUSK, Set.of(
stray?
@@ -0,0 +89,4 @@
EntityType.SKELETON,
EntityType.SPIDER
);
private final Map<Player, @Nullable BukkitTask> hordeSpawnTasks = new HashMap<>();
WeakHashMap implementierung verwenden
@@ -0,0 +155,4 @@
private void startHordeSpawning(int delay, Player player) {
@Nullable BukkitTask task = this.hordeSpawnTasks.get(player);
if(task != null) task.cancel();
task = Bukkit.getScheduler().runTaskLater(
hier die Variable aus dem map.get zu überschreiben sieht komisch aus Mach doch eine neue Variable, du setzt unten ja sowiso manuell .put
@@ -0,0 +230,4 @@
private ItemStack getRandomBonusDrop() {
int totalWeight = this.bonusDropWeightMap.values().stream().mapToInt(value -> value).sum();
int randomInt = ThreadLocalRandom.current().nextInt(0, totalWeight + 1);
eine klassenvariable random würde wahrscheinlich sinn machen
random
@@ -0,0 +228,4 @@
return result;
}
ggf. Nullable annotation und schauen, ob nulls in der drop liste irgendwelche Probleme machen
@@ -0,0 +34,4 @@
@Override
protected Material icon() {
return Material.CLOCK;
mMn. würde hier ein Skeleton-Skull oder auch eine ominous potion besser als icon passen
@@ -0,0 +23,4 @@
this.getAppliance().sendAnnouncementMessages();
return;
if(this.getAppliance().isStartTick(currentTime + 1000)) {
magic number in variable auslagern in der Appliance configmäßig
@@ -0,0 +18,4 @@
this.getAppliance().stopBloodmoon();
this.getAppliance().updateBossBar();
kannst du das ein bisschen debouncen?
sowas wie if(currentTime % 20 == 0) this.getAppliance().updateBossBar();
if(currentTime % 20 == 0) this.getAppliance().updateBossBar();
No dependencies set.
The note is not visible to the blocked user.
@@ -0,0 +33,4 @@@SuppressWarnings("FieldCanBeLocal")public class Bloodmoon extends Appliance {// für alle Dimensionen? einstellbar machen??
@@ -0,0 +55,4 @@EntityType.DROWNED, Set.of(new MobEffect.PotionMobEffect(PotionEffectType.WITHER, 7, 1)),EntityType.WITCH, Set.of(),wenn keine Effekte, wozu der Eintrag?
Damit Hexen trotzdem mehr Schaden machen und mehr Leben haben.
@@ -0,0 +49,4 @@EntityType.CREEPER, Set.of(new MobEffect.LightningMobEffect()),EntityType.HUSK, Set.of(stray?
@@ -0,0 +89,4 @@EntityType.SKELETON,EntityType.SPIDER);private final Map<Player, @Nullable BukkitTask> hordeSpawnTasks = new HashMap<>();WeakHashMap implementierung verwenden
@@ -0,0 +155,4 @@private void startHordeSpawning(int delay, Player player) {@Nullable BukkitTask task = this.hordeSpawnTasks.get(player);if(task != null) task.cancel();task = Bukkit.getScheduler().runTaskLater(hier die Variable aus dem map.get zu überschreiben sieht komisch aus
Mach doch eine neue Variable, du setzt unten ja sowiso manuell .put
@@ -0,0 +230,4 @@private ItemStack getRandomBonusDrop() {int totalWeight = this.bonusDropWeightMap.values().stream().mapToInt(value -> value).sum();int randomInt = ThreadLocalRandom.current().nextInt(0, totalWeight + 1);eine klassenvariable
randomwürde wahrscheinlich sinn machen@@ -0,0 +228,4 @@return result;}private ItemStack getRandomBonusDrop() {ggf. Nullable annotation und schauen, ob nulls in der drop liste irgendwelche Probleme machen
@@ -0,0 +34,4 @@@Overrideprotected Material icon() {return Material.CLOCK;mMn. würde hier ein Skeleton-Skull oder auch eine ominous potion besser als icon passen
@@ -0,0 +23,4 @@this.getAppliance().sendAnnouncementMessages();return;}if(this.getAppliance().isStartTick(currentTime + 1000)) {magic number in variable auslagern in der Appliance configmäßig
@@ -0,0 +18,4 @@this.getAppliance().stopBloodmoon();return;}this.getAppliance().updateBossBar();kannst du das ein bisschen debouncen?
sowas wie
if(currentTime % 20 == 0) this.getAppliance().updateBossBar();