[DEV] Rebuild porting patches
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java
|
||||
@@ -37,7 +37,6 @@
|
||||
/**
|
||||
* @author HypherionSA
|
||||
*/
|
||||
-@SuppressWarnings("deprecation")
|
||||
@Deprecated(forRemoval = true, since = "2.1.3")
|
||||
public class CraterConfigScreen extends Screen {
|
||||
public static final float SCROLLBAR_BOTTOM_COLOR = .5f;
|
||||
@@ -180,7 +179,7 @@
|
||||
|
||||
@Override
|
||||
public void render(@NotNull GuiGraphics matrices, int mouseX, int mouseY, float delta) {
|
||||
- /*overlayBackground(matrices.pose(), TOP, height - BOTTOM, 32);
|
||||
+ overlayBackground(matrices.pose(), TOP, height - BOTTOM, 32);
|
||||
renderScrollBar();
|
||||
|
||||
matrices.pose().pushPose();
|
||||
@@ -199,7 +198,7 @@
|
||||
option.render(minecraft, font, 40, y, width - 80, height1, matrices, mouseX, mouseY, delta);
|
||||
renderConfigTooltip(matrices, font, mouseX, mouseY, 40, y, font.width(option.text), height1, option.text.getString(), option.getLangKeys().toArray(new String[0]));
|
||||
y += height1;
|
||||
- }*/
|
||||
+ }
|
||||
}
|
||||
|
||||
private void renderScrollBar() {
|
||||
@@ -270,7 +269,7 @@
|
||||
BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR);
|
||||
//RenderSystem.setShader(GameRenderer::getPositionTexColorShader);
|
||||
//RenderSystem.setShaderTexture(0, Screen.MENU_BACKGROUND);
|
||||
- //RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
buffer.addVertex(matrix, minX, maxY, 0.0F).setUv(minX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha);
|
||||
buffer.addVertex(matrix, maxX, maxY, 0.0F).setUv(maxX / 32.0F, maxY / 32.0F).setColor(red, green, blue, endAlpha);
|
||||
buffer.addVertex(matrix, maxX, minY, 0.0F).setUv(maxX / 32.0F, minY / 32.0F).setColor(red, green, blue, startAlpha);
|
||||
@@ -385,7 +384,7 @@
|
||||
for (String desc : description) {
|
||||
list.add(Component.translatable(desc));
|
||||
}
|
||||
- //stack.renderComponentTooltip(font, list, mouseX, mouseY);
|
||||
+ stack.renderComponentTooltip(font, list, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/client/BridgedMinecraft.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/client/BridgedMinecraft.java
|
||||
@@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
public String getGameVersion() {
|
||||
- return SharedConstants.getCurrentVersion().name();
|
||||
+ return SharedConstants.getCurrentVersion().getName();
|
||||
}
|
||||
|
||||
public String getUserName() {
|
@@ -0,0 +1,11 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/nojang/server/BridgedMinecraftServer.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/nojang/server/BridgedMinecraftServer.java
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
- return SharedConstants.getCurrentVersion().name();
|
||||
+ return SharedConstants.getCurrentVersion().getName();
|
||||
}
|
||||
|
||||
public boolean usesAuthentication() {
|
@@ -0,0 +1,11 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/utils/ChatUtils.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/utils/ChatUtils.java
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
@Getter
|
||||
private static final GsonComponentSerializer adventureSerializer = GsonComponentSerializer.builder().options(
|
||||
- JSONOptions.byDataVersion().at(SharedConstants.getCurrentVersion().dataVersion().version())
|
||||
+ JSONOptions.byDataVersion().at(SharedConstants.getCurrentVersion().getDataVersion().getVersion())
|
||||
).build();
|
||||
|
||||
private static final MiniMessage miniMessage = MiniMessage.miniMessage();
|
Reference in New Issue
Block a user