Skip to content

Commit

Permalink
Merge pull request #246 from CommandGenius/1.21
Browse files Browse the repository at this point in the history
Sodium 0.6 Compatibility
  • Loading branch information
FoundationGames authored Sep 19, 2024
2 parents 969ca4c + 8e87202 commit 4eef65d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ mod_version = 0.10.1+1.21
maven_group = foundationgames
archives_base_name = enhancedblockentities

modmenu_version=11.0.0-beta.1
sodium_version=mc1.21-0.5.9
modmenu_version=11.0.1
sodium_version=mc1.21-0.6.0-beta.1-fabric
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import foundationgames.enhancedblockentities.util.WorldUtil;
import foundationgames.enhancedblockentities.util.duck.ChunkRebuildTaskAccess;
import me.jellysquid.mods.sodium.client.render.chunk.RenderSection;
import me.jellysquid.mods.sodium.client.render.chunk.RenderSectionManager;
import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildOutput;
import net.caffeinemc.mods.sodium.client.render.chunk.RenderSection;
import net.caffeinemc.mods.sodium.client.render.chunk.RenderSectionManager;
import net.caffeinemc.mods.sodium.client.render.chunk.compile.BuilderTaskOutput;
import net.minecraft.util.math.ChunkSectionPos;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
Expand All @@ -17,9 +17,9 @@
@Pseudo
@Mixin(value = RenderSectionManager.class, remap = false)
public class RenderSectionManagerMixin {
@ModifyVariable(method = "submitRebuildTasks",
at = @At(value = "INVOKE", shift = At.Shift.BEFORE, ordinal = 0, target = "Lme/jellysquid/mods/sodium/client/render/chunk/RenderSection;isDisposed()Z"),
index = 4, require = 0
@ModifyVariable(method = "submitSectionTasks(Lnet/caffeinemc/mods/sodium/client/render/chunk/compile/executor/ChunkJobCollector;Lnet/caffeinemc/mods/sodium/client/render/chunk/ChunkUpdateType;Z)V",
at = @At(value = "INVOKE", shift = At.Shift.BEFORE, ordinal = 0, target = "Lnet/caffeinemc/mods/sodium/client/render/chunk/RenderSection;isDisposed()Z"),
index = 5, require = 0
)
private RenderSection enhanced_bes$compat_sodium$cacheUpdatingChunk(RenderSection section) {
if (WorldUtil.CHUNK_UPDATE_TASKS.size() > 0) {
Expand All @@ -35,10 +35,10 @@ public class RenderSectionManagerMixin {
}

@ModifyVariable(method = "processChunkBuildResults",
at = @At(value = "INVOKE_ASSIGN", shift = At.Shift.BEFORE, ordinal = 0, target = "Lme/jellysquid/mods/sodium/client/render/chunk/RenderSection;getBuildCancellationToken()Lme/jellysquid/mods/sodium/client/util/task/CancellationToken;"),
index = 4, require = 0
at = @At(value = "INVOKE_ASSIGN", shift = At.Shift.BEFORE, ordinal = 0, target = "Lnet/caffeinemc/mods/sodium/client/render/chunk/RenderSection;getTaskCancellationToken()Lnet/caffeinemc/mods/sodium/client/util/task/CancellationToken;"),
index = 5, require = 0
)
private ChunkBuildOutput enhanced_bes$runPostRebuildTask(ChunkBuildOutput output) {
private BuilderTaskOutput enhanced_bes$runPostRebuildTask(BuilderTaskOutput output) {
((ChunkRebuildTaskAccess) output.render).enhanced_bes$runAfterRebuildTask();

return output;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package foundationgames.enhancedblockentities.mixin.compat.sodium;

import foundationgames.enhancedblockentities.util.duck.ChunkRebuildTaskAccess;
import me.jellysquid.mods.sodium.client.render.chunk.RenderSection;
import net.caffeinemc.mods.sodium.client.render.chunk.RenderSection;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"depends": {
"fabricloader": ">=0.7.4",
"fabric-api": "*",
"minecraft": ">=1.21-rc.1"
"minecraft": ">=1.21"
},
"breaks": {
"optifabric": "*"
Expand Down

0 comments on commit 4eef65d

Please sign in to comment.