Skip to content

Commit 89aa447

Browse files
committed
diverse changes
1 parent 995fb25 commit 89aa447

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

src/client/java/com/coflnet/CoflModClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ public void onInitializeClient() {
106106
})));
107107
});
108108

109+
ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> {
110+
111+
});
112+
109113
ScreenEvents.AFTER_INIT.register((client, screen, scaledWidth, scaledHeight) -> {
110114
if (screen instanceof GenericContainerScreen gcs) {
111115
System.out.println(gcs.getTitle().getString());

src/client/java/com/coflnet/gui/BinGUI.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.coflnet.gui;
22

3+
import CoflCore.commands.models.FlipData;
34
import com.coflnet.CoflModClient;
45
import com.coflnet.gui.widget.ItemWidget;
56
import net.minecraft.client.MinecraftClient;
@@ -27,23 +28,31 @@ public abstract class BinGUI extends Screen {
2728
protected final int CONFIRMATION_CANCEL_SLOT = 15;
2829
protected ItemWidget itemWidget;
2930
protected ItemStack currentItem;
31+
protected FlipData flipData = null;
3032

3133
protected AuctionStatus auctionStatus;
3234
protected GenericContainerScreenHandler gcsh;
3335
protected GenericContainerScreen gcs;
34-
protected BinGUI(Text title, GenericContainerScreen gcs) {
36+
protected BinGUI(Text title, GenericContainerScreen gcs, int p, int r) {
3537
super(title);
36-
screenWidth = MinecraftClient.getInstance().currentScreen.width;
37-
screenHeight = MinecraftClient.getInstance().currentScreen.height;
38-
3938
this.gcs = gcs;
4039
this.gcsh = gcs.getScreenHandler();
40+
this.p = p;
41+
this.r = r;
4142

4243
if (gcsh.getType() == ScreenHandlerType.GENERIC_9X3){
4344
this.auctionStatus = AuctionStatus.CONFIRMING;
4445
} else this.auctionStatus = AuctionStatus.INIT;
4546

47+
flipData = CoflModClient.popFlipData();
48+
49+
screenWidth = MinecraftClient.getInstance().currentScreen.width;
50+
screenHeight = MinecraftClient.getInstance().currentScreen.height;
51+
initSize(screenWidth, screenHeight);
52+
clearAndInitWidgets(screenWidth, screenHeight);
53+
}
4654

55+
private void initSize(int screenWidth, int screenHeight){
4756
this.width = MinecraftClient.getInstance().currentScreen.width / 2;
4857
if (width < 300) this.width = 300;
4958

@@ -88,6 +97,7 @@ public void renderBackground(DrawContext context, int mouseX, int mouseY, float
8897
|| screenHeight != MinecraftClient.getInstance().currentScreen.height){
8998
screenWidth = MinecraftClient.getInstance().currentScreen.width;
9099
screenHeight = MinecraftClient.getInstance().currentScreen.height;
100+
initSize(screenWidth, screenHeight);
91101
clearAndInitWidgets(screenWidth, screenHeight);
92102
}
93103
}

src/client/java/com/coflnet/gui/cofl/CoflBinGUI.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,5 +211,4 @@ public void renderBackground(DrawContext drawContext, int mouseX, int mouseY, fl
211211
// Description Background
212212
RenderUtils.drawRoundedRect(drawContext,screenWidth / 2 - width / 2 + p + 20 + p, screenHeight / 2 - height / 2 + p + 12+ p, width - 20 - p*3, height - 75 - screenHeight / 15, r, CoflColConfig.BACKGROUND_SECONDARY);
213213
}
214-
215214
}

src/client/java/com/coflnet/gui/cofl/CoflColConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ public abstract class CoflColConfig {
1010
public static final int UNAVAILABLE = 0xFFD07916;
1111
public static final int TEXT_PRIMARY = 0xFFEEEEEE;
1212
}
13+

0 commit comments

Comments
 (0)