From 0294ff58b4c7711f1274ae431c0d8707c26c8560 Mon Sep 17 00:00:00 2001 From: mcchampions <1309635304@qq.com> Date: Fri, 29 Nov 2024 13:26:56 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/plugin/slimefun4/storage/common/RecordKey.java | 7 ++----- .../slimefun4/implementation/items/tools/GoldPan.java | 9 +++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/common/RecordKey.java b/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/common/RecordKey.java index 789d4b676b..193212ae4a 100644 --- a/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/common/RecordKey.java +++ b/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/common/RecordKey.java @@ -3,10 +3,7 @@ import io.github.bakedlibs.dough.collections.Pair; import lombok.Getter; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; +import java.util.*; public class RecordKey extends ScopeKey { @Getter @@ -17,7 +14,7 @@ public class RecordKey extends ScopeKey { private volatile boolean changed = true; public RecordKey(DataScope scope) { - this(scope, new HashSet<>()); + this(scope, EnumSet.noneOf(FieldKey.class)); } public RecordKey(DataScope scope, Set fields) { diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java index b10e1374c4..effb1aaaba 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GoldPan.java @@ -17,11 +17,8 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.AutomatedPanningMachine; import io.github.thebusybiscuit.slimefun4.implementation.settings.GoldPanDrop; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; + +import java.util.*; import javax.annotation.Nullable; import lombok.Getter; @@ -46,7 +43,7 @@ public class GoldPan extends SimpleSlimefunItem implements RecipeDisplayItem { private final RandomizedSet randomizer = new RandomizedSet<>(); @Getter - private final Set inputMaterials = new HashSet<>(List.of(Material.GRAVEL)); + private final Set inputMaterials = EnumSet.of(Material.GRAVEL); private final Set drops = new HashSet<>(); public GoldPan(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {