From add128cbee22fb00d256412094af54d489bd5b87 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 8 Oct 2024 15:02:26 +0100 Subject: [PATCH] Use the bucket tag for filling jars instead of just the vanilla bucket --- .../unicopia/block/jar/FluidOnlyJarContents.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/block/jar/FluidOnlyJarContents.java b/src/main/java/com/minelittlepony/unicopia/block/jar/FluidOnlyJarContents.java index 0cdcab4b..49f0e62f 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/jar/FluidOnlyJarContents.java +++ b/src/main/java/com/minelittlepony/unicopia/block/jar/FluidOnlyJarContents.java @@ -5,11 +5,11 @@ import com.minelittlepony.unicopia.block.ItemJarBlock.JarContents; import com.minelittlepony.unicopia.block.ItemJarBlock.TileData; import com.minelittlepony.unicopia.util.FluidHelper; +import net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; import net.minecraft.nbt.NbtCompound; import net.minecraft.util.Hand; import net.minecraft.util.TypedActionResult; @@ -27,7 +27,7 @@ public record FluidOnlyJarContents ( @Override public TypedActionResult interact(PlayerEntity player, Hand hand) { ItemStack stack = player.getStackInHand(hand); - if (stack.isOf(Items.BUCKET)) { + if (stack.isIn(ConventionalItemTags.EMPTY_BUCKETS)) { long remainder = FluidHelper.deposit(stack, player, hand, fluid, amount); tile.markDirty(); fluid.getFluid().getBucketFillSound().ifPresent(sound -> player.playSound(sound, 1, 1));