From c8a3b7d64d001106cfcf9860b7014279caefcfc6 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 1 Jan 2022 01:03:22 +0200 Subject: [PATCH] Fixed ability orders randomly changing --- .../java/com/minelittlepony/unicopia/ability/Abilities.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/Abilities.java b/src/main/java/com/minelittlepony/unicopia/ability/Abilities.java index 13bd5e20..94d4525c 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/Abilities.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/Abilities.java @@ -1,7 +1,7 @@ package com.minelittlepony.unicopia.ability; import java.util.EnumMap; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import com.minelittlepony.unicopia.util.Registries; @@ -42,7 +42,7 @@ public interface Abilities { static > T register(T power, String name, AbilitySlot slot) { Identifier id = new Identifier("unicopia", name); - BY_SLOT.computeIfAbsent(slot, s -> new HashSet<>()).add(power); + BY_SLOT.computeIfAbsent(slot, s -> new LinkedHashSet<>()).add(power); return Registry.register(REGISTRY, id, power); } }