Support Sodium 0.4.9, update deps

This commit is contained in:
tibs 2023-02-05 16:18:15 -05:00
parent b2ec18685f
commit db14a2e87a
Signed by untrusted user who does not match committer: tibs
GPG key ID: 047833989F50F88F
3 changed files with 9 additions and 10 deletions

View file

@ -1,10 +1,10 @@
[versions] [versions]
minecraft = "1.19.3" minecraft = "1.19.3"
quilt_mappings = "1.19.3+build.1" quilt_mappings = "1.19.3+build.23"
fabric_loader = "0.14.11" fabric_loader = "0.14.14"
fabric_api = "0.68.1+1.19.3" fabric_api = "0.73.2+1.19.3"
sodium = "mc1.19.3-0.4.5" sodium = "mc1.19.3-0.4.9"
[libraries] [libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
@ -15,6 +15,6 @@ fabric_api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fab
sodium = { module = "maven.modrinth:sodium", version.ref = "sodium" } sodium = { module = "maven.modrinth:sodium", version.ref = "sodium" }
[plugins] [plugins]
fabric_loom = { id = "fabric-loom", version = "1.0.+" } fabric_loom = { id = "fabric-loom", version = "1.1.+" }
loom_quiltflower = { id = "io.github.juuxel.loom-quiltflower", version = "1.8.+" } loom_quiltflower = { id = "io.github.juuxel.loom-quiltflower", version = "1.8.+" }
grgit = { id = "org.ajoberstar.grgit", version = "5.+" } grgit = { id = "org.ajoberstar.grgit", version = "5.+" }

View file

@ -4,7 +4,7 @@ import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView;
import me.jellysquid.mods.sodium.client.model.quad.blender.ColorBlender; import me.jellysquid.mods.sodium.client.model.quad.blender.ColorBlender;
import me.jellysquid.mods.sodium.client.model.quad.blender.ColorSampler; import me.jellysquid.mods.sodium.client.model.quad.blender.ColorSampler;
import me.jellysquid.mods.sodium.client.model.quad.blender.FlatColorBlender; import me.jellysquid.mods.sodium.client.model.quad.blender.FlatColorBlender;
import me.jellysquid.mods.sodium.client.render.pipeline.BlockRenderer; import me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.BlockRenderer;
import me.tibinonest.mods.cauldron_dyeing.block.WaterCauldronBlockEntity; import me.tibinonest.mods.cauldron_dyeing.block.WaterCauldronBlockEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockRenderView; import net.minecraft.world.BlockRenderView;
@ -14,13 +14,12 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(BlockRenderer.class) @Mixin(BlockRenderer.class)
public class SodiumBlockRendererMixin { public class SodiumBlockRendererMixin {
@Redirect(method = "renderQuad", at = @At(value = "INVOKE", target = "Lme/jellysquid/mods/sodium/client/model/quad/blender/ColorBlender;getColors(Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/util/math/BlockPos;Lme/jellysquid/mods/sodium/client/model/quad/ModelQuadView;Lme/jellysquid/mods/sodium/client/model/quad/blender/ColorSampler;Ljava/lang/Object;)[I")) @Redirect(method = "renderQuadList", at = @At(value = "INVOKE", target = "Lme/jellysquid/mods/sodium/client/model/quad/blender/ColorBlender;getColors(Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/util/math/BlockPos;Lme/jellysquid/mods/sodium/client/model/quad/ModelQuadView;Lme/jellysquid/mods/sodium/client/model/quad/blender/ColorSampler;Ljava/lang/Object;)[I"))
private <T> int[] cauldron_dyeing$redirectGetColors(ColorBlender instance, BlockRenderView world, BlockPos pos, ModelQuadView quad, ColorSampler<T> sampler, T state) { private <T> int[] cauldron_dyeing$redirectGetColors(ColorBlender instance, BlockRenderView world, BlockPos pos, ModelQuadView quad, ColorSampler<T> sampler, T state) {
var blockEntity = world.getBlockEntity(pos); var blockEntity = world.getBlockEntity(pos);
if (blockEntity instanceof WaterCauldronBlockEntity) { if (blockEntity instanceof WaterCauldronBlockEntity) {
var flatBiomeColorBlender = new FlatColorBlender(); return new FlatColorBlender().getColors(world, pos, quad, sampler, state);
return flatBiomeColorBlender.getColors(world, pos, quad, sampler, state);
} }
return instance.getColors(world, pos, quad, sampler, state); return instance.getColors(world, pos, quad, sampler, state);

View file

@ -29,6 +29,6 @@
"fabric-object-builder-api-v1": ">=0.1" "fabric-object-builder-api-v1": ">=0.1"
}, },
"breaks": { "breaks": {
"sodium": "<0.4.1" "sodium": "<0.4.9"
} }
} }