mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 15:25:08 +01:00
Compare commits
1 Commits
v1.10.0+1.
...
v1.10.0+1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eec0dda4a |
@@ -13,6 +13,9 @@ repositories {
|
||||
maven {
|
||||
url = "https://api.modrinth.com/maven"
|
||||
}
|
||||
flatDir {
|
||||
dirs("localMaven")
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
@@ -22,6 +25,9 @@ subprojects {
|
||||
url = "https://api.modrinth.com/maven"
|
||||
}
|
||||
maven { url 'https://jitpack.io' }
|
||||
flatDir {
|
||||
dirs("../localMaven")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -14,6 +14,7 @@ import eu.midnightdust.midnightcontrols.MidnightControlsConstants;
|
||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
||||
import eu.midnightdust.midnightcontrols.client.util.platform.NetworkUtil;
|
||||
import org.thinkingstudio.obsidianui.background.Background;
|
||||
import org.thinkingstudio.obsidianui.mixin.DrawContextAccessor;
|
||||
import org.thinkingstudio.obsidianui.widget.SpruceWidget;
|
||||
import eu.midnightdust.lib.util.MidnightColorUtil;
|
||||
import eu.midnightdust.midnightcontrols.MidnightControls;
|
||||
@@ -501,27 +502,24 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
||||
}
|
||||
@Override
|
||||
public void render(DrawContext context, SpruceWidget widget, int vOffset, int mouseX, int mouseY, float delta) {
|
||||
fill(context.getMatrices(), widget.getX(), widget.getY(), widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), MidnightColorUtil.hex2Rgb("#000000"));
|
||||
fill(context, widget.getX(), widget.getY(), widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), Color.black);
|
||||
}
|
||||
private static void fill(MatrixStack matrixStack, int x2, int y2, int x1, int y1, Color color) {
|
||||
matrixStack.push();
|
||||
private static void fill(DrawContext context, int x2, int y2, int x1, int y1, Color color) {
|
||||
RenderLayer renderLayer = RenderLayer.getGui();
|
||||
VertexConsumer vertexConsumer = ((DrawContextAccessor)context).getVertexConsumers().getBuffer(renderLayer);
|
||||
|
||||
Matrix4f matrix = matrixStack.peek().getPositionMatrix();
|
||||
float r = (float)(color.getRed()) / 255.0F;
|
||||
float g = (float)(color.getGreen()) / 255.0F;
|
||||
float b = (float)(color.getBlue()) / 255.0F;
|
||||
float t = (float)(transparency) / 255.0F;
|
||||
BufferBuilder bufferBuilder = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
//RenderSystem.setShader(GameRenderer::getPositionColorProgram);
|
||||
bufferBuilder.vertex(matrix, (float)x1, (float)y2, 0.0F).color(r, g, b, t);
|
||||
bufferBuilder.vertex(matrix, (float)x2, (float)y2, 0.0F).color(r, g, b, t);
|
||||
bufferBuilder.vertex(matrix, (float)x2, (float)y1, 0.0F).color(r, g, b, t);
|
||||
bufferBuilder.vertex(matrix, (float)x1, (float)y1, 0.0F).color(r, g, b, t);
|
||||
BufferRenderer.drawWithGlobalProgram(bufferBuilder.end());
|
||||
vertexConsumer.vertex((float)x1, (float)y2, 0.0F).color(r, g, b, t);
|
||||
vertexConsumer.vertex((float)x2, (float)y2, 0.0F).color(r, g, b, t);
|
||||
vertexConsumer.vertex((float)x2, (float)y1, 0.0F).color(r, g, b, t);
|
||||
vertexConsumer.vertex((float)x1, (float)y1, 0.0F).color(r, g, b, t);
|
||||
RenderSystem.disableBlend();
|
||||
matrixStack.pop();
|
||||
context.draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ yarn_mappings=1.21.3+build.2
|
||||
enabled_platforms=fabric,neoforge
|
||||
|
||||
archives_base_name=midnightcontrols
|
||||
mod_version=1.10.0
|
||||
mod_version=1.10.0+1.21.3-alpha.1
|
||||
maven_group=eu.midnightdust
|
||||
release_type=beta
|
||||
modrinth_id = bXX9h73M
|
||||
@@ -27,7 +27,7 @@ quilt_loader_version=0.19.0-beta.18
|
||||
quilt_fabric_api_version=7.0.1+0.83.0-1.20
|
||||
|
||||
sodium_version=mc1.21-0.6.0-beta.1
|
||||
obsidianui_version=0.2.7+mc1.21
|
||||
obsidianui_version=0.2.9+mc1.21.3
|
||||
modmenu_version=10.0.0-beta.1
|
||||
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
|
||||
bendylib_version=2.0.+
|
||||
|
||||
BIN
localMaven/obsidianui-0.2.9+mc1.21.3-fabric.jar
Normal file
BIN
localMaven/obsidianui-0.2.9+mc1.21.3-fabric.jar
Normal file
Binary file not shown.
BIN
localMaven/obsidianui-0.2.9+mc1.21.3-neoforge.jar
Normal file
BIN
localMaven/obsidianui-0.2.9+mc1.21.3-neoforge.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user