Skip to content

Commit

Permalink
Add missing Override annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHell228 committed May 15, 2024
1 parent 6a56cb0 commit 32c3c30
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ private Slot newDummySlot() {
}

// Slot definition Impl:
@Override
public BuildingStep slotsAtIndizes(List<Slot> source, List<Integer> at) {
Validate.isTrue(source.size() == at.size(), "Source and index list sizes differ");
for (int i = 0; i < at.size(); i++) {
Expand All @@ -148,10 +149,12 @@ public BuildingStep slotsAtIndizes(List<Slot> source, List<Integer> at) {
}

// complex redirects - (source/index list generation)
@Override
public BuildingStep slotsAtPositions(List<Slot> source, List<Vector2i> at) {
return this.slotsAtIndizes(source, at.stream().map(this::posToIndex).collect(Collectors.toList()));
}

@Override
public DummyStep fillDummy() {
Slot slot = this.newDummySlot();
List<Integer> indizes = IntStream.range(0, this.info.size).boxed().filter(idx -> !this.slotDefinitions.containsKey(idx)).collect(Collectors.toList());
Expand All @@ -160,25 +163,29 @@ public DummyStep fillDummy() {
return this;
}

@Override
public DummyStep dummySlots(int count, int offset) {
Slot slot = this.newDummySlot();
List<Slot> source = Stream.generate(() -> slot).limit(count).collect(Collectors.toList());
this.slots(source, offset);
return this;
}

@Override
public BuildingStep slots(List<Slot> source, int offset) {
List<Integer> indizes = IntStream.range(offset, offset + source.size()).boxed().collect(Collectors.toList());
return this.slotsAtIndizes(source, indizes);
}

@Override
public DummyStep dummyGrid(Vector2i size, Vector2i offset) {
Slot slot = this.newDummySlot();
List<Slot> source = Stream.generate(() -> slot).limit(size.x() * size.y()).collect(Collectors.toList());
this.grid(source, size, offset);
return this;
}

@Override
public BuildingStep grid(List<Slot> source, Vector2i size, Vector2i offset) {
int xMin = offset.x();
int yMin = offset.y();
Expand All @@ -196,14 +203,17 @@ public BuildingStep grid(List<Slot> source, Vector2i size, Vector2i offset) {

// simple redirects

@Override
public DummyStep dummySlots(int count, Vector2i offset) {
return this.dummySlots(count, this.posToIndex(offset));
}

@Override
public BuildingStep slots(List<Slot> source, Vector2i offset) {
return this.slots(source, this.posToIndex(offset));
}

@Override
public DummyStep dummyGrid(Vector2i size, int offset) {
return this.dummyGrid(size, this.indexToPos(offset));
}
Expand All @@ -225,6 +235,7 @@ public EndStep plugin(final PluginContainer plugin) {
return this;
}

@Override
public EndStep identity(UUID uuid) {
this.identity = uuid;
return this;
Expand Down

0 comments on commit 32c3c30

Please sign in to comment.