aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-03-08 10:03:36 +0200
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-03-08 10:03:36 +0200
commitadf783ff7fbc676f697c6e4a4acff8f1e06fdada (patch)
tree258c212f0f2fc200e80bbcb61f95c0b04cf05a1c
parentcdb8f5981f418cae946a3c3fd60c5891ed3f323c (diff)
downloadLibGui-adf783ff7fbc676f697c6e4a4acff8f1e06fdada.tar.gz
LibGui-adf783ff7fbc676f697c6e4a4acff8f1e06fdada.tar.bz2
LibGui-adf783ff7fbc676f697c6e4a4acff8f1e06fdada.zip
Update to 20w10a
-rw-r--r--build.gradle2
-rw-r--r--gradle.properties10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java8
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java2
-rw-r--r--src/main/resources/fabric.mod.json3
8 files changed, 17 insertions, 16 deletions
diff --git a/build.gradle b/build.gradle
index 1bd45f8..790f687 100644
--- a/build.gradle
+++ b/build.gradle
@@ -39,7 +39,7 @@ if(rootProject.file('private.gradle').exists()) { //Publishing details
}
archivesBaseName = project.archives_base_name
-version = project.mod_version
+version = "$project.mod_version+$project.minecraft_version"
group = project.maven_group
minecraft {
diff --git a/gradle.properties b/gradle.properties
index 7915499..5b50e64 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
- minecraft_version=1.15.2
- yarn_mappings=1.15.2+build.2
- loader_version=0.7.5+build.178
+ minecraft_version=20w10a
+ yarn_mappings=20w10a+build.10
+ loader_version=0.7.8+build.186
# Mod Properties
- mod_version = 1.6.0
+ mod_version = 1.7.0
maven_group = io.github.cottonmc
archives_base_name = LibGui
# Dependencies
- fabric_version=0.4.29+build.290-1.15
+ fabric_version=0.5.1+build.305-1.16
jankson_version=2.0.1+j1.2.0
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
index 9c13927..1a8c326 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java
@@ -65,7 +65,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree
}
if (getTitle() != null) {
- font.draw(getTitle().asFormattedString(), left, top, description.getTitleColor());
+ textRenderer.draw(getTitle().asFormattedString(), left, top, description.getTitleColor());
}
}
@@ -222,6 +222,6 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree
@Override
public void renderTextHover(Text text, int x, int y) {
- renderComponentHoverEffect(text, x, y);
+ renderTextHoverEffect(text, x, y);
}
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
index dc6c87f..9bc0452 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
@@ -84,13 +84,13 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends C
public boolean keyPressed(int ch, int keyCode, int modifiers) {
//System.out.println("Key " + Integer.toHexString(ch)+" "+Integer.toHexString(keyCode));
if (ch==GLFW.GLFW_KEY_ESCAPE) {
- this.minecraft.player.closeContainer();
+ this.client.player.closeContainer();
return true;
} else {
//if (super.keyPressed(ch, keyCode, modifiers)) return true;
if (description.getFocus()==null) {
if (MinecraftClient.getInstance().options.keyInventory.matchesKey(ch, keyCode)) {
- this.minecraft.player.closeContainer();
+ this.client.player.closeContainer();
return true;
}
return false;
@@ -197,7 +197,7 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends C
}
if (getTitle() != null) {
- font.draw(getTitle().asFormattedString(), x, y, description.getTitleColor());
+ textRenderer.draw(getTitle().asFormattedString(), x, y, description.getTitleColor());
}
}
@@ -235,6 +235,6 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends C
@Override
public void renderTextHover(Text text, int x, int y) {
- renderComponentHoverEffect(text, x, y);
+ renderTextHoverEffect(text, x, y);
}
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java
index c99b325..d09df6f 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java
@@ -3,7 +3,7 @@ package io.github.cottonmc.cotton.gui.client;
import net.minecraft.text.Text;
/**
- * Implemented by LibGui screens to access {@code Screen.renderComponentHoverEffect()}.
+ * Implemented by LibGui screens to access {@code Screen.renderTextHoverEffect()}.
*/
public interface TextHoverRendererScreen {
void renderTextHover(Text text, int x, int y);
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java
index 5a7e236..aa69c53 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java
@@ -19,7 +19,7 @@ public class ModMenuSupport implements ModMenuApi {
public Function<Screen, ? extends Screen> getConfigScreenFactory() {
return screen -> new CottonClientScreen(new TranslatableText("options.libgui.libgui_settings"), new ConfigGui(screen)) {
public void onClose() {
- this.minecraft.openScreen(screen);
+ this.client.openScreen(screen);
}
protected void init() {
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java
index f09c263..43cd3a9 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java
@@ -57,7 +57,7 @@ public class WLabel extends WWidget {
if (hoveredText != null) {
Screen screen = MinecraftClient.getInstance().currentScreen;
if (screen != null) {
- screen.handleComponentClicked(hoveredText);
+ screen.handleTextClick(hoveredText);
}
}
}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 1fccb86..621539a 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -22,7 +22,8 @@
},
"depends": {
"fabricloader": ">=0.4.0",
- "fabric": "*"
+ "fabric": "*",
+ "minecraft": ">=1.16-"
},
"suggests": {
"flamingo": "*"