Skip to content

Commit

Permalink
chore: 优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
mcchampions committed Nov 29, 2024
1 parent cbcc25b commit 0294ff5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<FieldKey> fields) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -46,7 +43,7 @@
public class GoldPan extends SimpleSlimefunItem<ItemUseHandler> implements RecipeDisplayItem {
private final RandomizedSet<ItemStack> randomizer = new RandomizedSet<>();
@Getter
private final Set<Material> inputMaterials = new HashSet<>(List.of(Material.GRAVEL));
private final Set<Material> inputMaterials = EnumSet.of(Material.GRAVEL);
private final Set<GoldPanDrop> drops = new HashSet<>();

public GoldPan(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
Expand Down

0 comments on commit 0294ff5

Please sign in to comment.