From 03b539679b40f87493d48363a3b23eba6ae4654d Mon Sep 17 00:00:00 2001 From: Luiz Feikes <33578169+Luligabi1@users.noreply.github.com> Date: Fri, 8 Nov 2024 02:32:02 -0300 Subject: [PATCH] Readd fluid IO --- .../common/block/sink/GrannysSinkBlockEntity.java | 3 ++- .../common/block/tank/PortableTankBlockEntity.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/luligabi/coxinhautilities/common/block/sink/GrannysSinkBlockEntity.java b/src/main/java/me/luligabi/coxinhautilities/common/block/sink/GrannysSinkBlockEntity.java index 80c4d7f..4ee7205 100644 --- a/src/main/java/me/luligabi/coxinhautilities/common/block/sink/GrannysSinkBlockEntity.java +++ b/src/main/java/me/luligabi/coxinhautilities/common/block/sink/GrannysSinkBlockEntity.java @@ -10,6 +10,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluids; import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidUtil; import net.neoforged.neoforge.fluids.capability.templates.FluidTank; import javax.annotation.Nonnull; @@ -48,7 +49,7 @@ public int fill(FluidStack resource, FluidAction action) { }; public boolean fluidIo(Player player, InteractionHand hand) { - return false; //FluidStorageUtil.interactWithFluidStorage(fluidStorage, player, hand); + return FluidUtil.interactWithFluidHandler(player, hand, fluidStorage); } diff --git a/src/main/java/me/luligabi/coxinhautilities/common/block/tank/PortableTankBlockEntity.java b/src/main/java/me/luligabi/coxinhautilities/common/block/tank/PortableTankBlockEntity.java index 9edc21b..6e956ea 100644 --- a/src/main/java/me/luligabi/coxinhautilities/common/block/tank/PortableTankBlockEntity.java +++ b/src/main/java/me/luligabi/coxinhautilities/common/block/tank/PortableTankBlockEntity.java @@ -9,6 +9,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.state.BlockState; import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidUtil; import net.neoforged.neoforge.fluids.capability.templates.FluidTank; public class PortableTankBlockEntity extends ClientSyncedBlockEntity { @@ -28,7 +29,7 @@ protected void onContentsChanged() { public boolean fluidIo(Player player, InteractionHand hand) { - return false; //FluidStorageUtil.interactWithFluidStorage(fluidStorage, player, hand); + return FluidUtil.interactWithFluidHandler(player, hand, fluidStorage); } public boolean hasWrittenNbt() {