Skip to content

Commit

Permalink
chores: change default effect time to 30 sec to match vanilla
Browse files Browse the repository at this point in the history
  • Loading branch information
IWareQ committed Jun 27, 2024
1 parent 75a9523 commit 25ca707
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -64,11 +63,7 @@ default float getMaxHealth() {
void setMaxHealth(float value);

default List<NbtMap> saveAttributes() {
List<NbtMap> list = new ArrayList<>();
for (var attribute : getAttributes()) {
list.add(attribute.toNBT());
}
return list;
return getAttributes().stream().map(Attribute::toNBT).toList();
}

default void sendAttributesToClient() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down

0 comments on commit 25ca707

Please sign in to comment.