Skip to content

Commit

Permalink
fix failing builds due to Vintagium (#2521)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 authored Jul 6, 2024
1 parent ec6b70e commit 6734d8c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
12 changes: 0 additions & 12 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package me.jellysquid.mods.sodium.client.render.chunk.passes;

/**
* Adapted and minimized from <a href="https://github.com/Asek3/sodium-1.12/blob/12.x/forge/src/main/java/me/jellysquid/mods/sodium/client/render/chunk/passes/BlockRenderPass.java">BlockRenderPass.java</a>
*/
public enum BlockRenderPass {
;

public static BlockRenderPass[] VALUES;
public static int COUNT;
}
Original file line number Diff line number Diff line change
@@ -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 <a href="https://github.com/Asek3/sodium-1.12/blob/12.x/forge/src/main/java/me/jellysquid/mods/sodium/client/util/BufferSizeUtil.java">BufferSizeUtil.java</a>
*/
public class BufferSizeUtil {

public static final Map<BlockRenderLayer, Integer> BUFFER_SIZES = new HashMap<>();
}
12 changes: 12 additions & 0 deletions src/api/java/me/jellysquid/mods/sodium/client/util/EnumUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package me.jellysquid.mods.sodium.client.util;

import net.minecraft.util.BlockRenderLayer;

/**
* Adapted and minimized from <a href="https://github.com/Asek3/sodium-1.12/blob/12.x/forge/src/main/java/me/jellysquid/mods/sodium/client/util/EnumUtil.java">EnumUtil.java</a>
*/
public class EnumUtil {

public static BlockRenderLayer[] LAYERS = BlockRenderLayer.values();

}

0 comments on commit 6734d8c

Please sign in to comment.