Skip to content

Commit ead0275

Browse files
Reformat code
1 parent 6d26db4 commit ead0275

27 files changed

Lines changed: 54 additions & 30 deletions

invui/src/main/java/xyz/xenondevs/invui/gui/AbstractScrollGui.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public int getMaxLine() {
160160
if (lineLength == 0)
161161
return 0;
162162

163-
int lines = switch(orientation) {
163+
int lines = switch (orientation) {
164164
case HORIZONTAL -> max.y() - min.y();
165165
case VERTICAL -> max.x() - min.x();
166166
} + 1;

invui/src/main/java/xyz/xenondevs/invui/gui/AnimationImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void start(@Nullable EntityScheduler scheduler) {
7979
if (cancelTask != null)
8080
throw new IllegalStateException("Animation is already running");
8181

82-
if (scheduler != null) {
82+
if (scheduler != null) {
8383
var task = scheduler.runAtFixedRate(InvUI.getInstance().getPlugin(), x -> handleTick(), null, 1, tickDelay);
8484
cancelTask = task != null ? task::cancel : null;
8585
} else {
@@ -135,7 +135,7 @@ public Set<Slot> getRemainingSlots() {
135135
public boolean isFinished() {
136136
return remainingSlots.isEmpty();
137137
}
138-
138+
139139
}
140140

141141
static final class BuilderImpl implements Animation.Builder {

invui/src/main/java/xyz/xenondevs/invui/gui/GuiSlotElementSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public List<? extends SlotElement> generateSlotElements(List<? extends Slot> slo
3737

3838
if (guiX < 0 || guiY < 0 || guiX >= gui.getWidth() || guiY >= gui.getHeight())
3939
throw new IndexOutOfBoundsException(
40-
"Structure slot at (" + slot.x() + ", " + slot.y() +
40+
"Structure slot at (" + slot.x() + ", " + slot.y() +
4141
") with offset (" + offsetX + ", " + offsetY +
4242
") is looking for slot (" + guiX + ", " + guiY +
4343
"), which is out of bounds for a gui of size " + gui.getWidth() + "x" + gui.getHeight()

invui/src/main/java/xyz/xenondevs/invui/gui/Ingredient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ sealed interface Ingredient {
77

88
/**
99
* An ingredient that is a marker.
10+
*
1011
* @param marker The marker
1112
*/
1213
record Marker(xyz.xenondevs.invui.gui.Marker marker) implements Ingredient {}
1314

1415
/**
1516
* An ingredient that is a slot element supplier.
17+
*
1618
* @param supplier The slot element supplier
1719
*/
1820
record Element(SlotElementSupplier supplier) implements Ingredient {}

invui/src/main/java/xyz/xenondevs/invui/gui/PagedItemsGuiImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected void updateContent() {
4949
@Override
5050
public int getPageCount() {
5151
var cls = getContentListSlots();
52-
if (cls.isEmpty())
52+
if (cls.isEmpty())
5353
return 0;
5454

5555
return Math.ceilDiv(getContent().size(), cls.size());

invui/src/main/java/xyz/xenondevs/invui/gui/ScrollGui.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ static ScrollGui<Inventory> ofInventories(Structure structure, List<? extends In
207207

208208
/**
209209
* Gets the property containing the scrollable content.
210+
*
210211
* @return The content property.
211212
*/
212213
MutableProperty<List<? extends C>> getContentProperty();

invui/src/main/java/xyz/xenondevs/invui/gui/ScrollInventoryGuiImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ScrollInventoryGuiImpl(
3333

3434
@Override
3535
protected void updateContent() {
36-
switch(getLineOrientation()) {
36+
switch (getLineOrientation()) {
3737
case HORIZONTAL -> updateContentHorizontal();
3838
case VERTICAL -> updateContentVertical();
3939
}

invui/src/main/java/xyz/xenondevs/invui/gui/ScrollNestedGuiImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ScrollNestedGuiImpl(
3333

3434
@Override
3535
protected void updateContent() {
36-
switch(getLineOrientation()) {
36+
switch (getLineOrientation()) {
3737
case HORIZONTAL -> updateContentHorizontal();
3838
case VERTICAL -> updateContentVertical();
3939
}

invui/src/main/java/xyz/xenondevs/invui/gui/SlotElement.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public sealed interface SlotElement {
4040

4141
/**
4242
* Adds an {@link Observer} to the content of this {@link SlotElement}.
43+
*
4344
* @param who The {@link Observer} to add
4445
* @param how An integer specifying how the {@link Observer} is observing this {@link Observable}.
4546
* Used to {@link Observer#notifyUpdate(int) notify} the {@link Observer} about updates.
@@ -104,8 +105,8 @@ public int getUpdatePeriod() {
104105
/**
105106
* Links to a slot in a {@link Inventory}
106107
*
107-
* @param inventory The {@link Inventory} to link to
108-
* @param slot The slot in the {@link Inventory} to link to
108+
* @param inventory The {@link Inventory} to link to
109+
* @param slot The slot in the {@link Inventory} to link to
109110
* @param backgroundProperty The property containing the {@link ItemProvider} to use as background if the linked slot is empty.
110111
*/
111112
record InventoryLink(Inventory inventory, int slot,

invui/src/main/java/xyz/xenondevs/invui/gui/TabGuiImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
import xyz.xenondevs.invui.item.ItemProvider;
1010
import xyz.xenondevs.invui.state.MutableProperty;
1111

12-
import java.util.*;
12+
import java.util.ArrayList;
13+
import java.util.Collections;
14+
import java.util.List;
1315
import java.util.function.BiConsumer;
1416

1517
final class TabGuiImpl extends AbstractGui implements TabGui {

0 commit comments

Comments
 (0)