aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gradle.properties14
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java6
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java9
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java6
-rw-r--r--src/main/resources/fabric.mod.json6
6 files changed, 23 insertions, 22 deletions
diff --git a/gradle.properties b/gradle.properties
index 3def3ad..e04c53a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
- minecraft_version=1.19
- yarn_mappings=1.19+build.4
- loader_version=0.14.8
+ minecraft_version=1.19.3
+ yarn_mappings=1.19.3+build.2
+ loader_version=0.14.11
# Mod Properties
- mod_version = 6.4.0
+ mod_version = 6.5.0
maven_group = io.github.cottonmc
archives_base_name = LibGui
# Dependencies
- fabric_version=0.56.0+1.19
- jankson_version=4.1.1+j1.2.1
- modmenu_version=4.0.0
+ fabric_version=0.68.1+1.19.3
+ jankson_version=5.0.0+j1.2.1
+ modmenu_version=5.0.2
libninepatch_version=1.1.0
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 4fcb3f2..19171c9 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
@@ -13,12 +13,12 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.OrderedText;
import net.minecraft.text.Style;
import net.minecraft.util.Identifier;
-import net.minecraft.util.math.Matrix4f;
import io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl;
import io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment;
import io.github.cottonmc.cotton.gui.widget.data.Texture;
import org.jetbrains.annotations.Nullable;
+import org.joml.Matrix4f;
/**
* {@code ScreenDrawing} contains utility methods for drawing contents on a screen.
@@ -140,13 +140,13 @@ public class ScreenDrawing {
RenderSystem.enableBlend();
RenderSystem.setShaderTexture(0, texture);
RenderSystem.setShaderColor(r, g, b, opacity);
- RenderSystem.setShader(GameRenderer::getPositionTexShader);
+ RenderSystem.setShader(GameRenderer::getPositionTexProgram);
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE);
buffer.vertex(model, x, y + height, 0).texture(u1, v2).next();
buffer.vertex(model, x + width, y + height, 0).texture(u2, v2).next();
buffer.vertex(model, x + width, y, 0).texture(u2, v1).next();
buffer.vertex(model, x, y, 0).texture(u1, v1).next();
- BufferRenderer.drawWithShader(buffer.end());
+ BufferRenderer.drawWithGlobalProgram(buffer.end());
RenderSystem.disableBlend();
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
index 178f6c5..e309475 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
@@ -9,9 +9,10 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.ItemStack;
-import net.minecraft.tag.TagKey;
-import net.minecraft.util.registry.Registry;
-import net.minecraft.util.registry.RegistryEntry;
+import net.minecraft.registry.Registries;
+import net.minecraft.registry.Registry;
+import net.minecraft.registry.entry.RegistryEntry;
+import net.minecraft.registry.tag.TagKey;
import com.google.common.collect.ImmutableList;
@@ -110,7 +111,7 @@ public class WItem extends WWidget {
*/
@SuppressWarnings("unchecked")
private static List<ItemStack> getRenderStacks(TagKey<? extends ItemConvertible> tag) {
- Registry<ItemConvertible> registry = (Registry<ItemConvertible>) Registry.REGISTRIES.get(tag.registry().getValue());
+ Registry<ItemConvertible> registry = (Registry<ItemConvertible>) Registries.REGISTRIES.get(tag.registry().getValue());
ImmutableList.Builder<ItemStack> builder = ImmutableList.builder();
for (RegistryEntry<ItemConvertible> item : registry.getOrCreateEntryList((TagKey<ItemConvertible>) tag)) {
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
index a8a912b..c750036 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java
@@ -7,7 +7,7 @@ import net.minecraft.client.gui.screen.narration.NarrationPart;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
-import net.minecraft.util.math.Vec3f;
+import net.minecraft.util.math.RotationAxis;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import io.github.cottonmc.cotton.gui.impl.client.NarrationMessages;
@@ -172,7 +172,7 @@ public class WLabeledSlider extends WAbstractSlider {
matrices.translate(x, y, 0);
if (axis == Axis.VERTICAL) {
matrices.translate(0, height, 0);
- matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(270));
+ matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(270));
}
drawButton(matrices, 0, 0, 0, aWidth);
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 69c8755..40bc67f 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
@@ -18,13 +18,13 @@ import net.minecraft.client.render.VertexFormats;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.minecraft.util.math.MathHelper;
-import net.minecraft.util.math.Matrix4f;
import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import io.github.cottonmc.cotton.gui.impl.client.NarrationMessages;
import io.github.cottonmc.cotton.gui.widget.data.InputResult;
import org.jetbrains.annotations.Nullable;
+import org.joml.Matrix4f;
import org.lwjgl.glfw.GLFW;
import java.util.function.Consumer;
@@ -252,7 +252,7 @@ public class WTextField extends WWidget {
BufferBuilder buffer = tessellator.getBuffer();
Matrix4f model = matrices.peek().getPositionMatrix();
RenderSystem.setShaderColor(0.0F, 0.0F, 1.0F, 1.0F);
- RenderSystem.setShader(GameRenderer::getPositionTexShader);
+ RenderSystem.setShader(GameRenderer::getPositionTexProgram);
RenderSystem.disableTexture();
RenderSystem.enableColorLogicOp();
RenderSystem.logicOp(GlStateManager.LogicOp.OR_REVERSE);
@@ -261,7 +261,7 @@ public class WTextField extends WWidget {
buffer.vertex(model, x + width, y + height, 0).next();
buffer.vertex(model, x + width, y, 0).next();
buffer.vertex(model, x, y, 0).next();
- BufferRenderer.drawWithShader(buffer.end());
+ BufferRenderer.drawWithGlobalProgram(buffer.end());
RenderSystem.disableColorLogicOp();
RenderSystem.enableTexture();
}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 2e88dba..22868a2 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -24,13 +24,13 @@
},
"depends": {
"java": ">=17",
- "fabricloader": ">=0.13.3",
+ "fabricloader": ">=0.14.11",
"fabric-api-base": ">=0.4.4",
"fabric-lifecycle-events-v1": "^2.0.2",
"fabric-networking-api-v1": "^1.0.21",
"fabric-rendering-v1": "^1.10.7",
- "minecraft": ">=1.19",
- "jankson": "^4.0.0",
+ "minecraft": ">=1.19.3",
+ "jankson": "^5.0.0",
"libninepatch": "^1.1.0"
},
"suggests": {