Update sodium version to 0.4.0-alpha6 + housekeeping

This commit is contained in:
tibs 2022-01-15 14:55:58 -05:00
parent bf13d88263
commit 35db886c5a
Signed by untrusted user who does not match committer: tibs
GPG key ID: 047833989F50F88F
4 changed files with 11 additions and 16 deletions

View file

@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx1G
minecraft_version=1.18.1 minecraft_version=1.18.1
yarn_mappings=1.18.1+build.18 yarn_mappings=1.18.1+build.18
loader_version=0.12.12 loader_version=0.12.12
fabric_version=0.45.0+1.18 fabric_version=0.46.0+1.18
# Mod Properties # Mod Properties
mod_version=1.0.0 mod_version=1.0.0
@ -14,4 +14,4 @@ maven_group=me.tibinonest.mods
archives_base_name=cauldron-dying archives_base_name=cauldron-dying
# Dependencies # Dependencies
sodium_version=mc1.18-0.4.0-alpha5 sodium_version=mc1.18.1-0.4.0-alpha6

View file

@ -15,11 +15,7 @@ import net.minecraft.util.registry.Registry;
public class CauldronDyeing implements ModInitializer { public class CauldronDyeing implements ModInitializer {
public static final String MOD_ID = "cauldron_dyeing"; public static final String MOD_ID = "cauldron_dyeing";
public static BlockEntityType<WaterCauldronBlockEntity> WATER_CAULDRON_BLOCK_ENTITY; public static BlockEntityType<WaterCauldronBlockEntity> WATER_CAULDRON_BLOCK_ENTITY = FabricBlockEntityTypeBuilder.create(WaterCauldronBlockEntity::new, Blocks.WATER_CAULDRON).build();
static {
WATER_CAULDRON_BLOCK_ENTITY = FabricBlockEntityTypeBuilder.create(WaterCauldronBlockEntity::new, Blocks.WATER_CAULDRON).build();
}
@Override @Override
public void onInitialize() { public void onInitialize() {

View file

@ -20,7 +20,6 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.tools.obfuscation.SuppressedBy;
import java.util.Map; import java.util.Map;

View file

@ -1,9 +1,9 @@
package me.tibinonest.mods.cauldron_dyeing.mixin.sodium; package me.tibinonest.mods.cauldron_dyeing.mixin.sodium;
import me.jellysquid.mods.sodium.client.model.quad.ModelQuadColorProvider;
import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView; import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView;
import me.jellysquid.mods.sodium.client.model.quad.blender.BiomeColorBlender; import me.jellysquid.mods.sodium.client.model.quad.blender.ColorBlender;
import me.jellysquid.mods.sodium.client.model.quad.blender.FlatBiomeColorBlender; 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.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;
@ -14,15 +14,15 @@ 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/BiomeColorBlender;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/ModelQuadColorProvider;Ljava/lang/Object;)[I")) @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"))
private <T> int[] redirectGetColors(BiomeColorBlender instance, BlockRenderView world, BlockPos pos, ModelQuadView quad, ModelQuadColorProvider<T> handler, T fluidState) { private <T> int[] 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 FlatBiomeColorBlender(); var flatBiomeColorBlender = new FlatColorBlender();
return flatBiomeColorBlender.getColors(world, pos, quad, handler, fluidState); return flatBiomeColorBlender.getColors(world, pos, quad, sampler, state);
} }
return instance.getColors(world, pos, quad, handler, fluidState); return instance.getColors(world, pos, quad, sampler, state);
} }
} }