Skip to content

Commit

Permalink
Update to Minecraft 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Dec 11, 2022
1 parent b67f79e commit 2aa6d47
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
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.
Expand Down Expand Up @@ -140,13 +140,13 @@ public static void texturedRect(MatrixStack matrices, int x, int y, int width, i
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();
}

Expand Down
9 changes: 5 additions & 4 deletions src/main/java/io/github/cottonmc/cotton/gui/widget/WItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
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;

Expand Down Expand Up @@ -110,7 +111,7 @@ public WItem setItems(List<ItemStack> items) {
*/
@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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
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;
Expand Down Expand Up @@ -172,7 +172,7 @@ public void paint(MatrixStack matrices, int x, int y, int mouseX, int mouseY) {
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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
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;
Expand Down Expand Up @@ -252,7 +252,7 @@ private void invertedRect(MatrixStack matrices, int x, int y, int width, int hei
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);
Expand All @@ -261,7 +261,7 @@ private void invertedRect(MatrixStack matrices, int x, int y, int width, int hei
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();
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 2aa6d47

Please sign in to comment.