From 32c3c30180507823e85992804756dbcf0e1584d3 Mon Sep 17 00:00:00 2001 From: MrHell228 Date: Wed, 15 May 2024 05:59:14 +0300 Subject: [PATCH] Add missing Override annotations --- .../custom/SpongeViewableInventoryBuilder.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/spongepowered/common/inventory/custom/SpongeViewableInventoryBuilder.java b/src/main/java/org/spongepowered/common/inventory/custom/SpongeViewableInventoryBuilder.java index 23b0461ecdd..3c70687523f 100644 --- a/src/main/java/org/spongepowered/common/inventory/custom/SpongeViewableInventoryBuilder.java +++ b/src/main/java/org/spongepowered/common/inventory/custom/SpongeViewableInventoryBuilder.java @@ -136,6 +136,7 @@ private Slot newDummySlot() { } // Slot definition Impl: + @Override public BuildingStep slotsAtIndizes(List source, List at) { Validate.isTrue(source.size() == at.size(), "Source and index list sizes differ"); for (int i = 0; i < at.size(); i++) { @@ -148,10 +149,12 @@ public BuildingStep slotsAtIndizes(List source, List at) { } // complex redirects - (source/index list generation) + @Override public BuildingStep slotsAtPositions(List source, List at) { return this.slotsAtIndizes(source, at.stream().map(this::posToIndex).collect(Collectors.toList())); } + @Override public DummyStep fillDummy() { Slot slot = this.newDummySlot(); List indizes = IntStream.range(0, this.info.size).boxed().filter(idx -> !this.slotDefinitions.containsKey(idx)).collect(Collectors.toList()); @@ -160,6 +163,7 @@ public DummyStep fillDummy() { return this; } + @Override public DummyStep dummySlots(int count, int offset) { Slot slot = this.newDummySlot(); List source = Stream.generate(() -> slot).limit(count).collect(Collectors.toList()); @@ -167,11 +171,13 @@ public DummyStep dummySlots(int count, int offset) { return this; } + @Override public BuildingStep slots(List source, int offset) { List 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 source = Stream.generate(() -> slot).limit(size.x() * size.y()).collect(Collectors.toList()); @@ -179,6 +185,7 @@ public DummyStep dummyGrid(Vector2i size, Vector2i offset) { return this; } + @Override public BuildingStep grid(List source, Vector2i size, Vector2i offset) { int xMin = offset.x(); int yMin = offset.y(); @@ -196,14 +203,17 @@ public BuildingStep grid(List 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 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)); } @@ -225,6 +235,7 @@ public EndStep plugin(final PluginContainer plugin) { return this; } + @Override public EndStep identity(UUID uuid) { this.identity = uuid; return this;