aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GuiTest/build.gradle3
-rw-r--r--build.gradle13
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java11
5 files changed, 20 insertions, 18 deletions
diff --git a/GuiTest/build.gradle b/GuiTest/build.gradle
index fea663e..5ae2c60 100644
--- a/GuiTest/build.gradle
+++ b/GuiTest/build.gradle
@@ -13,7 +13,8 @@ archivesBaseName = "LibGuiTest"
version = rootProject.version
group = rootProject.group
-minecraft {
+loom {
+ autoGenIDERuns = true
}
//configurations.modApi {
diff --git a/build.gradle b/build.gradle
index acb42bf..d7c3955 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id 'maven-publish'
- id "com.jfrog.artifactory" version "4.9.0"
+ id "com.jfrog.artifactory" version "4.20.0"
id 'checkstyle'
}
@@ -18,11 +18,14 @@ archivesBaseName = project.archives_base_name
version = "$project.mod_version+$project.minecraft_version"
group = project.maven_group
-minecraft {
-}
-
repositories {
maven { url "http://server.bbkr.space:8081/artifactory/libs-release" }
+ maven {
+ url = "http://maven.terraformersmc.com/releases"
+ content {
+ includeGroup "com.terraformersmc"
+ }
+ }
}
dependencies {
@@ -33,7 +36,7 @@ dependencies {
modImplementation "io.github.cottonmc:Jankson-Fabric:${project.jankson_version}"
include "io.github.cottonmc:Jankson-Fabric:${project.jankson_version}"
- modRuntime(modCompileOnly("io.github.prospector:modmenu:$project.modmenu_version") {
+ modRuntime(modCompileOnly("com.terraformersmc:modmenu:$project.modmenu_version") {
exclude group: 'net.fabricmc.fabric-api'
})
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 290541c..28ff446 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
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 6ebe8fc..cdb65af 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
@@ -1,6 +1,5 @@
package io.github.cottonmc.cotton.gui.client;
-import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.LiteralText;
@@ -51,14 +50,14 @@ public class CottonClientScreen extends Screen implements CottonScreenImpl {
}
@Override
- public void init(MinecraftClient client, int screenWidth, int screenHeight) {
- super.init(client, screenWidth, screenHeight);
+ public void init() {
+ super.init();
client.keyboard.setRepeatEvents(true);
WPanel root = description.getRootPanel();
if (root != null) root.addPainters();
description.addPainters();
- reposition(screenWidth, screenHeight);
+ reposition(width, height);
}
@Override
@@ -108,7 +107,7 @@ public class CottonClientScreen extends Screen implements CottonScreenImpl {
}
private void paint(MatrixStack matrices, int mouseX, int mouseY) {
- super.renderBackground(matrices);
+ renderBackground(matrices);
if (description!=null) {
WPanel root = description.getRootPanel();
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 0f7920b..f6c1429 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
@@ -1,6 +1,5 @@
package io.github.cottonmc.cotton.gui.client;
-import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.client.render.DiffuseLighting;
import net.minecraft.client.util.math.MatrixStack;
@@ -64,15 +63,15 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
*/
@Override
- public void init(MinecraftClient client, int screenWidth, int screenHeight) {
- super.init(client, screenWidth, screenHeight);
+ public void init() {
+ super.init();
client.keyboard.setRepeatEvents(true);
WPanel root = description.getRootPanel();
if (root != null) root.addPainters();
description.addPainters();
- reposition(screenWidth, screenHeight);
+ reposition(width, height);
}
@Override
@@ -167,7 +166,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
} else {
//if (super.keyPressed(ch, keyCode, modifiers)) return true;
if (description.getFocus()==null) {
- if (MinecraftClient.getInstance().options.keyInventory.matchesKey(ch, keyCode)) {
+ if (client.options.keyInventory.matchesKey(ch, keyCode)) {
this.client.player.closeHandledScreen();
return true;
}
@@ -242,7 +241,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
protected void drawBackground(MatrixStack matrices, float partialTicks, int mouseX, int mouseY) {} //This is just an AbstractContainerScreen thing; most Screens don't work this way.
private void paint(MatrixStack matrices, int mouseX, int mouseY) {
- super.renderBackground(matrices);
+ renderBackground(matrices);
if (description!=null) {
WPanel root = description.getRootPanel();