Skip to content

Commit

Permalink
Readd fluid IO
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligabi1 committed Nov 8, 2024
1 parent da39854 commit 03b5396
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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() {
Expand Down

0 comments on commit 03b5396

Please sign in to comment.