mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-24 17:32:52 +08:00
Use a Set over an IntSet for worktops
This commit is contained in:
parent
afd22a9bcd
commit
312c98ee19
@ -9,22 +9,24 @@ import emu.grasscutter.net.proto.SceneGadgetInfoOuterClass.SceneGadgetInfo;
|
|||||||
import emu.grasscutter.net.proto.SelectWorktopOptionReqOuterClass.SelectWorktopOptionReq;
|
import emu.grasscutter.net.proto.SelectWorktopOptionReqOuterClass.SelectWorktopOptionReq;
|
||||||
import emu.grasscutter.net.proto.WorktopInfoOuterClass.WorktopInfo;
|
import emu.grasscutter.net.proto.WorktopInfoOuterClass.WorktopInfo;
|
||||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public final class GadgetWorktop extends GadgetContent {
|
public final class GadgetWorktop extends GadgetContent {
|
||||||
private IntSet worktopOptions;
|
private Set<Integer> worktopOptions;
|
||||||
private WorktopWorktopOptionHandler handler;
|
private WorktopWorktopOptionHandler handler;
|
||||||
|
|
||||||
public GadgetWorktop(EntityGadget gadget) {
|
public GadgetWorktop(EntityGadget gadget) {
|
||||||
super(gadget);
|
super(gadget);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntSet getWorktopOptions() {
|
public Set<Integer> getWorktopOptions() {
|
||||||
if (this.worktopOptions == null) {
|
if (this.worktopOptions == null) {
|
||||||
this.worktopOptions = new IntOpenHashSet();
|
this.worktopOptions = new HashSet<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return worktopOptions;
|
return worktopOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user