Use a Set over an IntSet for worktops

This commit is contained in:
KingRainbow44 2023-05-04 00:58:09 -04:00
parent afd22a9bcd
commit 312c98ee19
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -9,22 +9,24 @@ import emu.grasscutter.net.proto.SceneGadgetInfoOuterClass.SceneGadgetInfo;
import emu.grasscutter.net.proto.SelectWorktopOptionReqOuterClass.SelectWorktopOptionReq;
import emu.grasscutter.net.proto.WorktopInfoOuterClass.WorktopInfo;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public final class GadgetWorktop extends GadgetContent {
private IntSet worktopOptions;
private Set<Integer> worktopOptions;
private WorktopWorktopOptionHandler handler;
public GadgetWorktop(EntityGadget gadget) {
super(gadget);
}
public IntSet getWorktopOptions() {
public Set<Integer> getWorktopOptions() {
if (this.worktopOptions == null) {
this.worktopOptions = new IntOpenHashSet();
this.worktopOptions = new HashSet<>();
}
return worktopOptions;
}