lower opengl requirement to 2.1 when higher versions are unsupported #21

Closed
rdh wants to merge 10 commits from rdh/celeritas:stonecutter into stonecutter
pull from: rdh/celeritas:stonecutter
8 changed files with 70 additions and 19 deletions
Showing only changes of commit 8cea425518 - Show all commits

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
# Used when a commit is pushed to the repository
# This makes use of caching for faster builds and uploads the resulting artifacts
name: ci
on: push
jobs:
build:
runs-on: ubuntu-large
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
8
17
21
- name: Initialize caches
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: release-${{ runner.os }}-build-snapshot-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('settings.gradle') }}
restore-keys: |
release-${{ runner.os }}-build-snapshot-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-
- name: Initialize Unimined caches
uses: actions/cache@v4
with:
path: |
**/.gradle/unimined
key: unimined-v3-${{ runner.os }}-build-snapshot-${{ hashFiles('modern/build.gradle') }}-${{ hashFiles('settings.gradle.kts') }}
restore-keys: |
unimined-v3-${{ runner.os }}-build-snapshot-${{ hashFiles('modern/build.gradle') }}-
unimined-v3-${{ runner.os }}-build-snapshot-
- name: Build all packaged jars
run: ./gradlew packageJar --info --stacktrace
- name: Show checksums
run: find build/libs -name \*.jar | sort | xargs sha256sum
+5 -8
View File
@@ -22,7 +22,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-large
steps:
- name: Verify that release channel is available
@@ -53,14 +53,11 @@ jobs:
uses: actions/cache@v4
with:
path: |
modern/versions/**/.gradle/unimined
forge1710/.gradle/unimined
forge122/.gradle/unimined
babric/.gradle/unimined
key: unimined-v2-${{ runner.os }}-build-snapshot-${{ hashFiles('modern/build.gradle') }}-${{ hashFiles('settings.gradle.kts') }}
**/.gradle/unimined
key: unimined-v3-${{ runner.os }}-build-snapshot-${{ hashFiles('modern/build.gradle') }}-${{ hashFiles('settings.gradle.kts') }}
restore-keys: |
unimined-v2-${{ runner.os }}-build-snapshot-${{ hashFiles('modern/build.gradle') }}-
unimined-v2-${{ runner.os }}-build-snapshot-
unimined-v3-${{ runner.os }}-build-snapshot-${{ hashFiles('modern/build.gradle') }}-
unimined-v3-${{ runner.os }}-build-snapshot-
- name: Publish artifacts
if: ${{ inputs.release_type != 'DRY_RUN' }}
run: ./gradlew :taugradle_publish -Prelease_channel=${{ inputs.release_type }} --stacktrace
@@ -3,7 +3,6 @@ package org.taumc.celeritas.impl.render.terrain.compile.task;
import it.unimi.dsi.fastutil.objects.Reference2ReferenceMap;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
import net.minecraft.world.WorldRegion;
import net.minecraft.world.chunk.WorldChunk;
@@ -78,7 +77,7 @@ public class ChunkBuilderMeshingTask extends ChunkBuilderTask<ChunkBuildOutput>
//?} else {
/*var blockPos = new net.minecraft.util.math.BlockPos.Mutable(minX, minY, minZ);
var region = new WorldRegion(world, new net.minecraft.util.math.BlockPos(minX, minY, minZ), new net.minecraft.util.math.BlockPos(maxX, maxY, maxZ), 1);
var renderBlocks = Minecraft.getInstance().getBlockRenderDispatcher();
var renderBlocks = net.minecraft.client.Minecraft.getInstance().getBlockRenderDispatcher();
*///?}
tesselator.offset(-this.render.getOriginX(), -this.render.getOriginY(), -this.render.getOriginZ());
@@ -44,16 +44,16 @@ public class ChunkOcclusionDataBuilder {
}
public void markClosed(int x, int y, int z) {
this.closed.set(pack(x & 15, y & 15, z & 15), true);
this.closed.set(pack(x, y, z), true);
--this.openCount;
}
private static int pack(Vector3i pos) {
return pack(pos.x() & 15, pos.y() & 15, pos.z() & 15);
return pack(pos.x(), pos.y(), pos.z());
}
private static int pack(int x, int y, int z) {
return x << 0 | y << 8 | z << 4;
return (x & 15) << 0 | (y & 15) << 8 | (z & 15) << 4;
}
public ChunkOcclusionData build() {
+11 -5
View File
@@ -79,10 +79,16 @@ repositories {
includeGroup("com.gtnewhorizons")
}
}
mavenLocal()
maven {
name = "taumc releases"
url = uri("https://maven.taumc.org/releases")
content {
includeGroupAndSubgroups("org.taumc")
}
}
}
val lwjgl3ifyVersion = "1.0.1-38-g6410323"
val lwjgl3ifyVersion = "d6af8e7"
val forgePatchDeps by configurations.creating {
isCanBeResolved = true
@@ -113,13 +119,13 @@ dependencies {
compileOnly("com.gtnewhorizons.retrofuturabootstrap:RetroFuturaBootstrap:1.0.11") {
exclude(group = "org.apache.logging.log4j")
}
implementation("io.github.twilightflower:lwjgl3ify:${lwjgl3ifyVersion}:dev") {
implementation("org.taumc:lwjgl3ify:${lwjgl3ifyVersion}:dev") {
isTransitive = false
}
runtimeOnly("io.github.twilightflower:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {
runtimeOnly("org.taumc:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {
isTransitive = false
}
forgePatchDeps("io.github.twilightflower:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {
forgePatchDeps("org.taumc:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {
isTransitive = false
}
"modRuntimeOnly"("curse.maven:ae2-223794:2747063")
@@ -7,7 +7,7 @@ import net.minecraft.world.level.chunk.GlobalPalette;
import net.minecraft.world.level.chunk.Palette;
//? if >=1.21.9-beta.1 {
/*import net.minecraft.world.level.chunk.Strategy;
*///?} else {
*///?} else >=1.17 {
import static net.minecraft.world.level.chunk.PalettedContainer.Strategy;
//?}
import org.embeddedt.embeddium.impl.world.PaletteStorageExtended;
@@ -1,6 +1,8 @@
package org.embeddedt.embeddium.impl.mixin.features.render.entity.shadows;
//? if <1.21.9-beta.1 {
//? if <1.20
/*import org.embeddedt.embeddium.api.math.Matrix4fExtended;*/
import org.embeddedt.embeddium.api.vertex.buffer.VertexBufferWriter;
import org.embeddedt.embeddium.api.vertex.format.common.ModelVertex;
import net.minecraft.client.renderer.LightTexture;
@@ -44,6 +44,8 @@ public class ClonedChunkSection {
private static final int DATA_LAYER_COUNT = DataLayer.LAYER_COUNT;
//?} else {
/*private static final int DATA_LAYER_COUNT = 16;
/// @see net.minecraft.world.level.chunk.LevelChunkSection#GLOBAL_BLOCKSTATE_PALETTE
private static final Palette<BlockState> GLOBAL_STATE_PALETTE = new GlobalPalette(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState());
*///?}
//? if >=1.20 {