src/main/java/cech12/ceramicbucket/init/ModItems.java
@Nonnull
            public ItemStack dispenseStack(IBlockSource source, ItemStack stack) {
                FilledCeramicBucketItem bucketItem = (FilledCeramicBucketItem)stack.getItem();
                BlockPos blockpos = source.getBlockPos().offset(source.getBlockState().get(DispenserBlock.FACING));
                World world = source.getWorld();
                if (bucketItem.tryPlaceContainedLiquid(null, world, blockpos, null, stack)) {
                    bucketItem.onLiquidPlaced(world, stack, blockpos);
                    return bucketItem.emptyBucket(stack, null);
                } else {
                    return this.dispenseBehaviour.dispense(source, stack);
                }
            }
/**
             * Dispense the specified stack, play the dispense sound and spawn particles.
             */
Dispense the specified stack, play the dispense sound and spawn particles.
Dispense the specified stack play the dispense sound and spawn particles .
@Nonnull
            public ItemStack dispenseStack(IBlockSource source, ItemStack stack) {
                FilledCeramicBucketItem bucketItem = (FilledCeramicBucketItem)stack.getItem();
                BlockPos blockpos = source.getBlockPos().offset(source.getBlockState().get(DispenserBlock.FACING));
                World world = source.getWorld();
                if (bucketItem.tryPlaceContainedLiquid(null, world, blockpos, null, stack)) {
                    bucketItem.onLiquidPlaced(world, stack, blockpos);
                    return bucketItem.emptyBucket(stack, null);
                } else {
                    return this.dispenseBehaviour.dispense(source, stack);
                }
            }
@ Nonnull public ItemStack dispenseStack ( IBlockSource source , ItemStack stack ) { FilledCeramicBucketItem bucketItem = ( FilledCeramicBucketItem ) stack . getItem ( ) ; BlockPos blockpos = source . getBlockPos ( ) . offset ( source . getBlockState ( ) . get ( DispenserBlock . FACING ) ) ; World world = source . getWorld ( ) ; if ( bucketItem . tryPlaceContainedLiquid ( null , world , blockpos , null , stack ) ) { bucketItem . onLiquidPlaced ( world , stack , blockpos ) ; return bucketItem . emptyBucket ( stack , null ) ; } else { return this . dispenseBehaviour . dispense ( source , stack ) ; } }
Dispense the specified stack, play the dispense sound and spawn particles.
Dispense the specified stack play the dispense sound and spawn particles .