mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Use the bucket tag for filling jars instead of just the vanilla bucket
This commit is contained in:
parent
e9ee61d8da
commit
9c3e2184db
1 changed files with 2 additions and 2 deletions
|
@ -6,11 +6,11 @@ import com.minelittlepony.unicopia.block.ItemJarBlock.TileData;
|
|||
import com.minelittlepony.unicopia.util.FluidHelper;
|
||||
import com.minelittlepony.unicopia.util.serialization.NbtSerialisable;
|
||||
|
||||
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.registry.RegistryWrapper.WrapperLookup;
|
||||
import net.minecraft.util.Hand;
|
||||
|
@ -29,7 +29,7 @@ public record FluidOnlyJarContents (
|
|||
@Override
|
||||
public TypedActionResult<JarContents> 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));
|
||||
|
|
Loading…
Reference in a new issue