Skip to content

Commit

Permalink
Update some values to fix some stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Aug 19, 2023
1 parent 8d52c1a commit 4f815f5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ org.gradle.jvmargs=-Xmx1G

# Quilt properties
minecraft_version=1.20.1
quilt_mappings=20
quilt_mappings=23
loader_version=0.19.2
fabric_api_version=7.0.6+0.85.0
qsl_version=6.0.4
fabric_api_version=7.1.2+0.87.0
qsl_version=6.1.1

# Mod properties
mod_version=1.0.0-alpha.1
maven_group=dev.lambdaurora
archives_base_name=lambdamap

# Dependencies
spruceui_version=5.0.0+1.20
spruceui_version=5.0.2+1.20
pridelib_version=1.2.0+1.19.4
21 changes: 14 additions & 7 deletions src/main/java/dev/lambdaurora/lambdamap/gui/WorldMapRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package dev.lambdaurora.lambdamap.gui;

import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.VertexConsumer;
import dev.lambdaurora.lambdamap.LambdaMap;
import dev.lambdaurora.lambdamap.map.ChunkGetterMode;
Expand All @@ -29,7 +30,6 @@
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.texture.NativeImageBackedTexture;
import net.minecraft.client.util.math.MatrixStack;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.joml.Matrix4f;
Expand Down Expand Up @@ -213,7 +213,7 @@ public void update(boolean forceRedraw) {
}

public void render(GuiGraphics graphics, VertexConsumerProvider vertexConsumers, float delta) {
graphics.fill(0, 0, this.width, this.height, 0xff000000);
graphics.fill(0, 0, this.width, this.height, 0x44000000);

int light = LightmapTextureManager.pack(15, 15);
this.textureManager.render(graphics, vertexConsumers, light);
Expand All @@ -240,8 +240,12 @@ private void renderPlayerIcon(GuiGraphics graphics, VertexConsumerProvider verte
graphics.getMatrices().pop();
}

public static void vertex(VertexConsumer vertices, Matrix4f model, float x, float y,
float u, float v, int light) {
public static void vertex(
VertexConsumer vertices, Matrix4f model,
float x, float y,
float u, float v,
int light
) {
vertices.vertex(model, x, y, 0.f).color(255, 255, 255, 255)
.uv(u, v).light(light).next();
}
Expand Down Expand Up @@ -422,9 +426,12 @@ public void update(WorldMap map, int chunkStartX, int chunkStartZ, int scale) {
this.texture.upload();
}

public void render(GuiGraphics graphics, VertexConsumerProvider vertexConsumers, float originX, float originY,
int offsetX, int offsetY,
float width, float height, int light) {
public void render(
GuiGraphics graphics, VertexConsumerProvider vertexConsumers,
float originX, float originY,
int offsetX, int offsetY,
float width, float height, int light
) {
var model = graphics.getMatrices().peek().getModel();
var vertices = vertexConsumers.getBuffer(this.mapRenderLayer);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"depends": [
{
"id": "minecraft",
"versions": ">=1.20"
"versions": "~1.20"
},
{
"id": "quilt_loader",
Expand Down

0 comments on commit 4f815f5

Please sign in to comment.