From 6734d8c727e3d239c03e4256710f0a3690a2f7c1 Mon Sep 17 00:00:00 2001
From: TechLord22 <37029404+TechLord22@users.noreply.github.com>
Date: Fri, 5 Jul 2024 23:57:17 -0400
Subject: [PATCH] fix failing builds due to Vintagium (#2521)
---
dependencies.gradle | 12 ------------
.../render/chunk/passes/BlockRenderPass.java | 11 +++++++++++
.../mods/sodium/client/util/BufferSizeUtil.java | 14 ++++++++++++++
.../mods/sodium/client/util/EnumUtil.java | 12 ++++++++++++
4 files changed, 37 insertions(+), 12 deletions(-)
create mode 100644 src/api/java/me/jellysquid/mods/sodium/client/render/chunk/passes/BlockRenderPass.java
create mode 100644 src/api/java/me/jellysquid/mods/sodium/client/util/BufferSizeUtil.java
create mode 100644 src/api/java/me/jellysquid/mods/sodium/client/util/EnumUtil.java
diff --git a/dependencies.gradle b/dependencies.gradle
index e2ef40e1819..588fd821a59 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -57,18 +57,6 @@ dependencies {
compileOnly rfg.deobf("curse.maven:forestry-59751:2684780") // Forestry 5.8.2.387
compileOnly rfg.deobf("curse.maven:chisel-235279:2915375") // Chisel 1.0.2.45
- // Special Vintagium Hackery
- // Vintagium is currently only distributed as a .zip containing the reobf and -dev jars on Github Actions, which is not ideal
- // Using a fake Ivy repo to download it does not work, as nightly.link does not support http HEAD requests, which Gradle wants
- mkdir("libs")
- // Using Gradle's Ant integration seems to be the least hacky way to download an arbitrary file without a plugin
- ant.get(src: "https://nightly.link/Asek3/sodium-1.12/workflows/gradle/12.x%2Fforge/Vintagium.zip",
- dest: "libs",
- skipexisting: 'true')
- ant.unzip(src: "libs/Vintagium.zip",
- dest: "libs")
- compileOnly(files("libs/vintagium-mc1.12.2-0.1-dev.jar"))
-
// Mods with Soft compat but which have no need to be in code, such as isModLoaded() checks and getModItem() recipes.
// Uncomment any of these to test them in-game.
diff --git a/src/api/java/me/jellysquid/mods/sodium/client/render/chunk/passes/BlockRenderPass.java b/src/api/java/me/jellysquid/mods/sodium/client/render/chunk/passes/BlockRenderPass.java
new file mode 100644
index 00000000000..7ac97f9d095
--- /dev/null
+++ b/src/api/java/me/jellysquid/mods/sodium/client/render/chunk/passes/BlockRenderPass.java
@@ -0,0 +1,11 @@
+package me.jellysquid.mods.sodium.client.render.chunk.passes;
+
+/**
+ * Adapted and minimized from BlockRenderPass.java
+ */
+public enum BlockRenderPass {
+ ;
+
+ public static BlockRenderPass[] VALUES;
+ public static int COUNT;
+}
diff --git a/src/api/java/me/jellysquid/mods/sodium/client/util/BufferSizeUtil.java b/src/api/java/me/jellysquid/mods/sodium/client/util/BufferSizeUtil.java
new file mode 100644
index 00000000000..dee60c5a9d9
--- /dev/null
+++ b/src/api/java/me/jellysquid/mods/sodium/client/util/BufferSizeUtil.java
@@ -0,0 +1,14 @@
+package me.jellysquid.mods.sodium.client.util;
+
+import net.minecraft.util.BlockRenderLayer;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Adapted and minimized from BufferSizeUtil.java
+ */
+public class BufferSizeUtil {
+
+ public static final Map BUFFER_SIZES = new HashMap<>();
+}
diff --git a/src/api/java/me/jellysquid/mods/sodium/client/util/EnumUtil.java b/src/api/java/me/jellysquid/mods/sodium/client/util/EnumUtil.java
new file mode 100644
index 00000000000..da58e286b15
--- /dev/null
+++ b/src/api/java/me/jellysquid/mods/sodium/client/util/EnumUtil.java
@@ -0,0 +1,12 @@
+package me.jellysquid.mods.sodium.client.util;
+
+import net.minecraft.util.BlockRenderLayer;
+
+/**
+ * Adapted and minimized from EnumUtil.java
+ */
+public class EnumUtil {
+
+ public static BlockRenderLayer[] LAYERS = BlockRenderLayer.values();
+
+}