Fix build.

This commit is contained in:
modmuss50 2023-02-23 16:03:34 +00:00
parent 759c3fbfc3
commit 7c3beb2d1a
16 changed files with 27 additions and 23 deletions

View file

@ -32,14 +32,12 @@ import net.minecraft.client.render.RenderLayers;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.block.BlockRenderManager;
import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.render.model.json.ModelTransformationMode;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.fluid.FluidState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.random.Random;
import net.minecraft.world.BlockRenderView;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import reborncore.common.blockentity.MultiblockWriter;

View file

@ -136,11 +136,11 @@ public class FluidUtils {
}
public static boolean isContainer(ItemStack stack) {
return ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM) != null;
return ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM) != null;
}
public static boolean isContainerEmpty(ItemStack stack) {
var fluidStorage = ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM);
var fluidStorage = ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM);
if (fluidStorage == null) return false;
// Use current transaction in case this check is nested in a transfer operation.
@ -156,7 +156,7 @@ public class FluidUtils {
}
public static boolean containsMatchingFluid(ItemStack stack, Predicate<Fluid> predicate) {
var fluidStorage = ContainerItemContext.withInitial(stack).find(FluidStorage.ITEM);
var fluidStorage = ContainerItemContext.withConstant(stack).find(FluidStorage.ITEM);
if (fluidStorage == null) return false;
// Use current transaction in case this check is nested in a transfer operation.