aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky
diff options
context:
space:
mode:
authorvicisacat <victor.branchu@gmail.com>2024-03-19 08:45:49 +0100
committervicisacat <victor.branchu@gmail.com>2024-04-02 17:59:28 +0200
commit1efc40508a99accee0ec3f5cb3e8492a7b61d20c (patch)
treed676adc1509cad6f96ff18e40220a54fde3221f3 /src/main/java/de/hysky
parent411c196e55db4ef90c48bfd3355ec508884582e0 (diff)
downloadSkyblocker-1efc40508a99accee0ec3f5cb3e8492a7b61d20c.tar.gz
Skyblocker-1efc40508a99accee0ec3f5cb3e8492a7b61d20c.tar.bz2
Skyblocker-1efc40508a99accee0ec3f5cb3e8492a7b61d20c.zip
reformat whole file to the rescue!
Diffstat (limited to 'src/main/java/de/hysky')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java6
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreenHandler.java13
2 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java
index 13c04e8b..95cbbf4a 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreen.java
@@ -51,7 +51,7 @@ public class SkyblockCraftingTableScreen extends HandledScreen<SkyblockCraftingT
this.recipeBook.toggleOpen();
this.x = this.recipeBook.findLeftEdge(this.width, this.backgroundWidth) + 11;
button.setPosition(this.x + 5, this.height / 2 - 49);
- if(moreCraftsButton != null) moreCraftsButton.setPosition(this.x + 174, this.y+62);
+ if (moreCraftsButton != null) moreCraftsButton.setPosition(this.x + 174, this.y + 62);
}));
moreCraftsButton = new TexturedButtonWidget(this.x + 174, y + 62, 16, 16, MORE_CRAFTS_TEXTURES,
button -> this.onMouseClick(handler.slots.get(26), handler.slots.get(26).id, 0, SlotActionType.PICKUP));
@@ -100,7 +100,7 @@ public class SkyblockCraftingTableScreen extends HandledScreen<SkyblockCraftingT
int i = this.x;
int j = (this.height - this.backgroundHeight) / 2;
context.drawTexture(TEXTURE, i, j, 0, 0, this.backgroundWidth, this.backgroundHeight);
- context.drawGuiTexture(QUICK_CRAFT, i+173, j, 0, 25, 84);
+ context.drawGuiTexture(QUICK_CRAFT, i + 173, j, 0, 25, 84);
}
@Override
@@ -122,7 +122,7 @@ public class SkyblockCraftingTableScreen extends HandledScreen<SkyblockCraftingT
@Override
protected boolean isClickOutsideBounds(double mouseX, double mouseY, int left, int top, int button) {
- boolean bl = mouseX < (double)left || mouseY < (double)top || mouseX >= (double)(left + this.backgroundWidth) || mouseY >= (double)(top + this.backgroundHeight);
+ boolean bl = mouseX < (double) left || mouseY < (double) top || mouseX >= (double) (left + this.backgroundWidth) || mouseY >= (double) (top + this.backgroundHeight);
return this.recipeBook.isClickOutsideBounds(mouseX, mouseY, this.x, this.y, this.backgroundWidth, this.backgroundHeight, button) && bl;
}
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreenHandler.java b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreenHandler.java
index 1d66c661..04974ade 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreenHandler.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockCraftingTableScreenHandler.java
@@ -15,9 +15,10 @@ public class SkyblockCraftingTableScreenHandler extends GenericContainerScreenHa
19, 20, 21, 23, 25,
28, 29, 30, 34
};
+
public SkyblockCraftingTableScreenHandler(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, Inventory inventory, int rows) {
super(type, syncId, playerInventory, inventory, rows);
- for (int i = 0; i < rows*9; i++) {
+ for (int i = 0; i < rows * 9; i++) {
Slot originalSlot = slots.get(i);
if (Arrays.binarySearch(normalSlots, i) >= 0) {
int[] coords = getCoords(i);
@@ -31,7 +32,7 @@ public class SkyblockCraftingTableScreenHandler extends GenericContainerScreenHa
}
}
int yOffset = (rows - 4) * 18 + 19;
- for (int i = rows*9; i < slots.size(); i++) {
+ for (int i = rows * 9; i < slots.size(); i++) {
Slot originalSlot = slots.get(i);
Slot slot = new Slot(originalSlot.inventory, originalSlot.getIndex(), originalSlot.x, originalSlot.y - yOffset);
slot.id = i;
@@ -46,12 +47,12 @@ public class SkyblockCraftingTableScreenHandler extends GenericContainerScreenHa
private int[] getCoords(int slot) {
if (slot == 23) return new int[]{124, 35};
if (slot == 16 || slot == 25 || slot == 34) {
- int y = (slot/9 - 1) * 18 + 8;
+ int y = (slot / 9 - 1) * 18 + 8;
return new int[]{174, y};
}
- int gridX = slot%9 - 1;
- int gridY = slot/9 - 1;
- return new int[]{30 + gridX*18, 17+gridY*18};
+ int gridX = slot % 9 - 1;
+ int gridY = slot / 9 - 1;
+ return new int[]{30 + gridX * 18, 17 + gridY * 18};
}
public static class DisabledSlot extends Slot {