From 25ca707b53ce3f463054036812024ea7be857eaf Mon Sep 17 00:00:00 2001 From: Dmitry Luk Date: Thu, 27 Jun 2024 17:31:57 +0500 Subject: [PATCH] chores: change default effect time to 30 sec to match vanilla --- .../entity/component/common/EntityAttributeComponent.java | 7 +------ .../org/allaymc/server/command/defaults/EffectCommand.java | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Allay-API/src/main/java/org/allaymc/api/entity/component/common/EntityAttributeComponent.java b/Allay-API/src/main/java/org/allaymc/api/entity/component/common/EntityAttributeComponent.java index e3bdf8563..ed6724301 100644 --- a/Allay-API/src/main/java/org/allaymc/api/entity/component/common/EntityAttributeComponent.java +++ b/Allay-API/src/main/java/org/allaymc/api/entity/component/common/EntityAttributeComponent.java @@ -6,7 +6,6 @@ import org.allaymc.api.entity.component.EntityComponent; import org.cloudburstmc.nbt.NbtMap; -import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -64,11 +63,7 @@ default float getMaxHealth() { void setMaxHealth(float value); default List saveAttributes() { - List list = new ArrayList<>(); - for (var attribute : getAttributes()) { - list.add(attribute.toNBT()); - } - return list; + return getAttributes().stream().map(Attribute::toNBT).toList(); } default void sendAttributesToClient() {} diff --git a/Allay-Server/src/main/java/org/allaymc/server/command/defaults/EffectCommand.java b/Allay-Server/src/main/java/org/allaymc/server/command/defaults/EffectCommand.java index 65d66a7e5..5223599b8 100644 --- a/Allay-Server/src/main/java/org/allaymc/server/command/defaults/EffectCommand.java +++ b/Allay-Server/src/main/java/org/allaymc/server/command/defaults/EffectCommand.java @@ -23,7 +23,7 @@ public void prepareCommandTree(CommandTree tree) { tree.getRoot() .playerTarget("player") .effectNode("effect") - .intNum("seconds", 15).optional() + .intNum("seconds", 30).optional() .intNum("amplifier").optional() .bool("hideParticles").optional() .exec(context -> {