Skip to content

Commit

Permalink
Update to Minecraft 1.19.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Mar 29, 2023
1 parent de54904 commit 9b3351a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.0.+'
id 'fabric-loom' version '1.1.+'
id 'io.github.juuxel.loom-quiltflower' version '1.8.+'
id 'java-library'
id 'maven-publish'
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.jvmargs = -Xmx1G

#Fabric properties
minecraft_version = 1.19.3
quilt_mappings = 8
loader_version = 0.12.12
minecraft_version = 1.19.4
quilt_mappings = 7
loader_version = 0.14.18

#Mod properties
mod_version = 1.2.0
maven_group = io.github.queerbric
archives_base_name = pridelib

#Dependencies
fabric_api_version = 0.68.1+1.19.3
fabric_api_version = 0.76.0+1.19.4
14 changes: 1 addition & 13 deletions src/main/java/io/github/queerbric/pride/PrideFlagShapes.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.queerbric.pride;

import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferBuilder;
import com.mojang.blaze3d.vertex.Tessellator;
import com.mojang.blaze3d.vertex.VertexFormat;
Expand All @@ -13,7 +12,7 @@

import java.util.Map;

public class PrideFlagShapes {
public final class PrideFlagShapes {
private static final Map<Identifier, PrideFlagShape> REGISTRY = new Object2ObjectOpenHashMap<>();

public static PrideFlagShape get(Identifier id) {
Expand All @@ -31,7 +30,6 @@ private PrideFlagShapes() {
PrideFlagShape horizStripes;
register(new Identifier("pride", "horizontal_stripes"), horizStripes = (colors, matrices, x, y, w, h) -> {
float sh = h / colors.size();
RenderSystem.disableTexture();
Matrix4f mat = matrices.peek().getModel();
Tessellator t = Tessellator.getInstance();
BufferBuilder bb = t.getBufferBuilder();
Expand All @@ -48,12 +46,9 @@ private PrideFlagShapes() {
y += sh;
}
t.draw();
// Mojang when will you use your state manager system to add fast pushAttrib/popAttrib
RenderSystem.enableTexture();
});
register(new Identifier("pride", "vertical_stripes"), (colors, matrices, x, y, w, h) -> {
float sw = w / colors.size();
RenderSystem.disableTexture();
Matrix4f mat = matrices.peek().getModel();
Tessellator t = Tessellator.getInstance();
BufferBuilder bb = t.getBufferBuilder();
Expand All @@ -70,10 +65,8 @@ private PrideFlagShapes() {
x += sw;
}
t.draw();
RenderSystem.enableTexture();
});
register(new Identifier("pride", "circle"), (colors, matrices, x, y, w, h) -> {
RenderSystem.disableTexture();
Matrix4f mat = matrices.peek().getModel();
Tessellator tess = Tessellator.getInstance();
BufferBuilder bb = tess.getBufferBuilder();
Expand Down Expand Up @@ -107,13 +100,11 @@ private PrideFlagShapes() {
}
}
tess.draw();
RenderSystem.enableTexture();
});
register(new Identifier("pride", "arrow"), (colors, matrices, x, y, w, h) -> {
float s = Math.min(w, h) / 2;
float cy = y + (h / 2);
horizStripes.render(colors.subList(1, colors.size()), matrices, x, y, w, h);
RenderSystem.disableTexture();
Matrix4f mat = matrices.peek().getModel();
Tessellator t = Tessellator.getInstance();
BufferBuilder bb = t.getBufferBuilder();
Expand All @@ -127,7 +118,6 @@ private PrideFlagShapes() {
bb.vertex(mat, x + (s * 1.5f), cy, 0).color(r, g, b, 1).next();
bb.vertex(mat, x, cy - s, 0).color(r, g, b, 1).next();
t.draw();
RenderSystem.enableTexture();
});
var progressBg = new IntArrayList(new int[]{
0xD40606,
Expand All @@ -144,7 +134,6 @@ private PrideFlagShapes() {
Tessellator t = Tessellator.getInstance();
BufferBuilder bb = t.getBufferBuilder();
horizStripes.render(progressBg, matrices, x, y, w, h);
RenderSystem.disableTexture();
bb.begin(VertexFormat.DrawMode.TRIANGLES, VertexFormats.POSITION_COLOR);
int[] triangleColors = {
0x000000,
Expand All @@ -164,7 +153,6 @@ private PrideFlagShapes() {
s -= hm / 6;
}
t.draw();
RenderSystem.enableTexture();
});
}
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"depends": {
"minecraft": ">=1.19.3",
"minecraft": ">=1.19.4",
"fabricloader": ">=0.12.12",
"fabric-resource-loader-v0": "*"
},
Expand Down

0 comments on commit 9b3351a

Please sign in to comment.