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

@ -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.ColorSampler;
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 net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockRenderView;
@ -14,13 +14,12 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(BlockRenderer.class)
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) {
var blockEntity = world.getBlockEntity(pos);
if (blockEntity instanceof WaterCauldronBlockEntity) {
var flatBiomeColorBlender = new FlatColorBlender();
return flatBiomeColorBlender.getColors(world, pos, quad, sampler, state);
return new FlatColorBlender().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"
},
"breaks": {
"sodium": "<0.4.1"
"sodium": "<0.4.9"
}
}