mirror of
https://github.com/TibiNonEst/cauldron-dyeing.git
synced 2024-11-24 03:27:19 -05:00
Update sodium version to 0.4.0-alpha6 + housekeeping
This commit is contained in:
parent
bf13d88263
commit
35db886c5a
4 changed files with 11 additions and 16 deletions
|
@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||
minecraft_version=1.18.1
|
||||
yarn_mappings=1.18.1+build.18
|
||||
loader_version=0.12.12
|
||||
fabric_version=0.45.0+1.18
|
||||
fabric_version=0.46.0+1.18
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.0.0
|
||||
|
@ -14,4 +14,4 @@ maven_group=me.tibinonest.mods
|
|||
archives_base_name=cauldron-dying
|
||||
|
||||
# Dependencies
|
||||
sodium_version=mc1.18-0.4.0-alpha5
|
||||
sodium_version=mc1.18.1-0.4.0-alpha6
|
||||
|
|
|
@ -15,11 +15,7 @@ import net.minecraft.util.registry.Registry;
|
|||
public class CauldronDyeing implements ModInitializer {
|
||||
public static final String MOD_ID = "cauldron_dyeing";
|
||||
|
||||
public static BlockEntityType<WaterCauldronBlockEntity> WATER_CAULDRON_BLOCK_ENTITY;
|
||||
|
||||
static {
|
||||
WATER_CAULDRON_BLOCK_ENTITY = FabricBlockEntityTypeBuilder.create(WaterCauldronBlockEntity::new, Blocks.WATER_CAULDRON).build();
|
||||
}
|
||||
public static BlockEntityType<WaterCauldronBlockEntity> WATER_CAULDRON_BLOCK_ENTITY = FabricBlockEntityTypeBuilder.create(WaterCauldronBlockEntity::new, Blocks.WATER_CAULDRON).build();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.tools.obfuscation.SuppressedBy;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
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.blender.BiomeColorBlender;
|
||||
import me.jellysquid.mods.sodium.client.model.quad.blender.FlatBiomeColorBlender;
|
||||
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.tibinonest.mods.cauldron_dyeing.block.WaterCauldronBlockEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -14,15 +14,15 @@ 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/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"))
|
||||
private <T> int[] redirectGetColors(BiomeColorBlender instance, BlockRenderView world, BlockPos pos, ModelQuadView quad, ModelQuadColorProvider<T> handler, T fluidState) {
|
||||
@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(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 FlatBiomeColorBlender();
|
||||
return flatBiomeColorBlender.getColors(world, pos, quad, handler, fluidState);
|
||||
var flatBiomeColorBlender = new FlatColorBlender();
|
||||
return flatBiomeColorBlender.getColors(world, pos, quad, sampler, state);
|
||||
}
|
||||
|
||||
return instance.getColors(world, pos, quad, handler, fluidState);
|
||||
return instance.getColors(world, pos, quad, sampler, state);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue