aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GuiTest/gradle.properties8
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java2
-rw-r--r--build.gradle14
-rw-r--r--gradle.properties10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java3
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java1
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java5
9 files changed, 36 insertions, 23 deletions
diff --git a/GuiTest/gradle.properties b/GuiTest/gradle.properties
index 8dea5d3..9ae5f8f 100644
--- a/GuiTest/gradle.properties
+++ b/GuiTest/gradle.properties
@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
- minecraft_version=19w35a
- yarn_mappings=19w35a+build.1
- loader_version=0.6.1+build.164
+ minecraft_version=19w37a
+ yarn_mappings=19w37a+build.9
+ loader_version=0.6.1+build.165
# Mod Properties
mod_version = 1.3.1
@@ -14,5 +14,5 @@ org.gradle.jvmargs=-Xmx1G
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric
- fabric_version=0.3.2+build.217-1.15
+ fabric_version=0.3.2+build.230-1.15
jankson_version=1.0.0+j1.1.2
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java
index b777361..37b98f6 100644
--- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java
@@ -25,6 +25,6 @@ public class GuiItem extends Item {
MinecraftClient.getInstance().openScreen(new CottonClientScreen(new TestClientGui()));
}
- return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, (hand==Hand.MAIN_HAND) ? player.getMainHandStack() : player.getOffHandStack());
+ return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, (hand==Hand.MAIN_HAND) ? player.getMainHandStack() : player.getOffHandStack(), false);
}
}
diff --git a/build.gradle b/build.gradle
index c453a51..820a3cc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,6 +2,10 @@ buildscript {
repositories {
jcenter()
maven {
+ name = 'Modmuss'
+ url = 'https://maven.modmuss50.me/'
+ }
+ maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
@@ -11,7 +15,7 @@ buildscript {
System.out.println(rootProject.name);
if (rootProject.name=="LibGUI") {
System.out.println("Added libgui to classpath");
- classpath 'fabric-loom:fabric-loom.gradle.plugin:0.2.4-SNAPSHOT'
+ classpath 'fabric-loom:fabric-loom.gradle.plugin:0.2.5-SNAPSHOT'
}
}
}
@@ -48,15 +52,15 @@ repositories {
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
- 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}"
+ modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
+ modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
+ modImplementation "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 }
- modImplementation "io.github.prospector:modmenu:1.7.9+build.118"
+ modImplementation "io.github.prospector:modmenu:1.7.10-unstable.19w35a+build.2"
//modApi "io.github.prospector:modmenu:1.7.9+build.118"
}
diff --git a/gradle.properties b/gradle.properties
index df07e23..9d0c91d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
- minecraft_version=19w35a
- yarn_mappings=19w35a+build.1
- loader_version=0.6.1+build.164
+ minecraft_version=19w37a
+ yarn_mappings=19w37a+build.9
+ loader_version=0.6.1+build.165
# Mod Properties
- mod_version = 1.3.3-beta.1
+ mod_version = 1.3.3-beta.2
maven_group = io.github.cottonmc
archives_base_name = LibGui
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric
- fabric_version=0.3.2+build.217-1.15
+ fabric_version=0.3.2+build.230-1.15
jankson_version=1.0.0+j1.1.2
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 3a7f5c2..c18fc88 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
@@ -80,7 +80,8 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends A
@Override
public boolean keyPressed(int ch, int keyCode, int modifiers) {
- if (keyCode==GLFW.GLFW_KEY_ESCAPE) {
+ //System.out.println("Key " + Integer.toHexString(ch)+" "+Integer.toHexString(keyCode));
+ if (ch==GLFW.GLFW_KEY_ESCAPE) {
this.minecraft.player.closeContainer();
return true;
} else {
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java b/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
index 985cb2d..b06369a 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/LibGuiClient.java
@@ -6,6 +6,7 @@ import blue.endless.jankson.JsonObject;
import io.github.cottonmc.jankson.JanksonFactory;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
+
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
index 31ab670..3377b2c 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java
@@ -2,11 +2,10 @@ package io.github.cottonmc.cotton.gui.client;
import org.lwjgl.opengl.GL11;
+import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.cottonmc.cotton.gui.widget.data.Alignment;
-import net.minecraft.class_4493.class_4534;
-import net.minecraft.class_4493.class_4535;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.render.BufferBuilder;
@@ -36,7 +35,7 @@ public class ScreenDrawing {
BufferBuilder buffer = tessellator.getBufferBuilder();
RenderSystem.enableBlend();
//GlStateManager.disableTexture2D();
- RenderSystem.blendFuncSeparate(class_4535.SRC_ALPHA, class_4534.ONE_MINUS_SRC_ALPHA, class_4535.ONE, class_4534.ZERO);
+ RenderSystem.blendFuncSeparate(GlStateManager.class_4535.SRC_ALPHA, GlStateManager.class_4534.ONE_MINUS_SRC_ALPHA, GlStateManager.class_4535.ONE, GlStateManager.class_4534.ZERO);
RenderSystem.color4f(r, g, b, 1.0f);
buffer.begin(GL11.GL_QUADS, VertexFormats.POSITION_UV); //I thought GL_QUADS was deprecated but okay, sure.
buffer.vertex(x, y + height, 0).texture(u1, v2).next();
@@ -83,7 +82,7 @@ public class ScreenDrawing {
BufferBuilder buffer = tessellator.getBufferBuilder();
RenderSystem.enableBlend();
RenderSystem.disableTexture();
- RenderSystem.blendFuncSeparate(class_4535.SRC_ALPHA, class_4534.ONE_MINUS_SRC_ALPHA, class_4535.ONE, class_4534.ZERO);
+ RenderSystem.blendFuncSeparate(GlStateManager.class_4535.SRC_ALPHA, GlStateManager.class_4534.ONE_MINUS_SRC_ALPHA, GlStateManager.class_4535.ONE, GlStateManager.class_4534.ZERO);
RenderSystem.color4f(r, g, b, a);
buffer.begin(GL11.GL_QUADS, VertexFormats.POSITION); //I thought GL_QUADS was deprecated but okay, sure.
buffer.vertex(left, top + height, 0.0D).next();
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java b/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
new file mode 100644
index 0000000..0af23ad
--- /dev/null
+++ b/src/main/java/io/github/cottonmc/cotton/gui/style/StyleEntry.java
@@ -0,0 +1,9 @@
+package io.github.cottonmc.cotton.gui.style;
+
+import java.util.HashMap;
+
+public class StyleEntry {
+ private HashMap<String, String> customEntries = new HashMap<>();
+
+
+}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
index d8d5955..cf7e444 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java
@@ -8,16 +8,15 @@ import javax.annotation.Nullable;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.GL11;
+import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
-import net.minecraft.class_4493;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
-import net.minecraft.client.gl.GlProgramManager;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.Tessellator;
@@ -407,7 +406,7 @@ public class WTextField extends WWidget {
RenderSystem.color4f(0.0F, 0.0F, 255.0F, 255.0F);
RenderSystem.disableTexture();
RenderSystem.enableColorLogicOp();
- RenderSystem.logicOp(class_4493.LogicOp.OR_REVERSE);
+ RenderSystem.logicOp(GlStateManager.LogicOp.OR_REVERSE);
bufferBuilder_1.begin(GL11.GL_QUADS, VertexFormats.POSITION);
bufferBuilder_1.vertex(x, y+height, 0.0D).next();
bufferBuilder_1.vertex(x+width, y+height, 0.0D).next();