diff --git a/build.gradle b/build.gradle index afa623a..3246663 100644 --- a/build.gradle +++ b/build.gradle @@ -70,10 +70,8 @@ dependencies { modLocalImplementation "com.terraformersmc:modmenu:${mod_menu_version}" // iris and sodium -// modImplementation("maven.modrinth:sodium:${project.sodium_version}") -// modImplementation("maven.modrinth:iris:${project.iris_version}") -// runtimeOnly("org.anarres:jcpp:${project.jcpp_version}") -// implementation("io.github.douira:glsl-transformer:${project.glslTransformer_version}") + modImplementation("maven.modrinth:sodium:${project.sodium_version}") { transitive = true } + modImplementation("maven.modrinth:iris:${project.iris_version}") { transitive = true } } processClientResources { diff --git a/gradle.properties b/gradle.properties index 2e1812b..2f45f43 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,8 +30,8 @@ mod_menu_version = 11.0.1 cca_version = 6.1.1 midnightlib_version = 1.5.7-fabric satin_version = 2.0.0 -sodium_version = mc1.21.1-0.6.2-fabric +sodium_version = mc1.21.1-0.6.5-fabric iris_version = 1.8.1+1.21.1-fabric jcpp_version = 1.4.14 glslTransformer_version = 2.0.0-pre13 -veil_version = 1.0.0.82 +veil_version = 1.0.0.83 diff --git a/src/client/java/org/ladysnake/effective/core/mixin/water/integration/sodium/SodiumWaterfallGeneratorAdder.java b/src/client/java/org/ladysnake/effective/core/mixin/water/integration/sodium/SodiumWaterfallGeneratorAdder.java index 91e2c70..8d2fb86 100644 --- a/src/client/java/org/ladysnake/effective/core/mixin/water/integration/sodium/SodiumWaterfallGeneratorAdder.java +++ b/src/client/java/org/ladysnake/effective/core/mixin/water/integration/sodium/SodiumWaterfallGeneratorAdder.java @@ -1,9 +1,25 @@ -//package org.ladysnake.effective.core.mixin.water.integration.sodium; -// -//@Mixin(FluidRenderer.class) -//public class SodiumWaterfallGeneratorAdder { -// @Inject(method = "render", at = @At("HEAD")) -// public void effective$generateWaterfall(LevelSlice world, BlockState blockState, FluidState fluidState, BlockPos pos, BlockPos offset, TranslucentGeometryCollector translucentGeometryCollector, ChunkBuildBuffers buffers, CallbackInfo ci) { -// WaterfallCloudGenerators.addGenerator(fluidState, pos.toImmutable()); -// } -//} +package org.ladysnake.effective.core.mixin.water.integration.sodium; + +import net.caffeinemc.mods.sodium.client.model.color.ColorProvider; +import net.caffeinemc.mods.sodium.client.render.chunk.compile.buffers.ChunkModelBuilder; +import net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.DefaultFluidRenderer; +import net.caffeinemc.mods.sodium.client.render.chunk.terrain.material.Material; +import net.caffeinemc.mods.sodium.client.render.chunk.translucent_sorting.TranslucentGeometryCollector; +import net.caffeinemc.mods.sodium.client.world.LevelSlice; +import net.minecraft.block.BlockState; +import net.minecraft.client.texture.Sprite; +import net.minecraft.fluid.FluidState; +import net.minecraft.util.math.BlockPos; +import org.ladysnake.effective.core.world.WaterfallCloudGenerators; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(DefaultFluidRenderer.class) +public class SodiumWaterfallGeneratorAdder { + @Inject(method = "render", at = @At("HEAD")) + public void effective$generateWaterfall(LevelSlice level, BlockState blockState, FluidState fluidState, BlockPos blockPos, BlockPos offset, TranslucentGeometryCollector collector, ChunkModelBuilder meshBuilder, Material material, ColorProvider colorProvider, Sprite[] sprites, CallbackInfo ci) { + WaterfallCloudGenerators.addGenerator(fluidState, blockPos.toImmutable()); + } +} diff --git a/src/client/resources/assets/effective/textures/particle/mist.png b/src/client/resources/assets/effective/textures/particle/mist.png index db07a20..76fa241 100644 Binary files a/src/client/resources/assets/effective/textures/particle/mist.png and b/src/client/resources/assets/effective/textures/particle/mist.png differ diff --git a/src/client/resources/effective_core.mixins.json b/src/client/resources/effective_core.mixins.json index 262bee3..419da81 100644 --- a/src/client/resources/effective_core.mixins.json +++ b/src/client/resources/effective_core.mixins.json @@ -4,7 +4,9 @@ "package": "org.ladysnake.effective.core.mixin", "plugin": "org.ladysnake.effective.core.EffectiveMixinPlugin", "compatibilityLevel": "JAVA_17", - "mixins": [], + "mixins": [ + "water.integration.sodium.SodiumWaterfallGeneratorAdder" + ], "client": [ "BlockMixin", "ClientWorldMixin",