Skip to content

Commit

Permalink
fix build for real
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Oct 12, 2024
1 parent 50b89da commit 8b4f216
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ dependencies {
modImplementation("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")
modApi("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}")

modCompileOnly(":sodium-fabric-1.20.1-0.6.0-intermediary-mappings")

modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}")
modCompileOnly("maven.modrinth:iris:${property("iris_version")}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;

import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
import me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask;
Expand All @@ -12,11 +14,18 @@

@Mixin(value = ChunkBuilderMeshingTask.class, remap = false)
abstract class ChunkBuilderMeshingTaskMixin {
@Redirect(method = "execute", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;", remap = true))
private BlockEntityRenderer<?> flywheel$redirectGetRenderer(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity) {
@WrapOperation(
method = "execute(Lme/jellysquid/mods/sodium/client/render/chunk/compile/ChunkBuildContext;Lme/jellysquid/mods/sodium/client/util/task/CancellationToken;)Lme/jellysquid/mods/sodium/client/render/chunk/compile/ChunkBuildOutput;",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderDispatcher;getRenderer(Lnet/minecraft/world/level/block/entity/BlockEntity;)Lnet/minecraft/client/renderer/blockentity/BlockEntityRenderer;",
remap = true
)
)
private BlockEntityRenderer<?> flywheel$wrapGetRenderer(BlockEntityRenderDispatcher instance, BlockEntity blockEntity, Operation<BlockEntityRenderer<BlockEntity>> original) {
if (VisualizationHelper.tryAddBlockEntity(blockEntity)) {
return null;
}
return dispatcher.getRenderer(blockEntity);
return original.call(instance, blockEntity);
}
}
2 changes: 2 additions & 0 deletions forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ loom {
dependencies {
forge("net.minecraftforge:forge:${property("minecraft_version")}-${property("forge_version")}")

modCompileOnly(":sodium-fabric-1.20.1-0.6.0-intermediary-mappings")

modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}")
modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}")

Expand Down

0 comments on commit 8b4f216

Please sign in to comment.