aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle21
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java17
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java6
4 files changed, 24 insertions, 22 deletions
diff --git a/build.gradle b/build.gradle
index 0baccd4..3e00026 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
}
plugins {
- id 'fabric-loom' version '0.2.3-SNAPSHOT'
+ id 'fabric-loom' version '0.2.4-SNAPSHOT'
id 'maven-publish'
id "com.jfrog.artifactory" version "4.9.0"
}
@@ -29,20 +29,18 @@ repositories {
}
dependencies {
- //to change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
- modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
-
- // Fabric API. This is technically optional, but you probably want it anyway.
- modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
- modCompile "io.github.cottonmc:Jankson:${project.jankson_version}"
+ modApi "net.fabricmc:fabric-loader:${project.loader_version}"
+ modApi "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
+ modApi "io.github.cottonmc:Jankson:${project.jankson_version}"
include "io.github.cottonmc:Jankson:${project.jankson_version}"
compileOnly ("com.google.code.findbugs:jsr305:3.0.2") { transitive = false }
- modCompile "io.github.prospector:modmenu:1.6.3+build.101"
- // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
- // You may need to force-disable transitiveness on them.
+
+
+ modImplementation "io.github.prospector:modmenu:1.6.3+build.101"
+ //modApi "io.github.prospector:modmenu:1.6.3+build.101"
}
processResources {
@@ -86,16 +84,19 @@ publishing {
// builtBy remapJar
//}
artifact ("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}.jar") { //release jar - file location not provided anywhere in loom
+ artifactId = "LibGui"
classifier null
builtBy remapJar
}
artifact ("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}-dev.jar") { //release jar - file location not provided anywhere in loom
+ artifactId = "LibGui"
classifier "dev"
builtBy remapJar
}
artifact(sourcesJar) {
+ artifactId = "LibGui"
builtBy remapSourcesJar
}
}
diff --git a/gradle.properties b/gradle.properties
index f465954..f64db91 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.4.8+build.155
# Mod Properties
- mod_version = 1.2.0
+ mod_version = 1.2.1
maven_group = io.github.cottonmc
archives_base_name = LibGui
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java b/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java
index 1b8af53..3393cdd 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java
@@ -29,7 +29,7 @@ import net.minecraft.recipe.RecipeInputProvider;
import net.minecraft.recipe.RecipeType;
import net.minecraft.world.World;
-public abstract class CottonScreenController extends CraftingContainer<Inventory> implements GuiDescription {
+public class CottonScreenController extends CraftingContainer<Inventory> implements GuiDescription {
protected Inventory blockInventory;
protected PlayerInventory playerInventory;
@@ -293,15 +293,18 @@ public abstract class CottonScreenController extends CraftingContainer<Inventory
if (rootPanel!=null) rootPanel.onClick(x, y, button);
}
- /**
- * Gets the PropertyDelegate associated with this Controller.
- */
@Nullable
+ @Override
public PropertyDelegate getPropertyDelegate() {
- // TODO Auto-generated method stub
return propertyDelegate;
}
+ @Override
+ public GuiDescription setPropertyDelegate(PropertyDelegate delegate) {
+ this.propertyDelegate = delegate;
+ return this;
+ }
+
public WPlayerInvPanel createPlayerInventoryPanel() {
return new WPlayerInvPanel(this.playerInventory);
}
@@ -364,7 +367,9 @@ public abstract class CottonScreenController extends CraftingContainer<Inventory
}
@Override
- public abstract int getCraftingResultSlotIndex();
+ public int getCraftingResultSlotIndex() {
+ return -1;
+ }
@Override
public int getCraftingWidth() {
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java
index acb126c..bfae32f 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java
@@ -1,10 +1,6 @@
package io.github.cottonmc.cotton.gui.widget;
-import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
-import io.github.cottonmc.cotton.gui.client.LibGuiClient;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
-import net.fabricmc.api.EnvType;
-import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.widget.AbstractButtonWidget;
import net.minecraft.client.sound.PositionedSoundInstance;
@@ -60,7 +56,7 @@ public class WButton extends WWidget {
color = 16777120;
}
- ScreenDrawing.drawCenteredWithShadow(label.asFormattedString(), x+(getWidth()/2), y+4, color); //LibGuiClient.config.darkMode ? darkmodeColor : color);
+ ScreenDrawing.drawCenteredWithShadow(label.asFormattedString(), x+(getWidth()/2), y + ((20 - 8) / 2), color); //LibGuiClient.config.darkMode ? darkmodeColor : color);
}