Implement getPickupSound on ForgeFlowingFluid (#8374)

This commit is contained in:
Sara Freimer authored and GitHub committed 2022-02-08 12:24:47 -08:00
1 parent e10f5c637e
commit f19f7e4670
1 file changed
+10
@@ -19,6 +19,9 @@
package net.minecraftforge.fluids;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.Blocks;
@@ -143,6 +146,13 @@ public abstract class ForgeFlowingFluid extends FlowingFluid
return fluidIn == still.get() || fluidIn == flowing.get();
}
@Nonnull
@Override
public Optional<SoundEvent> getPickupSound()
{
return Optional.ofNullable(getAttributes().getFillSound());
}
@Override
protected FluidAttributes createAttributes()
{